Model Configurations

In MITgcm.jl, a model configuration is represented as a MITgcm_config. Model parameters are handled as ordered dictionaries and stored as TOML files. Standard model configurations are readily supported.

MITgcm_config

The data structure that enables MITgcm.jl is called MITgcm_config.

MITgcm.MITgcm_configType
MITgcm_config()

Concrete type of AbstractModelConfig for MITgcm (as part of the ClimateModels.jl interface for MITgcm) which contains

    model :: String = "MITgcm"
    configuration :: String = ""
    inputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}()
    outputs :: OrderedDict{Any,Any} = OrderedDict{Any,Any}()
    channel :: Channel{Any} = Channel{Any}(10) 
    folder :: String = tempdir()
    ID :: UUID = UUIDs.uuid4()

and can be constructed using keywords as follows

unknown_config=MITgcm_config(configuration="unknown")
source

Model Parameters

Model parameters can be stored as a TOML file, and represented as a nested OrderedDic.

read_toml(fil)
OrderedCollections.OrderedDict{Any, Any} with 20 entries:
  :main           => OrderedDict{Any, Any}(:PARM01=>OrderedDict{Any, Any}(:tRef…
  :autodiff       => OrderedDict{Any, Any}(:AUTODIFF_PARM01=>OrderedDict{Any, A…
  :cal            => OrderedDict{Any, Any}(:CAL_NML=>OrderedDict{Any, Any}(:The…
  :cost           => OrderedDict{Any, Any}(:COST_NML=>OrderedDict{Any, Any}())
  :ctrl           => OrderedDict{Any, Any}(:ctrl_nml=>OrderedDict{Any, Any}(:do…
  :diagnostics    => OrderedDict{Any, Any}(:diagnostics_list=>OrderedDict{Any, …
  :ecco           => OrderedDict{Any, Any}(:ECCO_COST_NML=>OrderedDict{Any, Any…
  :exch2          => OrderedDict{Any, Any}(:W2_EXCH2_PARM01=>OrderedDict{Any, A…
  :exch2_192cores => OrderedDict{Any, Any}(:W2_EXCH2_PARM01=>OrderedDict{Any, A…
  :exf            => OrderedDict{Any, Any}(:EXF_NML_01=>OrderedDict{Any, Any}(:…
  :ggl90          => OrderedDict{Any, Any}(:GGL90_PARM01=>OrderedDict{Any, Any}…
  :gmredi         => OrderedDict{Any, Any}(:GM_PARM01=>OrderedDict{Any, Any}(:G…
  :optim          => OrderedDict{Any, Any}(:OPTIM=>OrderedDict{Any, Any}(:optim…
  :pkg            => OrderedDict{Any, Any}(:PACKAGES=>OrderedDict{Any, Any}(:us…
  :profiles       => OrderedDict{Any, Any}(:PROFILES_NML=>OrderedDict{Any, Any}…
  :salt_plume     => OrderedDict{Any, Any}(:SALT_PLUME_PARM01=>OrderedDict{Any,…
  :seaice         => OrderedDict{Any, Any}(:SEAICE_PARM01=>OrderedDict{Any, Any…
  :smooth         => OrderedDict{Any, Any}(:SMOOTH_NML=>OrderedDict{Any, Any}(S…
  :eedata         => OrderedDict{Any, Any}(:EEPARMS=>OrderedDict{Any, Any}(:use…
  :setup          => OrderedDict{Any, Any}(:main=>OrderedDict{Any, Any}(:catego…

Global ECCO Configuration

Global ocean model configurations used in NASA's ECCO ocean state estimation program.

Warning

Running these solutions requires at least 16 cores (preferably 96) and downloading forcing fields (96G at least). To try with a smaller model solution, see Verification Experiments.

MITgcm.setup_ECCO4!Function
setup_ECCO4!(config::MITgcm_config)

Setup method for ECCO4 and OCCA2 solutions.

using MITgcm

params=read_toml(:ECCO4)
folder=joinpath(pwd(),"tmp1")

MC=MITgcm_config(inputs=params,folder=folder)

#providing executable (optional)
#push!(MC.inputs[:setup][:main],(:exe => joinpath(pwd(),"mitgcmuv")))

#providing input folder (optional)
#push!(MC.inputs[:setup][:main],(:input_folder => joinpath(pwd(),"input_folder")))

#modifying run time options (optional)
#MC.inputs[:pkg][:PACKAGES][:useECCO]=false

setup(MC)

#modifying build options (optional)
#MC.inputs[:setup][:build][:options]=MITgcm.build_options_pleiades

build(MC)

launch(MC)
source
MITgcm.ECCO4_inputs.get_filesFunction
get_files(list1::DataFrame,nam1::String,path1::String)

Create a list of Dataverse files from folder with specified name.

list1=ECCO4_inputs.get_list()
nam1="model initialization"
ECCO4_inputs.get_files(list1,nam1,tempname())
source
MITgcm.ECCO4_inputs.get_listFunction
get_list(; write_file=false)

Create a list of Dataverse folders for ECCOv4r2. If write_file=true then write to file joinpath(tempdir(),"Dataverse_list.csv")/

source
get_list(list1::DataFrame,name::String)

Create a list of Dataverse files from folder with specified name.

list1=ECCO4_inputs.get_list()
nam1="surface forcing fields"
list2=ECCO4_inputs.get_list(list1,nam1)
source
MITgcm.ECCO4_testreport.compareFunction
compare(A::DataFrame,B::DataFrame)
using ClimateModels.DataFrames, ClimateModels.CSV
ref_file="test/testreport_baseline2.csv"
ref=CSV.read(ref_file,DataFrame)

using MITgcm
ECCO4_testreport.compare(report,ref)
source
compare(A::DataFrame,B::DataFrame,v::AbstractString)
source

Verification Experiments

The MITgcm/verification sub-folder of the MITgcm source code provides a suite of small model configurations, often used by model developers for testing.

To list of these model configurations (as installed) is provided by verification_experiments.

ves=verification_experiments()
[ve.configuration for ve in ves]
8-element Vector{String}:
 "MLAdjust"
 "advect_cs"
 "advect_xy"
 "aim.5l_cs"
 "flt_example"
 "hs94.cs-32x32x5"
 "tutorial_global_oce_biogeo"
 "tutorial_held_suarez_cs"

They can be used via a MITgcm_config as follows.

MITgcm_config(configuration="MLAdjust")
  ID            = 7cbbf16b-cc9c-48ce-9464-e0a5f96b90e6
  model         = MITgcm
  configuration = MLAdjust
  run folder    = /tmp/7cbbf16b-cc9c-48ce-9464-e0a5f96b90e6
  log subfolder = /tmp/7cbbf16b-cc9c-48ce-9464-e0a5f96b90e6/log

Functionalities

MITgcm.verification_experimentsFunction

verification_experiments()

Get list of all most-standard configurations of MITgcm and return as an Array of MITgcm_config

exps=verification_experiments()
source
verification_experiments(nam::String)

Get one configurations of MITgcm and return as a MITgcm_config

advect_xy=verification_experiments("advect_xy")
source
MITgcm.testreportFunction
testreport(config::MITgcm_config,ext="")

Run the testreport script for one model config, with additional options (optional) speficied in ext

using MITgcm
testreport(MITgcm_config(configuration="front_relax"),"-norun")
#testreport(MITgcm_config(configuration="all"),"-norun")
source