ESMF_CFIOGridGet
– get grid info
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIOGrid), | intent(in) | :: | grid |
CFIO grid |
||
character(len=*), | intent(out), | optional | :: | gName |
grid name |
|
integer, | intent(out), | optional | :: | im |
size of longitudinal dimension |
|
integer, | intent(out), | optional | :: | jm |
size of latitudinal dimension |
|
integer, | intent(out), | optional | :: | km |
size of vertical dimension |
|
integer, | intent(out), | optional | :: | tm |
size of time dimension |
|
real, | optional, | pointer | :: | lat(:) |
latitude |
|
real, | optional, | pointer | :: | lon(:) |
longitude |
|
real, | optional, | pointer | :: | lev(:) |
Level |
|
character(len=*), | intent(out), | optional | :: | coordinate |
string to indicate vertical coord (pressure, sigma, pressure_sigma) |
|
character(len=*), | intent(out), | optional | :: | standardName |
string for standard name |
|
character(len=*), | intent(out), | optional | :: | formulaTerm |
formula terms |
|
character(len=*), | intent(out), | optional | :: | levUnit |
units of level dimension, e.g., “hPa”. |
|
real, | intent(out), | optional | :: | ak(:) |
parameter for hybrid sigma prs coord. |
|
real, | intent(out), | optional | :: | bk(:) |
parameter for hybrid sigma prs coord. |
|
real, | intent(out), | optional | :: | sigma(:) |
parameter for sigma coordinate |
|
real, | intent(out), | optional | :: | ptop |
parameter for sigma coordinate |
|
logical, | intent(out), | optional | :: | twoDimLat |
support 2D lat/lon or not |
|
logical, | intent(out), | optional | :: | reduceGrid |
support for reduced grid |
|
logical, | intent(out), | optional | :: | stnGrid |
support for station grid |
|
integer, | intent(out), | optional | :: | rc |
Error return code: |
subroutine ESMF_CFIOGridGet (grid, gName, im, jm, km, tm, lat, lon, lev,& coordinate, standardName, formulaTerm, & levUnit, ak, bk, sigma, ptop, twoDimLat, & reduceGrid, stnGrid, rc) ! ! !INPUT PARAMETERS: ! type(ESMF_CFIOGrid), intent(in) :: grid !! CFIO grid ! !OUTPUT PARAMETERS: ! character(len=*), intent(out), OPTIONAL :: gName !! grid name integer, intent(out), OPTIONAL :: im !! size of longitudinal dimension integer, intent(out), OPTIONAL :: jm !! size of latitudinal dimension integer, intent(out), OPTIONAL :: km !! size of vertical dimension integer, intent(out), OPTIONAL :: tm !! size of time dimension real, pointer, OPTIONAL :: lon(:) !! longitude real, pointer, OPTIONAL :: lat(:) !! latitude real, pointer, OPTIONAL :: lev(:) !! Level character(len=*), intent(out), OPTIONAL :: levUnit !! units of level dimension, e.g., "hPa". character(len=*), intent(out), OPTIONAL :: coordinate !! string to indicate vertical coord !! (pressure, sigma, pressure_sigma) character(len=*), intent(out), OPTIONAL :: standardName !! string for standard name character(len=*), intent(out), OPTIONAL :: formulaTerm !! formula terms real, intent(out), OPTIONAL :: ak(:) !! parameter for hybrid sigma prs coord. real, intent(out), OPTIONAL :: bk(:) !! parameter for hybrid sigma prs coord. real, intent(out), OPTIONAL :: sigma(:) !! parameter for sigma coordinate real, intent(out), OPTIONAL :: ptop !! parameter for sigma coordinate logical, intent(out), OPTIONAL :: twoDimLat !! support 2D lat/lon or not logical, intent(out), OPTIONAL :: reduceGrid !! support for reduced grid logical, intent(out), OPTIONAL :: stnGrid !! support for station grid integer, intent(out), OPTIONAL :: rc !! Error return code: !! 0 all is well !! -1 problem in getting lon !! -2 problem in getting lat !! -3 problem in getting lev ! !------------------------------------------------------------------------------ integer :: rtcode = 0 if ( present(gName) ) gName = grid%gName if ( present(im) ) im = grid%im if ( present(jm) ) jm = grid%jm if ( present(km) ) km = grid%km if ( present(tm) ) tm = grid%tm if ( present(lon) ) then allocate(lon(size(grid%lon)), stat=rtcode) lon = grid%lon if (rtcode .ne. 0) then print *, "problem in getting ESMF_CFIOGridGet:lon" rtcode = -1 if ( present(rc) ) rc = rtcode return end if end if if ( present(lat) ) then allocate(lat(size(grid%lat)), stat=rtcode) lat = grid%lat if (rtcode .ne. 0) then print *, "problem in getting ESMF_CFIOGridGet:lat" rtcode = -2 if ( present(rc) ) rc = rtcode return end if end if if ( present(lev) ) then allocate(lev(size(grid%lev)), stat=rtcode) if (rtcode .ne. 0) then print *, "problem in getting ESMF_CFIOGridGet:lev" rtcode = -3 if ( present(rc) ) rc = rtcode return end if lev = grid%lev end if if ( present(ak) ) then if ( associated(grid%ak) ) then ak = grid%ak else print *, "ak was not defined in the input file" end if end if if ( present(bk) ) then if ( associated(grid%bk) ) then bk = grid%bk else print *, "bk was not defined in the input file" end if end if if ( present(sigma) ) then if ( associated(grid%sigma) ) then sigma = grid%sigma else print *, "sigam was not defined in the input file" end if end if if ( present(ptop) ) then ptop = grid%ptop end if if ( present(twoDimLat) ) then twoDimLat = grid%twoDimLat end if if ( present(reduceGrid) ) then reduceGrid = grid%reduceGrid end if if ( present(standardName) ) standardName = grid%standardName if ( present(coordinate) ) coordinate = grid%coordinate if ( present(formulaTerm) ) formulaTerm = grid%formulaTerm if ( present(levUnit) ) levUnit = grid%levUnits if ( present(stnGrid) ) stnGrid = grid%stnGrid if ( present(rc) ) rc = rtcode end subroutine ESMF_CFIOGridGet