Climate Model Interface Demo
Here we setup, run and plot the MIT general circulation model interactively via MITgcmTools.jl that can generate something like this for the Atmosphere:
xxxxxxxxxx
Select Model Configuration
Note: changing this top level parameter should update multiple-choice menus and results below
xxxxxxxxxx
xxxxxxxxxx
ID = 313995df-2330-49dd-9e21-152c4d4514ba
model = MITgcm
configuration = global_with_exf
folder = /tmp
log subfolder = 313995df-2330-49dd-9e21-152c4d4514ba/log
xxxxxxxxxx
Where Is mitgcmuv
located?
The model executable mitcmuv
is generally found in the $(MITgcm_path)/verification/$(configuration)/build/
subfolder of the selected model configuration.
If mitcmuv
is not found at this stage then it is assumed that the chosen model configuration has never been compiled – such that we need to compile and run the model a first time. This might take a lot longer than a normal model run due to the one-time cost of compiling the model.
Once mitgcmuv
is found, then the executable file name should appear just below.
xxxxxxxxxx
"/home/runner/.julia/artifacts/c1054339e0822e847d82dd219680aa150eb3433f/MITgcm-checkpoint67s/verification/global_with_exf/build/mitgcmuv"
xxxxxxxxxx
Browse Model Parameters
Once the model has been setup for the selected configuration, then data
and PARM01
should be found in the model run directory which should appear just below.
Once model has been compiled and the run directory setup, we are ready to call launch(exps[iexp])
and thus run the model as done below. If an error message suggests that something has gone wrong, sometimes it helps to run the clean(exps[iexp])
and restart this notebook.
xxxxxxxxxx
"/tmp/313995df-2330-49dd-9e21-152c4d4514ba/run"
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
:tRef
"15*20."
:sRef
"15*35."
:viscAr
0.001
:viscAh
500000.0
:diffKhT
0.0
:diffKrT
3.0e-5
:diffKhS
0.0
:diffKrS
3.0e-5
:rhoConst
1035.0
:rotationPeriod
86400.0
:gravity
9.81
:eosType
"POLY3"
:ivdc_kappa
100.0
:implicitDiffusion
true
:allowFreezing
true
:useRealFreshWaterFlux
true
:useCDscheme
true
:useNHMTerms
true
:hFacMin
0.05
:hFacMindr
50.0
:readBinaryPrec
32
:usesinglecpuio
true
xxxxxxxxxx
Modify Parameters
In the example just below, we change the run duration for the global_with_exf configuration.
Selecting Update Parameter File triggers the following sequence:
update file in the run directory
launch the model
update the plot accordingly
Note: some configurations use nTimeSteps
, others use endTime
, but using both at once generates an error message.
xxxxxxxxxx
xxxxxxxxxx
"🐎"
xxxxxxxxxx
Run Model
Click on button when ready to run the model global_with_exf.
This should also happen automatically after modifying parameters.
xxxxxxxxxx
xxxxxxxxxx
"🏁"
xxxxxxxxxx
Plot Model Result
Here we show average temperature in global_with_exf
xxxxxxxxxx
xxxxxxxxxx
Appendices
xxxxxxxxxx
"🏁"
xxxxxxxxxx
"🏁"
xxxxxxxxxx
"🏁"
xxxxxxxxxx
"🏁"
xxxxxxxxxx
"🏁"
xxxxxxxxxx
xxxxxxxxxx