How to Regrid / Remap Data

A page describing what we want in regridders for ACME is at: /wiki/spaces/ATM/pages/20809870. Based on analysis described on /wiki/spaces/ATM/pages/25231711, NCO and UV-CDAT regridders both satisfy these requirements and are suitable for use. The purpose of this page is to describe how to use these regridders. Regridding occurs in 3 steps: first, files containing the grid for the original and target grids are acquired. Second, these grids are used to create a mapping file is obtained which contains the matrix which, when multiplied by an array of input data for some variable, yields the regridded array for that variable.Third, the "acme regridders" create output on the target grid by combining native-grid data and mapping files. These steps are explained in more detail below.

Getting GRID FILES in SCRIP format (if mapping files for your input and target grids already exist, you can ignore this section)

Grid files for the resolutions ACME runs and for the target resolutions we think are appropriate are available at: If you need a login for the ACME inputdata repo, check these instructions: ACME Input Data Repository. Here are the grids we currently support:

  1.  (1 degree CAM-SE grid)

  2.  (1/4 degree CAM-SE grid)

  3.    Similar to T85, but equally spaced (1.4 degrees) points in both latitude/longitude, including points at both poles.  
  4.    Equi-angle lat/lon grid (.70 degrees)
  5.  Equi-angle lat/lon grid (0.225 degrees)

NOTE: Many gridfiles were updated on 20150901 for reasons explained at Why and how to migrate to updated grids and mapfiles


Mapping files for the above grids are available from the ACME inputdata server If you can't find these files on the machine you want to use for regridding, cd to the place you want to store the mapping files and type: "svn export<mapfilename>". You will be asked for the password on the machine you're using. If this isn't the same name as used for your xcams account, just hit enter and it will prompt for your username and xcams password. If you need an xcams account, check these instructions: ACME Input Data Repository. Here are the maps we currently support:

  1.         area averaged (ESMF algorithm) for downsampling 
  2.        bilinear to a finer grid, to preserve all scales
  3.           area averaged (ESMF algorithm) for downsampling 
  4.           bilinear to a finer grid, to preserve all scales

If you need to make your own mapping file, see /wiki/spaces/WORKFLOW/pages/25789319

NOTE: All mapfiles were updated on 20150901 for reasons explained at Why and how to migrate to updated grids and mapfiles

See Known locations of inputdata directory for clues to the possible locations of the mapping files on your machine. In a hurry? Many of the most commonly needed ACME mapping files are in the directory ~zender/data/maps at the major DOE compute centers.

Regridding using UV-CDAT:


Note that the 'latest' version of UV-CDAT on Rhea is recent enough to include needed bugfixes, but other machines probably aren't. Contact the workflow group to clarify whether the version of UV-CDAT is appropriate on the machine you want to use.

Regridding using NCO:

The NCO climo generation script ncclimo will automatically regrid climo files (use the -r switch to specify the desired mapfile). See Generate, Regrid, and Split Climatologies (climo files) with ncclimo for instructions and examples.  To regrid other (e.g., non-climo) files, see NCO ncremap instructions. ncremap automates gridfile and mapfile generation (you must have data files on the source and destination grids). Up-to-date versions of NCO are available on Aims4, Cooley, Cori, Edison, Pileus, Rhea, and Yellowstone, usually in ~zender/[bin,lib]. Follow these instructions to build or install NCO on your own. 

Regridding using NCL:

Regridding using NCL refers to using a NCL script extracted from the AMWG diagnostics package and further tweaked into a general regridder by Mark Taylor.  This ACME NCL-script is much slower than either of the above regridders and its metadata is worse, so we don't recommend its use. However, we did create a confluence page documenting how to use it so I'm including it here for posterity: /wiki/spaces/WORKFLOW/pages/16253082... But in general, don't use this code!