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

Note

The following three methods implement the ClimateModels.jl's interface for MITgcm.

ClimateModels.setupFunction
setup(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)

source
ClimateModels.buildFunction
build(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.

source
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)

source
ClimateModels.launchFunction
launch(config::MITgcm_config)

Go to run/ folder and effectively call mitgcmuv > output.txt

(part of the climate model interface as specialized for MITgcm)

source

Tools

MITgcm.set_environment_variables_to_defaultFunction
set_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 !!!

source
MITgcm.getdataFunction
getdata(nam::String)

Add data to the scratch space folder. Known options for nam include "mitgcmsmall", "mitgcmsmallverif", "hs94pickup", "darwin3code", "darwin3oneD"

source
MITgcm.create_scriptFunction
create_script(rundir=pwd(),filename="")

Create submission script – for NASA pleiades in this example.

submission_script=MITgcm.create_script(pwd(),"job.csh")
source
Note

The following methods are imported from ClimateModels.jland customized for MITgcm.

ClimateModels.compileFunction
compile(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)

source
ClimateModels.cleanFunction
clean(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)

source