Creating Grids with MAPL Grid Factories - GEOS-ESM/MAPL GitHub Wiki

From an ESMF config file

An ESMF config object can be passed into the a grid factory to create a factory for an ESFM grid. Currently a Lat-Lon, Tripolar, and Cubed-Sphere grids are supported via a factory. The general format in the file is as follows:

grid_identifier.option1
grid_identifier.option2
.
.
.

The grid_identifier is a unique name that is passed as part of the factory interface. The factory searches for entries that are proceeded by the grid_identifier. Then there is a "." that separates the grid identifier from the keywords that are specific to each grid factory. Note each grid factory should have a GRID_TYPE keyword so that the correct grid factory can be invoked if using the MAPL_GridManager to manage multiple grids. GRID_TYPE can have the following values: 'LatLon', 'Cubed-Sphere', and 'Tripolar' The options for each grid factory will be enumerated in the following sections.

Lat-Lon Grid

Note that the Lat-Lon grid factory supports both global grids which span the full 360 degrees in longitude (periodic in this direction) and the full latitude from -90 to 90. In addition the user can create regional lat-lon grids with the LON_RANGE and LAT_RANGE keywords.

* GRIDNAME: the name that will be supplied to the ESMF grid creation
* NX: size of the domain decomposition in the i direction
* NY: size of the domain decomposition in the j direction
* IM_WORLD: global size of the grid in the i direction
* JM_WORLD: global size of the grid in the j direction
* LM: size of the grid in the vertical (note that the ESFM grid is a 2-D, this is simply attached as an attribute for connivence)
* POLE: how to handle the pole, options are 'PE', edge of the grid cell on the pole. 'PC' both the center and edge points are at the pole. 'XY' used for a regional grid 
* DATELINE: how to handle where edge of the grid lies. The options are 'DE' dateline is at the edge of the left-most grid cell, 'DC' dateline is at the center of the left most cell,
'GE' grenwich lies at the edge of the left-most grid cell, 'GC', grenwich lies at center of the left-most grid cell, 'XY' default region grid that is non-periodic in the i-th direction
* LON_RANGE: min and max values of centers when defining a regional grid
* LAT_RANGE: min and max values of centers when defining a regional grid

Tripolar

* GRIDNAME: the name that will be supplied to the ESMF grid creation
* NX: size of the domain decomposition in the i direction
* NY: size of the domain decomposition in the j direction
* IM_WORLD: global size of the grid in the i direction
* JM_WORLD: global size of the grid in the j direction
* LM: size of the grid in the vertical (note that the ESFM grid is a 2-D, this is simply attached as an attribute for connivence)
* GRIDSPEC: name of file containing the coordinates of the tripolar grid

The GRIDSPEC file supported by MAPL is of the following form:

Cubed-Sphere

* GRIDNAME: the name that will be supplied to the ESMF grid creation
* CS_GRID_TYPE: defaults to 0 which is a 6 tile cubed-sphere grid
* NX: decomposition size in x direction on a SINGLE FACE
* NY: decomposition size in y direction on a SINGLE FACE
* LM: see lat-lon and tripolar
* TARGET_LON: target longitude in degrees if creating a "stretched" cubed-sphere grid
* TARGET_LAT: target latitude in degrees if creating a "stretched" cubed-sphere grid
* STRETCH_FACTOR: real number > 1.0 which is stretch factor if creating a "stretched" cubed-sphere grid.  sided