Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update topo run instructions

These instructions are specifically for NCAR computers derecho and casper.

The following steps describe creating a new grid and using it in a beta version of CESM3.  Instructions for CESM2.2 are available in the step-by-step guide.

...

> cd ${VRM_tools}/VRM_Editor/src
> module load gcc/12.2.0 
> module load ncarenv/23.10
> qmake VRM_Editor.pro
> make

Running "make" produces a lot of warning messages; that’s ok.  For Linux users, with the Qt and netCDF packages installed, building the editor should be as simple as for Casper.

Correct the file Create_VRMgrid.cpp:

Change:

       CommandLineDouble (MyGridYRotate       ,"x_rotate"      ,0.0);

To: 

       CommandLineDouble (MyGridYRotate       ,"y_rotate"      ,0.0);

Build Create_VRMgrid on Casper: 

...

> gmake -f Makefile clean
> gmake -f Makefile

Put It is best to put the following in a script or be sure entire command is on one linetext file (e.g., called 'run_topo.sh') to run as a script:

> qcmd -l walltime=12:00:00 -l select=1:ncpus=1 -- ./cube_to_target --rrfac_manipulation
--grid_descriptor_file='/glade/work/emmons/tutorial_Nanjing/ne0np4.Nanjing.ne30x8/grids/Nanjing_ne30x8_np4_SCRIP.nc'
--intermediate_cs_name='/glade/campaign/cgd/amp/pel/topo/cubedata/gmted2010_modis_bedmachine-ncube3000-220518.nc'
--output_grid='Nanjing_ne30x8' --rrfac_max=8 --smoothing_scale=100.0 -u 'Louisa Emmons, emmons@ucar.edu' > out_Nanjing

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 the directory already exists).

This can take several hours.  , so run the script in the background:

> nohup ./run_topo.sh &

Generate CTSM (CLM) surface datasets

On derecho, use CTSM5.2 3 source code to create the needed surfdata and landuse_timeseries files. (Latest tag is good to use, as of 1/25/25 it is ctsm5.3.020).

> git clone https://github.com/ESCOMP/CTSM ctsm5.2.0073
> cd ctsm5.2.0073
> git checkout ctsm5.23.0070
> bin/git-fleximod update

...

Run the make namelist script (modify the bold text for your resolution, MESH file and your ncol for model-mesh-nx)

(npl) > /glade/work/emmons/cesm_src_derecho/ctsm5.2.007/tools/mksurfdata_esmf/gen_mksurfdata_namelist --res Nanjingres Nanjing_ne30x8 --start-year 1979 --end-year 2026 --ssp-rcp SSP3-7.0 --model-mesh /glade/work/emmons/tutorial_Nanjing/ne0np4.Nanjing.ne30x8/grids/Nanjing_ne30x8_np4_MESH.nc --model-mesh-nx 60482 --model-mesh-ny 1

This creates files like: landuse_timeseries_SSP3-7.0_1979-2026_78pfts.txt and surfdata_Nanjing_ne30x8_SSP3-7.0_1979_78pfts_c240809.namelist.

...

Anchor
Add grid to CESM
Add grid to CESM
Set up CESM3 with new grid

On Updated June 2025: On derecho, checkout a CESM3 beta tag (that uses ctsm5.2).  It is recommended the source code is cloned into your work (or scratch, if necessary; you might run out of space in home) directory where sufficient storage is available. CESM3 has replaced manage_externals with git-fleximod, which requires the following commands:

...

Below, $CESMCODE refers to yourcesm3_0_beta01 directory directory.

CCS_CONFIG

1. Add an entry for your new ESMF mesh file in <cesm>/ccs_config/component_grids_nuopc.xml

...

./xmlchange SSTICE_DATA_FILENAME='/glade/p/cesmdata/inputdata/atm/cam/sst/sst_HadOIBl_bc_1x1_1850_2021_c141021.nc'
./xmlchange SSTICE_YEAR_END=2021

OR

./xmlchange SSTICE_DATA_FILENAME='/glade/campaign/cgd/cas/asphilli/cam_input_data/sst_COBE-SST2_bc_0.9x1.25_1850_2024_c250627.nc'
./xmlchange SSTICE_YEAR_END=2024
./xmlchange SSTICE_MESH_FILENAME='/glade/campaign/cesm/cesmdata/inputdata/share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc'

NOTE: Model will regrid SST file to model grid, but the SSTICE_MESH file must match the grid of the SST file!

Using existing Nanjing_ne30x8 grid files

...