Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page is devoted to instruction in ncremap. It describes steps necessary to create grids, and to regrid datasets between different grids with ncremap. Some of the simpler regridding options supported by ncclimo are also described at Generate, Regrid, and Split Climatologies (climo files) with ncclimo. This page describes those features in more detail, and other, more boutique features often useful for custom regridding solutions.

The Zen of Regridding

Most modern climate/weather-related research requires a regridding step in its workflow. The plethora of geometric and spectral grids on which model and observational data are stored ensures that regridding is usually necessary to scientific insight, especially the focused and variable resolution studies that E3SM models conduct. Why does such a common procedure seem so complex? Because a mind-boggling number of options are required to support advanced regridding features that many users never need. To defer that complexity, this HOWTO begins with solutions to the prototypical regridding problem, without mentioning any other options. It demonstrates how to solve that problem simply, including the minimal software installation required. Once the basic regridding vocabulary has been introduced, we solve the prototype problem when one or more inputs are "missing", or need to be created. The HOWTO ends with descriptions of different regridding modes and workflows that use features customized to particular models, observational datasets, and formats. The overall organization, including TBD sections (suggest others, or vote for prioritizing, below), is:

...

Background and distributed node parallelism (as described above in the the Parallelism section) of MWF-mode are possible though not yet implemented. Please let us know if this feature is desired.

Advanced Regridding V: Generate CMIP6 Timeseries

This section describes the recommended procedures to construct and regrid E3SM timeseries data to CMIP6 specifications. Most models provide data to CMIP6 in timeseries format, meaning one variable-per-file with multiple years per file. These timeseries must be regridded to at least one of the CMIP6 standard grids. The E3SM project chose to supply its v1 experiments to CMIP6 archived on rectangular, uniform (i.e., equiangular in latitude and longitude), one-degree (for standard-resolution) and quarter-degree (for high-resolution) grids. Generating these timeseries from experiments as lengthy as 500 model years, formatted to CMIP6 specifications, requires many non-standard options to both ncclimo (to construct the timeseries) and to ncremap (to regrid timeseries), and is a natural capstone exercise in using both together. This section is arranged in reverse order where first you will see the final actual commands, and then the descriptions, meanings, and reasons for particular options.

The recommended procedures for generating EAM/ELM and MPAS timeseries of the 500-yr DECK pre-industrial simulations for CMIP6 are:

# EAM/ELM:
drc_in='/p/user_pub/work/E3SM/1_0/piControl/1deg_atm_60-30km_ocean/atmos/native/model-output/mon/ens1/v1' # Input directory
drc_out="${DATA}/ne30/clm" # Native grid output directory
drc_rgr="${DATA}/ne30/rgr" # Regridded output directory
drc_tmp='/p/cscratch/acme/zender1/tmp' # Temporary directory for intermediate files
map="${DATA}/maps/map_ne30np4_to_cmip6_180x360_aave.20181001.nc" # Regridding map-file
cmip6_opt='-7 --dfl_lvl=1 --no_cll_msr --no_frm_trm --no_stg_grd' # CMIP6-specific options
spl_opt='--yr_srt=1 --yr_end=500 --ypf=500' # 2D Splitter options
vars='FSNT' # 2D
#spl_opt='--yr_srt=1 --yr_end=500 --ypf=25' # 3D Splitter options
#vars='T' # 3D
export TMPDIR=${drc_tmp};cd ${drc_in};/bin/ls 20180129.DECKv1b_piControl.ne30_oEC.edison.cam.h0.0???-*.nc | ncclimo --var=${vars} ${cmip6_opt} ${spl_opt} --map=${map} --drc_out=${drc_out} --drc_rgr=${drc_rgr} > ~/ncclimo.atm 2>&1 &

# MPAS:
drc_in='/p/user_pub/work/E3SM/1_0/piControl/1deg_atm_60-30km_ocean/ocean/native/model-output/mon/ens1/v1' # Input directory
drc_out="${DATA}/ne30/clm" # Native grid output directory
drc_rgr="${DATA}/ne30/rgr" # Regridded output directory
drc_tmp='/p/cscratch/acme/zender1/tmp' # Temporary/intermediate-file directory
map="${DATA}/maps/map_oEC60to30v3_to_cmip6_180x360_aave.20181001.nc" # Regridding map-file
mpas_opt='-m mpas --d2f' # MPAS-specific options
cmip6_opt='-7 --dfl_lvl=1 --no_cll_msr --no_frm_trm --no_stg_grd' # CMIP6-specific options
spl_opt='--yr_srt=1 --yr_end=500 --ypf=500' # 2D Splitter options
vars='timeMonthly_avg_longWaveHeatFluxUp' # 2D
#spl_opt='--yr_srt=1 --yr_end=500 --ypf=25' # 3D Splitter options
#vars='timeMonthly_avg_activeTracers_temperature' # 3D
export TMPDIR=${drc_tmp};cd ${drc_in};/bin/ls mpaso.hist.am.timeSeriesStatsMonthly.0???-*.nc | ncclimo --var=${vars} ${mpas_opt} ${cmip6_opt} ${spl_opt} --map=${map} --drc_out=${drc_out} --drc_rgr=${drc_rgr} > ~/ncclimo.ocn 2>&1 &

Take a moment to compare the methods for EAM/ELM and for MPAS. They are identical except for the additional MPAS options in ${mpas_opt}. We will return to discuss those soon. Each command-set begins with setting experiment-dependent I/O directories and a map-file. Other experiments will require changing these to the appropriate I/O directories, yet the map-file will remain the same unless the native or destination grid needs to change. The next three or four lines in each command-set configure the splitter and regridder with options many ncclimo/ncremap users have never tried before. Finally the list of input files and all the configuration options are sent to ncclimo. The entire procedure for the user boils down to creating then executing this one splitter (i.e., ncclimo) command for each desired variable. ncclimo will itself call ncremap as necessary.

The first configuration options to discuss are the MPAS-specific options, '-m mpas --d2f'.