Interface to MITgcm
The ClimateModels.jl's interface is implemented in MITgcm.jl
.
This allows you to easily create model simulations using MITgcm
conveniently from Julia
.
using MITgcm
MC=MITgcm_config(configuration="advect_xy")
setup(MC)
build(MC)
launch(MC)
"STOP NORMAL END"
sc=scan_rundir(MC)
keys(sc)
(:packages, :params_time, :params_grid, :params_files, :completed)
Functionalities
Main
The following three methods implement the ClimateModels.jl's interface for MITgcm.
ClimateModels.setup
— Functionsetup(config::MITgcm_config)
Create a run/
folder and link everything there as needed to be ready to run model as normally done for most-standard MITgcm configurations (incl. prepare_run
and mitgcmuv
). Call ClimateModels.git_log_init(config)
to setup git tracker and put!(config.channel,MITgcm_launch)
to be executed via launch(config)
later.
(part of the climate model interface as specialized for MITgcm
)
ClimateModels.build
— Functionbuild(config::MITgcm_config)
Build the model using genmake2
, make depend
, and make
. The first two link all code files, headers, etc in the build/
folder before compiling the model.
Note : this is skipped if config.inputs[:setup][:main][:exe]
is specified.
build(config::MITgcm_config,options::String)
Build the model using genmake2
, make depend
, and make
unless otherwise specified via options
. The genmake2
and make depend
commands link all code files, headers, etc in the build/
folder before make
compiles the model.
(part of the climate model interface as specialized for MITgcm
)
ClimateModels.launch
— Functionlaunch(config::MITgcm_config)
Go to run/
folder and effectively call mitgcmuv > output.txt
(part of the climate model interface as specialized for MITgcm
)
Tools
MITgcm.system_check
— Functionsystem_check(;setenv=false,rebuild=true)
MITgcm.set_environment_variables_to_default
— Functionset_environment_variables_to_default()
Defines environment variables to default values.
!!! Warning : it is generally much better to adjust them to your own system !!!
!!! Warning : the defaults will likely NOT work on most systems !!!
MITgcm.default_path
— FunctionMITgcm.default_path()
Return default path, and download via MITgcm_download if needed.
MITgcm.getdata
— Functiongetdata(nam::String)
Add data to the scratch space folder. Known options for nam
include "mitgcmsmall", "mitgcmsmallverif", "hs94pickup", "darwin3code", "darwin3oneD"
MITgcm.create_script
— Functioncreate_script(rundir=pwd(),filename="")
Create submission script – for NASA pleiades in this example.
submission_script=MITgcm.create_script(pwd(),"job.csh")
MITgcm.parse_param
— Functionparse_param(p1)
Parse namelist parameter and return in corresponding type
The following methods are imported from ClimateModels.jland customized for MITgcm.
ClimateModels.compile
— Functioncompile(config::MITgcm_config)
Compile the model using make
in build/
that has already been setup.
(part of the climate model interface as specialized for MITgcm
)
ClimateModels.clean
— Functionclean(config::MITgcm_config)
Cancel any remaining task (config.channel) and clean up the run directory (via rm).
(part of the climate model interface as specialized for MITgcm
)
│