Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add pg2 map file instructions
Warning

  NERSC Directory Change Notice  

Due to project's name change at NERSC from 'ACME' to 'E3SM' and NERSC’s file system update, the directory  '/project/projectdirs/acme/' is now '/cfs/cdirs/e3sm'

...

In order to pass data between different components at runtime, a set of mapping files between each component is generated offline. These mapping files will also be used in Step 4 below (generating domain files).

For "pg2" grids used in E3SM v2, the recommended mapping files are slightly different and still a work in progress.  See Transition to TempestRemap for Atmosphere grids for a discussion of different remap algorithms and when to use each.

TempestRemap and ESMF are the backends that generate the mapping weights, but this is all nicely encapsulated using ncremap. Tempest is the preferred method for creating mapping files.     The ncremap function, calling TempestRemap or ESMF, will decide which of these two tools to use based on the atmospheric input file.  If the *.scrip file was used, then ESMF will be called.  If the *.g file was used, then TempestRemap will be called.   The ESMF tools are adequate for making atmosphere-only-type component sets for E3SM, but this tool is less conservative than TempestRemap.   If you are making grids for a coupled run, then TempestRemap should be used.  

...

where ${ocn_grid}, ${atm_grid}, and ${lnd_grid} are the names of the ocean and atmos grid provided above in the --nm_src and --nm_dst arguments, and ${datestring} is the date string provided above in the --dt_sng argument to ncremap.   The ${method} can be monotr, highorder, mono, intbilin, aave, blin, ndtos, nstod, and patc.  (TODO:  What do all these mean?)   If using the tri-grid option, the land grid files will be created from the ${lnd_grd}.  

For pg2 grids, the ncremap invocations are as follows, using ne30pg2 atmosphere, oEC60to30v3 ocean, and half-degree land grids as examples.

Code Block
atm_grid_file=ne30pg2.g
atm_scrip_grid_file=ne30pg2_scrip.nc
ocn_grid_file=ocean.oEC60to30v3.scrip.181106.nc
lnd_grid_file=SCRIPgrid_0.5x0.5_nomask_c110308.nc

atm_name=ne30pg2
ocn_name=oEC60to30v3
lnd_name=r05

## Conservative, monotone maps.

alg_name=mono

date=200110

function run {
    echo "src $src dst $dst map $map"
    ../compsetfiles/ncremap -a tempest --src_grd=$src --dst_grd=$dst -m $map \
        -W '--in_type fv --in_np 1 --out_type fv --out_np 1 --out_format Classic --correct_areas' \
        $extra
}

extra=""

src=$ocn_grid_file
dst=$atm_grid_file
map="map_${ocn_name}_to_${atm_name}_${alg_name}.${date}.nc"
run

src=$atm_grid_file
dst=$ocn_grid_file
map="map_${atm_name}_to_${ocn_name}_${alg_name}.${date}.nc"
extra=--a2o
run
extra=""

src=$lnd_grid_file
dst=$atm_grid_file
map="map_${lnd_name}_to_${atm_name}_${alg_name}.${date}.nc"
run

src=$atm_grid_file
dst=$lnd_grid_file
map="map_${atm_name}_to_${lnd_name}_${alg_name}.${date}.nc"
run

## Nonconservative, monotone maps.

alg_name=bilin

src=$atm_scrip_grid_file
dst=$lnd_grid_file
map="map_${atm_name}_to_${lnd_name}_${alg_name}.${date}.nc"
ncremap -a bilinear -s $src -g $dst -m $map -W '--extrap_method  nearestidavg'

src=$atm_scrip_grid_file
dst=$ocn_grid_file
map="map_${atm_name}_to_${ocn_name}_${alg_name}.${date}.nc"
ncremap -a bilinear -s $src -g $dst -m $map -W '--extrap_method  nearestidavg'

4. Generate domain files

Domain files are needed by the coupler and the land model at runtime.    The land model uses the mask to determine where to run and the coupler use the land fraction to merge fluxes from multiple surface types to the atmosphere above them.  Domain files are created from the mapping files created in the previous step, using a tool provided with CIME in ${e3sm_root}/cime/tools/mapping/gen_domain_files. This directory contains the source code for the tool (in Fortran 90) and a Makefile.    Cloning E3SM is now required to obtain code within the distribution.   To clone E3SM, 

...

...