The aim is to have a single notebook that runs through setting up a regional mom6 case with a data atmosphere within the CESM framework. A CESM specific library of functions will be written that complements the main package, but makes all of the required CESM changes.
Workflow:
Set up regional-mom6 forcing data and filesystem as usual
Use @alperaltuntas's mom6_bathy tool to create an ESMF grid from the hgrid.nc and bathymetry.nc files generated by regional-mom6
Create a CESM case for a generic mom6 only global run.
Using the new CESM-regional-mom6 tools, modify the CESM case appropriately. This involves:
[x] Put all of the configuration files generated by regional-mom6 into SourceMods/scr.mom folder.
[x] Handle the case of the MOM_layout file. So far this must be copied manually! SourceMods only seems to overwrite files, not introduce new ones
[x] Add a line to MOM_override to point INPUTDIR to the mom6 input files.
[x] Handle the fact that MOM6 within CESM doesn't appear to follow subdirectories, and so can't find things in the forcing folder
[x] Using xmlchange, modify memory to symmetric,
[x] Using xmlchange modify OCN_NX,OCN_NY according to domain size
[x] Using xmlchange modify NTASKS_* to 1 for everything but ocean, and set ocean depending on ocean mask
[x] Using xmlchange modify every MESH except for atmosphere to the newly created ESMF one, as well as the MASK_MESH and MASK_GRID
[x] Using xmlchange modify RUN_REFDATE and RUN_STARTDATE
[x] Calculate what the actual minimum depth is based on the minumum levels parameter in regional-mom6. This value needs to go in the MOM_override to ensure that the ocean_geometry file generated by MOM6 matches the mask table that we generate within the ESMF mesh.
Ultimately, these functions will be used with a modified version of Alper's VisualCaseGen. An example notebook will serve as a test case that we can run CI / workflows on, and could also be used to spin up other regional domains.
The aim is to have a single notebook that runs through setting up a regional mom6 case with a data atmosphere within the CESM framework. A CESM specific library of functions will be written that complements the main package, but makes all of the required CESM changes.
Workflow:
mom6_bathy
tool to create an ESMF grid from thehgrid.nc
andbathymetry.nc
files generated byregional-mom6
CESM-regional-mom6
tools, modify the CESM case appropriately. This involves:regional-mom6
intoSourceMods/scr.mom
folder.MOM_layout
file. So far this must be copied manually! SourceMods only seems to overwrite files, not introduce new onesMOM_override
to pointINPUTDIR
to the mom6 input files.forcing
folderxmlchange
, modify memory to symmetric,xmlchange
modifyOCN_NX
,OCN_NY
according to domain sizexmlchange
modifyNTASKS_*
to 1 for everything but ocean, and set ocean depending on ocean maskxmlchange
modify everyMESH
except for atmosphere to the newly created ESMF one, as well as theMASK_MESH
andMASK_GRID
xmlchange
modifyRUN_REFDATE
andRUN_STARTDATE
regional-mom6
. This value needs to go in theMOM_override
to ensure that theocean_geometry
file generated by MOM6 matches the mask table that we generate within the ESMF mesh.Ultimately, these functions will be used with a modified version of Alper's VisualCaseGen. An example notebook will serve as a test case that we can run CI / workflows on, and could also be used to spin up other regional domains.