ESMFL_MODAuthor: GMAO SI-Team
The following macro causes a variable to appear to be “used” according to the compiler. This is a kludge to avoid excessive warnings. In most cases, a better fix would be to modify the the procedure interface, but it is impractical in the short term.
Note that the conditional is never satisfied and a reasonable compiler will optimize the line away. (Hopefully without reintroducing the warning!)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | BUN | |||
| type(ESMF_FieldBundle), | intent(inout) | :: | mergedBUN | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | BUN | |||
| type(ESMF_State), | intent(inout) | :: | STA | |||
| integer, | intent(out), | optional | :: | rc |
The recursive subrountine BundleAddState_ adds contents of State to Bundle.
Extracts fields from an ESMF State and adds them to a
ESMF Bundle. In essesence, it serializes an ESMF state
in a flat Bundle. The BUNDLE must have been created prior to calling
this routine.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | BUNDLE | |||
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| integer, | optional | :: | rc | |||
| type(ESMF_Grid), | intent(in), | optional | :: | GRID | ||
| logical, | intent(in), | optional | :: | VALIDATE |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | BUNDLE | |||
| integer, | intent(in) | :: | INDEX | |||
| real, | pointer | :: | PTR(:,:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | BUNDLE | |||
| integer, | intent(in) | :: | INDEX | |||
| real, | pointer | :: | PTR(:,:,:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | BUNDLE | |||
| character(len=*), | intent(in) | :: | NAME | |||
| real, | pointer | :: | PTR(:,:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | BUNDLE | |||
| character(len=*), | intent(in) | :: | NAME | |||
| real, | pointer | :: | PTR(:,:,:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | BUN1 | |||
| type(ESMF_FieldBundle), | intent(inout) | :: | BUN2 | |||
| type(ESMF_FieldBundle), | intent(inout) | :: | mergedBUN | |||
| integer, | intent(out), | optional | :: | rc |
Determine the diff of two state.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | srcSTA | |||
| type(ESMF_State), | intent(inout), | optional | :: | dstSTA | ||
| integer, | intent(out), | optional | :: | rc |
The subroutine BundleDiff determines the diff of two bundles.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | srcBUN | |||
| type(ESMF_FieldBundle), | intent(inout), | optional | :: | dstBUN | ||
| integer, | intent(out), | optional | :: | rc |
return code |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Grid), | intent(in) | :: | GRID | |||
| integer, | intent(inout) | :: | FULLINPUT(:) | |||
| integer, | intent(in) | :: | INPUT(:) | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Grid), | intent(in) | :: | GRID | |||
| real, | intent(inout) | :: | FULLINPUT(:) | |||
| real, | intent(in) | :: | INPUT(:) | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Grid), | intent(in) | :: | GRID | |||
| real(kind=ESMF_KIND_R8), | intent(inout) | :: | FULLINPUT(:) | |||
| real(kind=ESMF_KIND_R8), | intent(in) | :: | INPUT(:) | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(inout) | :: | Field | |||
| real(kind=ESMF_KIND_R4), | pointer | :: | PTR(:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(inout) | :: | Field | |||
| real(kind=ESMF_KIND_R4), | pointer | :: | PTR(:,:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(inout) | :: | Field | |||
| real(kind=ESMF_KIND_R4), | pointer | :: | PTR(:,:,:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(inout) | :: | Field | |||
| real(kind=ESMF_KIND_R4), | pointer | :: | PTR(:,:,:,:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(inout) | :: | Field | |||
| real(kind=ESMF_KIND_R8), | pointer | :: | PTR(:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(inout) | :: | Field | |||
| real(kind=ESMF_KIND_R8), | pointer | :: | PTR(:,:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(inout) | :: | Field | |||
| real(kind=ESMF_KIND_R8), | pointer | :: | PTR(:,:,:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(inout) | :: | Field | |||
| real(kind=ESMF_KIND_R8), | pointer | :: | PTR(:,:,:,:) | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Grid), | intent(inout) | :: | GRID | |||
| real, | intent(inout) | :: | INPUT(:,:) | |||
| integer, | intent(out), | optional | :: | RC |
The subroutine BundleRegrid
regrids a source bundle (srcBUN) into a destination bundle (dstBUN)
using hinterp. A bundle is thought of as being comprised of n 2D
slices (nslices) distributed among the n PEs (ns_per_pe). The
limits among each ns_per_pe region are given by n1 and n2 which
are functions of mype (the local PE):
slice_pe
1 --- n1(pe=0) - --> 0
2 --- | --> 0
. |_ ns_per_pe(pe=0) .
. | 0
. | 0
--- n2(pe=0) - 0
--- n1(pe=1) 1
. .
. .
. .
--- n2(pe=1) 1
--- n1(pe=2) 2
. .
. .
. .
ns --- slice_pe(ns)
. .
. .
. .
nslices --- n2(pe=n) --> npe
Each slice is gathered, regridded (hinterp), and scattered on a PE determined by a slice-to-PE map (slice_pe) to “load balance” the work of the serial hinterp function.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | srcBUN |
source bundle |
||
| type(ESMF_FieldBundle), | intent(inout) | :: | dstBUN |
destination bundle |
||
| integer, | intent(out), | optional | :: | rc |
return code |
The subroutine StateRegrid regrids a state.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | srcSTA | |||
| type(ESMF_State), | intent(inout) | :: | dstSTA | |||
| integer, | intent(out), | optional | :: | rc |
return code |
The subroutine FieldRegrid1 regrids 3D fields using ESMF_FieldRegrid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(in) | :: | srcFLD | |||
| type(ESMF_Grid), | intent(in) | :: | Sgrid2D | |||
| type(ESMF_Field), | intent(inout) | :: | dstFLD | |||
| type(ESMF_Grid), | intent(in) | :: | Dgrid2D | |||
| type(ESMF_VM), | intent(inout) | :: | vm | |||
| type(ESMF_RouteHandle), | intent(inout) | :: | rh | |||
| character(len=*), | intent(in) | :: | fname | |||
| integer, | intent(out), | optional | :: | rc |
The subroutine BundleRegrid1
regrids members of a bundle using ESMF_FieldRegrid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | srcBUN | |||
| type(ESMF_Grid), | intent(in) | :: | Sgrid2D | |||
| type(ESMF_FieldBundle), | intent(inout) | :: | dstBUN | |||
| type(ESMF_Grid), | intent(in) | :: | Dgrid2D | |||
| type(ESMF_VM), | intent(inout) | :: | vm | |||
| type(ESMF_RouteHandle), | intent(inout) | :: | rh | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STA | |||
| type(ESMF_FieldBundle), | intent(inout) | :: | BUN | |||
| character(len=*), | intent(in), | optional | :: | usrfldlist | ||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| real(kind=ESMF_KIND_R4), | pointer | :: | PTR(:) | |||
| character(len=*), | intent(in) | :: | NAME | |||
| logical, | intent(in), | optional | :: | alloc | ||
| logical, | intent(in), | optional | :: | notFoundOK | ||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| real(kind=ESMF_KIND_R4), | pointer | :: | PTR(:,:) | |||
| character(len=*), | intent(in) | :: | NAME | |||
| logical, | intent(in), | optional | :: | alloc | ||
| logical, | intent(in), | optional | :: | notFoundOK | ||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| real(kind=ESMF_KIND_R4), | pointer | :: | PTR(:,:,:) | |||
| character(len=*), | intent(in) | :: | NAME | |||
| logical, | intent(in), | optional | :: | alloc | ||
| logical, | intent(in), | optional | :: | notFoundOK | ||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| real(kind=ESMF_KIND_R4), | pointer | :: | PTR(:,:,:,:) | |||
| character(len=*), | intent(in) | :: | NAME | |||
| logical, | intent(in), | optional | :: | alloc | ||
| logical, | intent(in), | optional | :: | notFoundOK | ||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| real(kind=ESMF_KIND_R8), | pointer | :: | PTR(:) | |||
| character(len=*), | intent(in) | :: | NAME | |||
| logical, | intent(in), | optional | :: | alloc | ||
| logical, | intent(in), | optional | :: | notFoundOK | ||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| real(kind=ESMF_KIND_R8), | pointer | :: | PTR(:,:) | |||
| character(len=*), | intent(in) | :: | NAME | |||
| logical, | intent(in), | optional | :: | alloc | ||
| logical, | intent(in), | optional | :: | notFoundOK | ||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| real(kind=ESMF_KIND_R8), | pointer | :: | PTR(:,:,:) | |||
| character(len=*), | intent(in) | :: | NAME | |||
| logical, | intent(in), | optional | :: | alloc | ||
| logical, | intent(in), | optional | :: | notFoundOK | ||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| real(kind=ESMF_KIND_R8), | pointer | :: | PTR(:,:,:,:) | |||
| character(len=*), | intent(in) | :: | NAME | |||
| logical, | intent(in), | optional | :: | alloc | ||
| logical, | intent(in), | optional | :: | notFoundOK | ||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | srcSTA | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | srcBUN | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=REAL64), | intent(out) | :: | qave | |||
| real, | intent(in) | :: | q(:,:) | |||
| real, | intent(in) | :: | area(:,:) | |||
| type(ESMF_Grid), | intent(inout) | :: | grid | |||
| logical, | intent(in) | :: | bitreproducible | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=REAL64), | intent(out) | :: | qave | |||
| real, | intent(in) | :: | q(:,:) | |||
| real, | intent(in) | :: | area(:,:) | |||
| type(ESMF_Grid), | intent(inout) | :: | grid | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| character(len=*), | intent(in) | :: | NAME | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(in) | :: | field | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_FieldBundle), | intent(inout) | :: | BUNDLE | |||
| type(ESMF_Field), | intent(inout) | :: | FIELD | |||
| character(len=ESMF_MAXSTR), | intent(in), | optional | :: | NAME | ||
| integer, | intent(out), | optional | :: | RC |
The subroutine ESMFL_FieldGetDims
returns some grid information associated from an ESMF field.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(inout) | :: | FLD | |||
| integer, | intent(out), | optional | :: | gCPD(3) | ||
| integer, | intent(out), | optional | :: | lCPD(3) | ||
| integer, | intent(out), | optional | :: | lm | ||
| integer, | intent(out), | optional | :: | ar |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field) | :: | src | ||||
| type(ESMF_Field) | :: | dst | ||||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Grid), | intent(inout) | :: | GRID | |||
| real, | dimension(:,:), pointer | :: | coord | |||
| character(len=*), | intent(in) | :: | name | |||
| type(ESMF_StaggerLoc) | :: | location | ||||
| integer | :: | units | ||||
| integer, | optional | :: | rc |
ESMFL_GridDistBlockSet …
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Grid), | intent(inout) | :: | Egrid | |||
| integer, | intent(in), | dimension(:) | :: | ist | ||
| integer, | intent(in), | dimension(:) | :: | jst | ||
| integer, | intent(in), | dimension(:) | :: | il | ||
| integer, | intent(in), | dimension(:) | :: | jl | ||
| real(kind=REAL64), | optional, | dimension(:) | :: | rlons | ||
| real(kind=REAL64), | optional, | dimension(:) | :: | rlats | ||
| integer, | intent(out), | optional | :: | rc |
return code |
Given a srcFLD and its associated 3dGrid and a dstFLD and its associated
3DGrid, the subroutine ESMFL_RegridStore creates their corresponding
2DGrids and a 2D routehandle.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_Field), | intent(inout) | :: | srcFLD | |||
| type(ESMF_Grid), | intent(out) | :: | SRCgrid2D | |||
| type(ESMF_Field), | intent(inout) | :: | dstFLD | |||
| type(ESMF_Grid), | intent(out) | :: | DSTgrid2D | |||
| type(ESMF_VM), | intent(in) | :: | vm | |||
| type(ESMF_RouteHandle), | intent(inout) | :: | rh | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| integer, | intent(out), | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(in) | :: | State | |||
| character(len=*), | intent(in) | :: | FieldName(:) | |||
| type(ESMF_FieldBundle), | intent(inout) | :: | Bundle | |||
| character(len=*), | intent(in), | optional | :: | FieldAlias(:) | ||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(in) | :: | state | |||
| character(len=*), | intent(in) | :: | name | |||
| type(ESMF_Array), | intent(out) | :: | array | |||
| integer, | intent(out), | optional | :: | rc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ESMF_State), | intent(inout) | :: | STATE | |||
| character(len=*), | intent(in) | :: | NAME | |||
| integer, | intent(out), | optional | :: | RC |