MAPL_LatLonGridCreate Interface

interface
public module function MAPL_LatLonGridCreate(Name, VM, Config, ConfigFile, Nx, Ny, IM_World, BegLon, DelLon, JM_World, BegLat, DelLat, LM_World, rc) result(Grid)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: Name
type(ESMF_VM), intent(in), optional, target :: VM
type(ESMF_Config), intent(in), optional, target :: Config
character(len=*), intent(in), optional :: ConfigFile
integer, intent(in), optional :: Nx
integer, intent(in), optional :: Ny
integer, intent(in), optional :: IM_World
real, intent(in), optional :: BegLon
real, intent(in), optional :: DelLon
integer, intent(in), optional :: JM_World
real, intent(in), optional :: BegLat
real, intent(in), optional :: DelLat
integer, intent(in), optional :: LM_World
integer, intent(out), optional :: rc

Return Value type(ESMF_Grid)

Description

MAPL_LatLonGridCreate — Create regular Lat/Lon Grid

This routine creates a distributed ESMF grid where the horizontal coordinates are regular longitudes and latitudes. The grid is created on the user specified VM, or on the current VM if the user does not specify one. The layout and the coordinate information can be provided with a `ESMF_Config attribute, a resource file name or specified through the argument list.

Using resource files

The resource file has a syntax similar to a GrADS control file. Here is an example defining a typical GEOS-5 1x1.25 grid with 72 layers:

       GDEF: LatLon
       IDEF: 32
       JDEF: 16
       LDEF:  1
       XDEF: 288 LINEAR -180. 1.25
       YDEF: 181 LINEAR -90. 1.
       ZDEF:  72 LINEAR 1 1

More generally,

       GDEF: LatLon
       IDEF: Nx
       JDEF: Ny
       LDEF: Nz
       XDEF: IM_World XCoordType BegLon, DelLon
       YDEF: JM_World YCoordType BegLat, DelLat
       ZDEF: LM_World ZCoordType 1        1

The attribute GDEF must always be LatLon for Lat/Lon grids. The remaining parameters are: - Nx is the number of processors used to decompose the X dimension - Ny is the number of processors used to decompose the Y dimension - Nz is the number of processors used to decompose the Z dimension; must be 1 for now. - IM_World is the number of longitudinal grid points; if IM_World=0 then the grid has no zonal dimension. - XCoordType must be set to LINEAR - BegLon is the longitude (in degrees) of the {\em center} of the first gridbox - DelLon is the constant mesh size (in degrees); if DelLon<1 then a global grid is assumed. - JM_World is the number of meridional grid points; if JM_World=0 then the grid has no meridional dimension. - YCoordType must be set to LINEAR - BegLat s the latitude (in degrees) of the center of the first gridbox - DelLat s the constant mesh size (in degrees); if DelLat<1 then a global grid is assumed. - LM_World is the number of vertical grid points; LM_World=0 then the grid has no vertical dimension.

As of this writing, only the size of the vertical grid LM_World needs to be specified.

Passing an ESMF Config

The ESMF_Config object Config, when specified, must contain the same information as the resource file above.

Providing parameters explicitly through the argument list

Alternatively, one can specify coordinate information in the argument list; their units and meaning is as in the resource file above. In this case you must specify at least Nx, Ny, IM_World, JM_World, and LM_World. The other parameters have default values - BegLon defaults to -180. (the date line) - DelLon defaults to -1. (meaning a global grid) - BegLat defaults to -90. (the south pole) - DelLat deaults to -1. (meaning a global grid)

Restrictions

The current implementation imposes the following restrictions: 1. Only uniform longitude/latitude grids are supported (no Gaussian grids). 2. Only 2D Lon-Lat or 3D Lon-Lat-Lev grids are currently supported (no Lat-Lev or Lon-Lev grids supprted yet). 3. No vertical decomposition yet (Nz=1).

Future enhancements

The IDEF/JDEF/LDEF records in the resource file should be extended as to allow specification of a more general distribution. For consistency with the XDEF/YDEF/ZDEF records a similar syntax could be adopted. For example,

       IDEF 4   LEVELS  22 50 50 22
       XDEF 144 LINEAR -180 2.5

would indicate that longitudes would be decomposed in 4 PETs, with the first PET having 22 grid points, the second 50 gridpoints, and so on.