This project aims to develope mixed-layer based ocean component. It also extends the data ocean model (docn) of Community Earth System Model (CESM). It is an experimental framework for fortran based program to work with Julia program without deep embedding.
After creating a CESM case, this is what typically needs to be done.
- Copy or create soft link of
docn_comp_mod.F90
andfortran_lib
to$CASEROOT/SourceMods/src.docn
. The content ofdocn_comp_mod.F90
should be the filecesm1_comp_mod.F90
. - Edit
$CASEROOT/env_run.xml
entries:- STOP_N : xxx (Days of simulation you want)
- OCN_NCPL : 1 (Ocean update frequency: 1 time per day )
- DOCN_SOM_FILENAME : pop_frc.gx3v7.110128.nc (actually any valid q-flux file but remember the data will not be used. This is only to make docn run).
- Edit
$CASEROOT/env_mach_pes.xml
entries (Please study CESM1 PES LAYOUT GUIDE) :- MAX_TASKS_PER_NODE : 4
- NTASKS_OCN : 1 (Must be 1)
- NTHRDS_OCN : 1
- Create your own
config.jl
(Here after$SMARTSLAB_CONFIG
) file for ocean model. You need to specifycaseroot
,wdir
($CASERUN),domain_file
(ex:$CESMINPUTDATA/share/domains/domain.ocn.gx3v7.120323.nc
) - Run
$CASEROOT/cesm_setup
, then$CASEROOT/$CASE.build
. - Edit
$CASEROOT/$CASE.run
:- Remove the
sleep 25
command (ill!) - Uncomment the line of either
mpirun
ormpiexec
depending on which command is available to you.
- Remove the
- Create named-pipe files:
$CASERUN/cesm2mymodel.pipe
and$CASERUN/mymodel2cesm.pipe
.
- Run
$CASEROOT/$CASE.run
- Run
julia $SMARTSLABDEV_ROOT/src/CESM_driver/CESM_MLMML/run_CESM_MLMML.jl --config=
$SMARTSLAB_CONFIG`
output_vars
seems to be useless in driver. Maybe I should delete that.