ESMF_CFIOGridMod Module

MODULE: ESMF_CFIOGridMod

Author: GMAO SI-Team

ESMF_CFIOGridMod - Source file for CFIO Grid

The code in this file provides grid data type definitions and interface specifications.

History

  • Feb2007 Baoyu Yin Separated from ESMF_CFIOMod

Uses

  • module~~esmf_cfiogridmod~~UsesGraph module~esmf_cfiogridmod ESMF_CFIOGridMod iso_fortran_env iso_fortran_env module~esmf_cfiogridmod->iso_fortran_env module~esmf_cfioutilmod ESMF_CFIOUtilMod module~esmf_cfiogridmod->module~esmf_cfioutilmod module~esmf_cfioutilmod->iso_fortran_env ESMF_CFIOBaseMod ESMF_CFIOBaseMod module~esmf_cfioutilmod->ESMF_CFIOBaseMod netcdf netcdf module~esmf_cfioutilmod->netcdf

Used by

  • module~~esmf_cfiogridmod~~UsedByGraph module~esmf_cfiogridmod ESMF_CFIOGridMod module~esmf_cfioeosmod ESMF_CFIOEosMod module~esmf_cfioeosmod->module~esmf_cfiogridmod module~esmf_cfiofilemod ESMF_CFIOFileMod module~esmf_cfioeosmod->module~esmf_cfiofilemod module~esmf_cfiovarinfomod ESMF_CFIOVarInfoMod module~esmf_cfioeosmod->module~esmf_cfiovarinfomod module~esmf_cfiofilemod->module~esmf_cfiogridmod module~esmf_cfiofilemod->module~esmf_cfiovarinfomod module~esmf_cfiomod ESMF_CFIOMod module~esmf_cfiomod->module~esmf_cfiogridmod module~esmf_cfiomod->module~esmf_cfiofilemod module~esmf_cfiosdfmod ESMF_CFIOSdfMod module~esmf_cfiomod->module~esmf_cfiosdfmod module~esmf_cfiomod->module~esmf_cfiovarinfomod module~esmf_cfiosdfmod->module~esmf_cfiogridmod module~esmf_cfiosdfmod->module~esmf_cfiofilemod module~esmf_cfiosdfmod->module~esmf_cfiovarinfomod module~esmf_cfiovarinfomod->module~esmf_cfiogridmod program~test test program~test->module~esmf_cfiogridmod program~test->module~esmf_cfiofilemod program~test->module~esmf_cfiomod program~test->module~esmf_cfiosdfmod program~test->module~esmf_cfiovarinfomod program~test~10 test program~test~10->module~esmf_cfiogridmod program~test~10->module~esmf_cfiofilemod program~test~10->module~esmf_cfiomod program~test~10->module~esmf_cfiosdfmod program~test~10->module~esmf_cfiovarinfomod program~test~11 test program~test~11->module~esmf_cfiogridmod program~test~11->module~esmf_cfiofilemod program~test~11->module~esmf_cfiomod program~test~11->module~esmf_cfiosdfmod program~test~11->module~esmf_cfiovarinfomod program~test~12 test program~test~12->module~esmf_cfiogridmod program~test~12->module~esmf_cfiofilemod program~test~12->module~esmf_cfiomod program~test~12->module~esmf_cfiosdfmod program~test~12->module~esmf_cfiovarinfomod program~test~14 test program~test~14->module~esmf_cfiogridmod program~test~14->module~esmf_cfiofilemod program~test~14->module~esmf_cfiomod program~test~14->module~esmf_cfiosdfmod program~test~14->module~esmf_cfiovarinfomod program~test~2 test program~test~2->module~esmf_cfiogridmod program~test~2->module~esmf_cfiofilemod program~test~2->module~esmf_cfiomod program~test~2->module~esmf_cfiosdfmod program~test~2->module~esmf_cfiovarinfomod program~test~3 test program~test~3->module~esmf_cfiogridmod program~test~3->module~esmf_cfiofilemod program~test~3->module~esmf_cfiomod program~test~3->module~esmf_cfiosdfmod program~test~3->module~esmf_cfiovarinfomod program~test~4 test program~test~4->module~esmf_cfiogridmod program~test~4->module~esmf_cfiofilemod program~test~4->module~esmf_cfiomod program~test~4->module~esmf_cfiosdfmod program~test~4->module~esmf_cfiovarinfomod program~test~5 test program~test~5->module~esmf_cfiogridmod program~test~5->module~esmf_cfiofilemod program~test~5->module~esmf_cfiomod program~test~5->module~esmf_cfiosdfmod program~test~5->module~esmf_cfiovarinfomod program~test~7 test program~test~7->module~esmf_cfiogridmod program~test~7->module~esmf_cfiofilemod program~test~7->module~esmf_cfiomod program~test~7->module~esmf_cfiosdfmod program~test~7->module~esmf_cfiovarinfomod program~test~8 test program~test~8->module~esmf_cfiogridmod program~test~8->module~esmf_cfiofilemod program~test~8->module~esmf_cfiomod program~test~8->module~esmf_cfiosdfmod program~test~8->module~esmf_cfiovarinfomod program~test~9 test program~test~9->module~esmf_cfiogridmod program~test~9->module~esmf_cfiofilemod program~test~9->module~esmf_cfiomod program~test~9->module~esmf_cfiosdfmod program~test~9->module~esmf_cfiovarinfomod module~esmf_cfiocollectionmod ESMF_CFIOCollectionMod module~esmf_cfiocollectionmod->module~esmf_cfiofilemod module~esmf_cfiocollectionmod->module~esmf_cfiomod module~esmf_cfioptrvectormod ESMF_CFIOPtrVectorMod module~esmf_cfioptrvectormod->module~esmf_cfiomod module~mapl MAPL module~mapl->module~esmf_cfiomod module~mapl_cfiomod MAPL_CFIOMod module~mapl_cfiomod->module~esmf_cfiofilemod module~mapl_cfiomod->module~esmf_cfiomod module~mapl_extdatagridcompmod MAPL_ExtDataGridCompMod module~mapl_extdatagridcompmod->module~esmf_cfiofilemod module~mapl_extdatagridcompmod->module~esmf_cfiomod program~regrid_util Regrid_Util program~regrid_util->module~esmf_cfiofilemod program~regrid_util->module~esmf_cfiomod program~test~13 test program~test~13->module~esmf_cfiomod program~test~6 test program~test~6->module~esmf_cfiomod program~utcfio utCFIO program~utcfio->module~esmf_cfiomod program~utcfio~3 utCFIO program~utcfio~3->module~esmf_cfiomod program~utdownbit utDownBit program~utdownbit->module~esmf_cfiomod

Derived Types

type, public ::  ESMF_CFIOGrid

Define a new data type “CFIO_Grid” – contains grid information

Components

Type Visibility Attributes Name Initial
character(len=MLEN), public :: coordinate

string to indicate vertical coord
(pressure, sigma, pressure_sigma)

character(len=MLEN), public :: formulaTerm

string for CF formula terms

character(len=MLEN), public :: levUnits

units of level dimension, e.g., “hPa”, “sigma_level”

character(len=MLEN), public :: standardName

string for CF standard name

character(len=MVARLEN), public :: gName

name for this grid

character(len=MVARLEN), public :: ptopUnit

unit of ptop

integer, public :: im

size of longitudinal dimension

integer, public :: jm

size of latitudinal dimension

integer, public :: km

size of vertical dimension

integer, public :: tm

size of time dimension

logical, public :: reduceGrid

support for reduced grid

logical, public :: stnGrid

support for station data

logical, public :: twoDimLat

support 2D lat/lon or not

real(kind=REAL64), public, pointer :: lat(:) => NULL()

latitude of center of gridbox in
degrees north of equator

real(kind=REAL64), public, pointer :: lev(:) => NULL()

Level (units given by levUnits) of
center of gridbox

real(kind=REAL64), public, pointer :: lon(:) => NULL()

longitude of center of gridbox in
degrees east of Greenwich (can be
-180 -> 180 or 0 -> 360)

real, public, pointer :: ak(:) => NULL()

parameter for hybrid sigma prs coord.

real, public, pointer :: bk(:) => NULL()

parameter for hybrid sigma prs coord.

real, public :: ptop

parameter for sigma/eta coordinate

real, public, pointer :: sigma(:) => NULL()

parameter for sigma coordinate


Functions

public function ESMF_CFIOGridCreate(gName, rc)

ESMF_CFIOGridCreate – ESMF_Grid object constructor

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in), optional :: gName

grid object name

integer, intent(out), optional :: rc

Error return code:
0 all is well

Return Value type(ESMF_CFIOGrid)


Subroutines

public subroutine ESMF_CFIOGridDestroy(grid, rc)

ESMF_CFIOGridDestroy – destructor for a CFIO grid object

Arguments

Type IntentOptional Attributes Name
type(ESMF_CFIOGrid), intent(inout) :: grid

CFIOGrid object

integer, intent(out), optional :: rc

Error return code:
0 all is well

public subroutine ESMF_CFIOGridGet(grid, gName, im, jm, km, tm, lat, lon, lev, coordinate, standardName, formulaTerm, levUnit, ak, bk, sigma, ptop, twoDimLat, reduceGrid, stnGrid, rc)

ESMF_CFIOGridGet – get grid info

Arguments

Type IntentOptional 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:
0 all is well
-1 problem in getting lon
-2 problem in getting lat
-3 problem in getting lev

public subroutine ESMF_CFIOGridSet(grid, gName, im, jm, km, tm, lat, lon, lev, coordinate, standardName, formulaTerm, levUnit, ak, bk, sigma, ptop, ptopUnit, lat2, lon2, twoDimLat, reduceGrid, stnGrid, rc)

ESMF_CFIOGridSet – set up a grid

Arguments

Type IntentOptional Attributes Name
type(ESMF_CFIOGrid), intent(inout) :: grid
character(len=*), intent(in), optional :: gName

grid name

integer, intent(in), optional :: im

size of longitudinal dimension

integer, intent(in), optional :: jm

size of latitudinal dimension

integer, intent(in), optional :: km

size of vertical dimension

integer, intent(in), optional :: tm

size of time dimension

real, intent(in), optional :: lat(:)

latitude

real, intent(in), optional :: lon(:)

longitude

real, intent(in), optional :: lev(:)

Level

character(len=*), intent(in), optional :: coordinate

string to indicate vertical coord (pressure, sigma, pressure_sigma)

character(len=*), intent(in), optional :: standardName

string for standard name

character(len=*), intent(in), optional :: formulaTerm

formula terms

character(len=*), intent(in), optional :: levUnit

units of level dimension, e.g., “hPa”.

real, intent(in), optional :: ak(:)

parameter for hybrid sigma prs coord.

real, intent(in), optional :: bk(:)

parameter for hybrid sigma prs coord.

real, intent(in), optional :: sigma(:)

parameter for sigma coordinate

real, intent(in), optional :: ptop

parameter for sigma coordinate

character(len=*), intent(in), optional :: ptopUnit

unit of ptop

real(kind=REAL64), optional, pointer :: lat2(:)

latitude 2d

real(kind=REAL64), optional, pointer :: lon2(:)

longitude 2d

logical, intent(in), optional :: twoDimLat

support 2D lat/lon or not

logical, intent(in), optional :: reduceGrid

support for reduced grid

logical, intent(in), optional :: stnGrid

support for statio grid

integer, intent(out), optional :: rc

Error return code:
0 all is well
-1 Problem in setting lon
-2 Problem in setting lat
-3 Problem in setting lev