...
This prints (among other things):
ncol = 60482 ;
You will need this value for several of the following steps.
Create ESMF mesh file from SCRIP file
...
In the directory with your SCRIP file ($REPO/grids), run (be sure all on one line):
...
Modify the bold text to point to your SCRIP file, grid name, etc.
Can add option --output_data_directory to specify location of final topography file (be sure it already exists).
This can take several hours. (to do: set up to run as a submitted job with qsub)
Generate CTSM (CLM) surface datasets
...
> git clone https://github.com/ESCOMP/CESM.git cesm3_0_beta01
> cd cesm3_0_beta01
> git checkout cesm3_0_beta01
> ./bin/git-fleximod update
Below, <cesm> $CESMCODE refers to yourcesm3_0_beta01 directory.
CCS_CONFIG
1. Add an entry for your new ESMF mesh file in <cesm>/ccs_config/component_grids_nuopc.xml
For this grid:
<domain name="(grid_name)ne0np4.Nanjing.ne30x8">
<nx>(ncol)< <nx>60482</nx> <ny>1</ny>
<mesh>/your_path/(new_grid)_ESMFmesh.nc</mesh>
<desc>(new_grid) <mesh>/glade/work/emmons/tutorial_Nanjing/ne0np4.Nanjing.ne30x8/grids/Nanjing_ne30x8_np4_MESH.nc</mesh>
<desc>ne0np4.Nanjing.ne30x8 is a Spectral Elem 1-deg grid with a 1/NN 8 deg refined region over …east China:</desc>
<support>Test <support>Test support only</support>
< </domain>Include the corresponding number of grid columns in the <nx> argument, and a proper <domain_name>.
2. Add a grid alias entry in <cesm>/ccs_config/modelgrid_aliases_nuopc.xml:
<model_grid alias="ne0ARCTICne30x4ne0Nanjingne30x8_ne0ARCTICne30x4ne0Nanjingne30x8_mt13mt12" not_compset="_POP">
<grid name="atm">ne0np4.ARCTICNanjing.ne30x4<ne30x8</grid>
<grid name="lnd">ne0np4.ARCTICNanjing.ne30x4<ne30x8</grid>
<grid name="ocnice">ne0np4.ARCTICNanjing.ne30x4<ne30x8</grid>
<mask>tx0.1v3</mask>
</model_grid>
...
Set up a CAM case for testing new grid
Create a new case with FHIST compset:
> <cesm>/cime/scripts/create_newcase ...
> cd <case_dir>
> ./xmlchange NTASKS= ___
> ./case.setup
Add to user_nl_cam:
...
On derecho, go to the directory (or create one) for all your CESM cases (in your /glade/u/home/$USER or /glade/work/$USER directory). Create a new case with FHIST compset:
> /glade/work/emmons/cesm_src_derecho/cesm3_0_beta01/cime/scripts/create_newcase --case /glade/work/emmons/tutorial_Nanjing/cases/f.e3beta01.FHIST.Nanjing_ne30x8.01 --res ne0Nanjingne30x8_ne0Nanjingne30x8_mt12 --compset FHIST --run-unsupported --project AACD0004 --pecount 2048
This creates a new directory, $CASEROOT = /glade/work/emmons/tutorial_Nanjing/cases/f.e3beta01.FHIST.Nanjing_ne30x8.01.
> cd $CASEROOT
> ./case.setup
Add to user_nl_cam:
ncdata = '/glade/work/emmons/tutorial_Nanjing/ne0np4.Nanjing.ne30x8/cami-mam4_0000-01-01_ne0np4.Nanjing.ne30x8_L32_c240809.nc'
bnd_topo = '/glade/work/emmons/tutorial_Nanjing/ne0np4.Nanjing.ne30x8/topo/topo/Nanjing_ne30x8_gmted2010_modis_bedmachine_nc3000_Laplace0100_noleak_20240729.nc'
drydep_srf_file = '/glade/work/emmons/tutorial_Nanjing/ne0np4.Nanjing.ne30x8/atmsrf/atmsrf_ne0np4.Nanjing.ne30x8_240809.nc'
se_refined_mesh = .true.
...
se_mesh_file =
...
'/glade/work/emmons/tutorial_Nanjing/ne0np4.Nanjing.ne30x8/grids/Nanjing_ne30x8_EXODUS.nc'
inithist = 'DAILY'
Set the timestep based on recommended value in: https://github.com/ESMCI/Community_Mesh_Generation_Toolkit/blob/master/VRM_tools/Docs/CAM-tsteps-inic-for-newgrids_v0.pdf
./xmlchangeATM_NCPL=XXX384
Add to user_nl_clm
...
nl_clm
fsurdat = '/glade/work/emmons/tutorial_Nanjing/ne0np4.Nanjing.ne30x8/land/surfdata_Nanjing_ne30x8_SSP3-7.0_1979_78pfts_c240809.nc'
flanduse_timeseries = '/glade/work/emmons/tutorial_Nanjing/ne0np4.Nanjing.ne30x8/land/landuse.timeseries_Nanjing_ne30x8_SSP3-7.0_1979-2026_78pfts_c240809.nc'
Add the override flag in your individual case directory to ensure CTSM doesn’t error out due to an unsupported grid:
...
If it does not run, try adjusting parameters, as described in https://github.com/ESMCI/Community_Mesh_Generation_Toolkit/blob/master/VRM_tools/Docs/CAM-tsteps-inic-for-newgrids_v0.pdf
Once it runs, change runs, change the frequency of writing IC files from daily to monthly (in user_nl_cam: inithist = 'MONTHLY') and run a year. Save the final *cam.i.* file to use for future CAM simulations (ncdata in user_nl_cam).
Also, save Save the final CLM restart file (*.clm2.r.*.nc) to use for finidat in user_nl_clm in future runs.
...
You will need to regrid a previous CAM-chem IC file to your grid (to use for ncdata in user_nl_cam). If you have an IC file on a Finite Volume grid (f09) use 'interpic' as shown above. If starting from a file on ne30 grid, use the ncl script at: https://github.com/NCAR/IPT/tree/master/Initial_conditions
Also, regrid emissions and met files to your grid.
...