MAPL_Base
Author: GMAO SI-Team
The module MAPL_Base
provides a collection assorted
utilities and constants used throughout the MAPL Library.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=ESMF_MAXSTR), | public, | parameter | :: | MAPL_BundleItemOrderList | = | 'MAPL_BundleItemOrderList' | |
character(len=ESMF_MAXSTR), | public, | parameter | :: | MAPL_StateItemOrderList | = | 'MAPL_StateItemOrderList' | |
real, | public, | parameter | :: | MAPL_UNDEF | = | 1.0e15 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Field), | intent(inout) | :: | field | |||
integer, | intent(out), | optional | :: | rc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name | |||
type(ESMF_Grid), | intent(inout) | :: | grid | |||
character(len=*), | intent(in) | :: | fieldNames(:) | |||
logical, | intent(in), | optional | :: | is2D(:) | ||
logical, | intent(in), | optional | :: | isEdge(:) | ||
character(len=*), | intent(in), | optional | :: | long_names(:) | ||
character(len=*), | intent(in), | optional | :: | units(:) | ||
integer, | intent(out), | optional | :: | rc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Clock), | intent(in) | :: | CLOCK | |||
integer, | intent(out) | :: | I1 | |||
integer, | intent(out) | :: | I2 | |||
real, | intent(out) | :: | FAC | |||
integer, | intent(out), | optional | :: | RC |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | dim_world | |||
integer, | intent(out) | :: | dim(0:NDEs-1) | |||
integer, | intent(in) | :: | NDEs | |||
class(KeywordEnforcer), | intent(in), | optional | :: | unusable | ||
logical, | intent(in), | optional | :: | symmetric | ||
integer, | intent(in), | optional | :: | min_DE_extent |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Field), | intent(inout) | :: | field | |||
integer, | intent(in) | :: | dims | |||
integer, | intent(in) | :: | location | |||
integer, | intent(in) | :: | typekind | |||
integer, | intent(in) | :: | hw | |||
integer, | intent(in), | optional | :: | ungrid(:) | ||
real, | intent(in), | optional | :: | default_value | ||
integer, | intent(out), | optional | :: | rc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_FieldBundle), | intent(inout) | :: | Bundle | |||
integer, | intent(out), | optional | :: | RC |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Field), | intent(inout) | :: | FROM | |||
type(ESMF_Field), | intent(inout) | :: | TO | |||
integer, | intent(out), | optional | :: | RC |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Field), | intent(inout) | :: | FIELD_IN | |||
type(ESMF_Field), | intent(inout) | :: | FIELD_OUT | |||
integer, | intent(out), | optional | :: | RC |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | NAME | |||
type(ESMF_Grid), | intent(inout) | :: | GRID | |||
integer, | intent(out), | optional | :: | RC |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Field), | intent(in) | :: | field | |||
type(ESMF_Field), | intent(out), | pointer | :: | fields(:) | ||
character(len=*), | intent(in), | optional | :: | aliasName | ||
integer, | intent(out), | optional | :: | rc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Grid), | intent(in) | :: | grid | |||
integer, | intent(out) | :: | I1 | |||
integer, | intent(out) | :: | IN | |||
integer, | intent(out) | :: | J1 | |||
integer, | intent(out) | :: | JN |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | im | ||||
integer | :: | jm | ||||
real, | optional | :: | lon(:) | |||
real, | optional | :: | lat(:) | |||
integer, | optional | :: | xyoffset | |||
character(len=*) | :: | gridname | ||||
logical, | optional | :: | geos_style |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | lon(:) | ||||
real | :: | lat(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_GridComp), | intent(inout) | :: | gc | |||
integer, | intent(out), | optional | :: | rc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | npts | |||
integer, | intent(inout) | :: | II(npts) | |||
integer, | intent(inout) | :: | JJ(npts) | |||
real, | intent(in), | optional | :: | lon(npts) | ||
real, | intent(in), | optional | :: | lat(npts) | ||
real(kind=ESMF_KIND_R8), | intent(in), | optional | :: | lonR8(npts) | ||
real(kind=ESMF_KIND_R8), | intent(in), | optional | :: | latR8(npts) | ||
type(ESMF_Grid), | intent(inout), | optional | :: | Grid | ||
integer, | intent(out), | optional | :: | rc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | npts | |||
integer, | intent(inout) | :: | II(npts) | |||
integer, | intent(inout) | :: | JJ(npts) | |||
real, | intent(in), | optional | :: | lon(npts) | ||
real, | intent(in), | optional | :: | lat(npts) | ||
real(kind=ESMF_KIND_R8), | intent(in), | optional | :: | lonR8(npts) | ||
real(kind=ESMF_KIND_R8), | intent(in), | optional | :: | latR8(npts) | ||
type(ESMF_Grid), | intent(inout), | optional | :: | Grid | ||
integer, | intent(out), | optional | :: | rc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Grid), | intent(inout) | :: | GRID | |||
real(kind=ESMF_KIND_R8), | intent(inout) | :: | gridCornerLons(:,:) | |||
real(kind=ESMF_KIND_R8), | intent(inout) | :: | gridCornerLats(:,:) | |||
integer, | intent(out), | optional | :: | RC |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Grid), | intent(in) | :: | grid | |||
integer, | intent(out) | :: | I1 | |||
integer, | intent(out) | :: | IN | |||
integer, | intent(out) | :: | J1 | |||
integer, | intent(out) | :: | JN |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Time), | intent(in) | :: | TIME0 | |||
type(ESMF_Time), | intent(in) | :: | TIME1 | |||
type(ESMF_Time), | intent(in) | :: | TIME2 | |||
real, | intent(out) | :: | FAC1 | |||
real, | intent(out), | optional | :: | FAC2 | ||
integer, | intent(out), | optional | :: | RC |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | NY |
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.
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.
The ESMF_Config
object Config
, when specified, must
contain the same information as the resource file above.
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)
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
).
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.
Type | Intent | Optional | 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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | nx | |||
integer, | intent(out) | :: | ny | |||
class(KeywordEnforcer), | intent(in), | optional | :: | unusable | ||
integer, | intent(in), | optional | :: | reduceFactor | ||
integer, | intent(out), | optional | :: | rc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | date_time(:) | |||
integer, | intent(in) | :: | yy | |||
integer, | intent(in) | :: | mm | |||
integer, | intent(in) | :: | dd | |||
integer, | intent(in) | :: | h | |||
integer, | intent(in) | :: | m | |||
integer, | intent(in) | :: | s |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | TIME | |||
integer, | intent(in) | :: | IYY | |||
integer, | intent(in) | :: | IMM | |||
integer, | intent(in) | :: | IDD |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | target | :: | A(I1:IM,J1:JM,L1:LM) | ||
integer, | intent(in) | :: | I1 | |||
integer, | intent(in) | :: | IM | |||
integer, | intent(in) | :: | J1 | |||
integer, | intent(in) | :: | JM | |||
integer, | intent(in) | :: | L1 | |||
integer, | intent(in) | :: | LM |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Grid), | intent(inout) | :: | Grid | |||
logical, | intent(out) | :: | stretched | |||
integer, | intent(in) | :: | npts | |||
real, | intent(in), | optional | :: | lon(npts) | ||
real, | intent(in), | optional | :: | lat(npts) | ||
real(kind=ESMF_KIND_R8), | intent(in), | optional | :: | lonR8(npts) | ||
real(kind=ESMF_KIND_R8), | intent(in), | optional | :: | latR8(npts) | ||
real(kind=ESMF_KIND_R8), | intent(out), | optional | :: | lonRe(npts) | ||
real(kind=ESMF_KIND_R8), | intent(out), | optional | :: | latRe(npts) | ||
integer, | intent(out), | optional | :: | rc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str | |||
character(len=*), | intent(in), | optional | :: | del |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | TIMESTRING | |||
integer, | intent(out), | optional | :: | YY | ||
integer, | intent(out), | optional | :: | MM | ||
integer, | intent(out), | optional | :: | DD | ||
integer, | intent(out), | optional | :: | H | ||
integer, | intent(out), | optional | :: | M | ||
integer, | intent(out), | optional | :: | S |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | istring | |||
integer, | intent(out), | optional | :: | rc |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | date_time(:) | |||
integer, | intent(out) | :: | yy | |||
integer, | intent(out) | :: | mm | |||
integer, | intent(out) | :: | dd | |||
integer, | intent(out) | :: | h | |||
integer, | intent(out) | :: | m | |||
integer, | intent(out) | :: | s |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | TIME | |||
integer, | intent(out) | :: | IYY | |||
integer, | intent(out) | :: | IMM | |||
integer, | intent(out) | :: | IDD |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | nymd | ||||
integer | :: | m |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | nsec |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nhms |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | nhhmmss | ||||
integer | :: | nmmdd | ||||
integer | :: | nymd |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | nymd | ||||
integer | :: | nhms | ||||
integer | :: | ndt |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | comm | ||||
integer, | public | :: | rank | ||||
integer, | public | :: | root | ||||
integer, | public | :: | size |