About ESMF Download Users Developers Management Work Plans Metrics Impacts
Structured to Structured Sparse Matrix Multiply Use Test Case Description

Use Case Description

This Use Test Case suite consists of two top level drivers:

Both of these programs employ the SparseMatMult routines to remap (or interpolate) a test field from one user specified grid to another. The user must provide three files for the remapping:

All files are assumed to be in netCDF format and use the structure specified by the SCRIP remapping software.
Currently only first order remapping is supported. The following remapping options are available from SCRIP:

See the SCRIP documentation for more details.

Test Description: The SparseMatMul performs simple one-way remapping from the source grid to the destination grid. For this example the grids are assumed to be any sort of single tile, logically rectangular structured grid, which is either regional or global in extent. This qualification includes the both the class of rectilinear as well as curvilinear or "tensor" style grids.

The default configuration remaps a global domain T42 spectral atmospheric grid to a 10 km regional ROMS grid consisting of a Lambert conformal conic projection of the Northeast Pacific bordered by Alaska, Western Canada and the Aleutian peninsula. The files necessary for conducting a second test remapping between a global 4/3 degree Displaced Pole POP grid and a 65 km resolution Mercator grid are also located in the directory. Additional grid and remapping files are available from the SCRIP distribution. They They include the following:

A suite of regional grids are also available upon request. These include:

Once a pair of grids is selected, the remapping weights may be generated using the SCRIP package. The files containing the grid and the remapping weights are specified by the configuration file StrStr_sample.rc as source grid, destination grid, etc. See the readme for a thorough explanation of how to set up the configuration file.

A fortran field is constructed on the source grid whose data is set to the given geometric function:

   A0 + A1 * sin(B1 * latitude) + A2 * cos(B2 * longitude)

where the coefficients A0, A1, A2, B1, and B2 are specified by the config file. The fortran field is remapped using the SparseMatMul routines. These routines ingest the remapping weights and the corresponding list of linking address pairs. The destination field is the result of a weighted sum of source field values, mathematically expressed as:

do k=1,number_link_pairs
  destination_field(address(2,k)) = destination_field(address(2,k)) + weights(k) * &
  source_field(address(1,k))
enddo

The destination field is compared to the analytical solution in order to provide measurement of the accuracy of the remap. Those values are output for each DE.

Applications: This use test case describes how to remap between any two grids that can be expressed as lists of corner and center values. A few real world examples are:

The only limitation is the ability to construct the remapping weights.

Test Results

Test Configuration

Sections

The main program of the test application consists of the following sections.

Initialize

I/O

Inputs the netCDF files containing

Create Arrays

Initialize Test

Construct the test field to be remapped,
   A0 + A1 * sin(B1 * latitude) + A2 * cos(B2 * longitude)
based on namelist coefficients.

Multiply

Check

Destroy