ESMF_CFIOVarInfoMod Module

MODULE: ESMF_CFIOVarInfoMod

Author: GMAO SI-Team

ESMF_CFIOVarInfoMod - Source file for CFIO VarInfo

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

History

  • Feb2007 Yin Separated from ESMF_CFIOMod

Uses

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

Used by

  • module~~esmf_cfiovarinfomod~~UsedByGraph module~esmf_cfiovarinfomod ESMF_CFIOVarInfoMod module~esmf_cfioeosmod ESMF_CFIOEosMod module~esmf_cfioeosmod->module~esmf_cfiovarinfomod module~esmf_cfiofilemod ESMF_CFIOFileMod module~esmf_cfioeosmod->module~esmf_cfiofilemod module~esmf_cfiofilemod->module~esmf_cfiovarinfomod module~esmf_cfiomod ESMF_CFIOMod module~esmf_cfiomod->module~esmf_cfiovarinfomod module~esmf_cfiomod->module~esmf_cfiofilemod module~esmf_cfiosdfmod ESMF_CFIOSdfMod module~esmf_cfiomod->module~esmf_cfiosdfmod module~esmf_cfiosdfmod->module~esmf_cfiovarinfomod module~esmf_cfiosdfmod->module~esmf_cfiofilemod program~test test program~test->module~esmf_cfiovarinfomod program~test->module~esmf_cfiofilemod program~test->module~esmf_cfiomod program~test->module~esmf_cfiosdfmod program~test~10 test program~test~10->module~esmf_cfiovarinfomod program~test~10->module~esmf_cfiofilemod program~test~10->module~esmf_cfiomod program~test~10->module~esmf_cfiosdfmod program~test~11 test program~test~11->module~esmf_cfiovarinfomod program~test~11->module~esmf_cfiofilemod program~test~11->module~esmf_cfiomod program~test~11->module~esmf_cfiosdfmod program~test~12 test program~test~12->module~esmf_cfiovarinfomod program~test~12->module~esmf_cfiofilemod program~test~12->module~esmf_cfiomod program~test~12->module~esmf_cfiosdfmod program~test~14 test program~test~14->module~esmf_cfiovarinfomod program~test~14->module~esmf_cfiofilemod program~test~14->module~esmf_cfiomod program~test~14->module~esmf_cfiosdfmod program~test~2 test program~test~2->module~esmf_cfiovarinfomod program~test~2->module~esmf_cfiofilemod program~test~2->module~esmf_cfiomod program~test~2->module~esmf_cfiosdfmod program~test~3 test program~test~3->module~esmf_cfiovarinfomod program~test~3->module~esmf_cfiofilemod program~test~3->module~esmf_cfiomod program~test~3->module~esmf_cfiosdfmod program~test~4 test program~test~4->module~esmf_cfiovarinfomod program~test~4->module~esmf_cfiofilemod program~test~4->module~esmf_cfiomod program~test~4->module~esmf_cfiosdfmod program~test~5 test program~test~5->module~esmf_cfiovarinfomod program~test~5->module~esmf_cfiofilemod program~test~5->module~esmf_cfiomod program~test~5->module~esmf_cfiosdfmod program~test~7 test program~test~7->module~esmf_cfiovarinfomod program~test~7->module~esmf_cfiofilemod program~test~7->module~esmf_cfiomod program~test~7->module~esmf_cfiosdfmod program~test~8 test program~test~8->module~esmf_cfiovarinfomod program~test~8->module~esmf_cfiofilemod program~test~8->module~esmf_cfiomod program~test~8->module~esmf_cfiosdfmod program~test~9 test program~test~9->module~esmf_cfiovarinfomod program~test~9->module~esmf_cfiofilemod program~test~9->module~esmf_cfiomod program~test~9->module~esmf_cfiosdfmod 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_CFIOVarInfo

Define a new data type “CFIO_VarInfo” – contains variable information

Components

Type Visibility Attributes Name Initial
character(len=1), public :: aveMethod

‘c’ for center averaging for time
[-0.5timeInc+time, 0.5timeInc+time]
Default: ‘c’
‘d’ for downstream averaging
[time, time+timeInc]
‘u’ for upstream averaging
[time-timeInc, time]

character(len=MLEN), public, pointer :: attCharNames(:) => NULL()

char attribute name

character(len=MLEN), public, pointer :: attIntNames(:) => NULL()

int attribute name

character(len=MLEN), public, pointer :: attRealNames(:) => NULL()

Real attribute name

character(len=MLEN), public :: standardName

optional, standard name following CF convention

character(len=MLEN), public :: vTitle

variable long name, e.g., “Geopotential Height”

character(len=MLEN), public, pointer :: varAttChars(:) => NULL()
character(len=MVARLEN), public :: cellMthd

Cell methmod

character(len=MVARLEN), public :: ordering

(time, lev, lat, lon) (default) can be any combination of xyzt

character(len=MVARLEN), public :: vName

variable short name

character(len=MVARLEN), public :: vUnits

variable units, e.g., “meter/second”

integer, public, pointer :: ChunkSize(:) => NULL()

ChunkSize for each variable

integer, public, pointer :: attCharCnts(:) => NULL()

length of char attributes

integer, public, pointer :: attIntCnts(:) => NULL()

length of int attributes

integer, public, pointer :: attRealCnts(:) => NULL()

length of real attributes

integer, public :: nVarAttChar

number of variable char attributes

integer, public :: nVarAttInt

number of variable int attributes

integer, public :: nVarAttReal

number of variable real attributes

integer, public, pointer :: varAttInts(:,:) => NULL()

User defined integer attributes

logical, public :: isGridSet

True only if grid was passed in

logical, public :: timAve

True for time averaging file

logical, public :: twoDimVar

True for 2D; false for 3D

real, public :: addOffSet

optional

real, public :: amiss

Missing value such as 1.0E15

real, public :: packingRange(2)
real, public :: scaleFactor

optional

real, public :: validRange(2)

Variable valid range

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

User defined real attributes

type(ESMF_CFIOGrid), public :: grid

grid used for this var

type(cNode), public, pointer :: cList => NULL()
type(iNode), public, pointer :: iList => NULL()
type(rNode), public, pointer :: rList => NULL()

Functions

public function ESMF_CFIOVarInfoCreate(vName, rc)

ESMF_CFIOVarInfoCreate – ESMF_CFIOVarInfo object constructor

Read more…

Arguments

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

variable name

integer, intent(out), optional :: rc

Error return code:
0 all is well
-1 problem in creating Grid

Return Value type(ESMF_CFIOVarInfo)


Subroutines

public subroutine ESMF_CFIOVarInfoDestroy(varObj, rc)

ESMF_CFIOVarInfoDestroy – destructor for a CFIO varInfo object

Arguments

Type IntentOptional Attributes Name
type(ESMF_CFIOVarInfo), intent(inout) :: varObj

CFIOVarInfo object

integer, intent(out), optional :: rc

Error return code:
0 all is well

public subroutine ESMF_CFIOVarInfoGet(varObj, vName, grid, vTitle, vUnits, twoDimVar, validRange, amiss, addOffSet, scaleFactor, standardName, nVarAttChar, attCharNames, vAttCharCnts, varAttChars, nVarAttReal, attRealNames, vAttRealCnts, varAttReals, nVarAttInt, attIntNames, vAttIntCnts, varAttInts, ordering, attCharName, attCharCnt, attChar, attRealName, attRealCnt, attReal, attIntName, attIntCnt, attInt, packingRange, timAve, aveMethod, cellMthd, ChunkSize, rc)

ESMF_CFIOVarInfoGet – get information from a CFIO variable object

Arguments

Type IntentOptional Attributes Name
type(ESMF_CFIOVarInfo), intent(in) :: varObj

variable obj

character(len=*), intent(out), optional :: vName

variable short name

type(ESMF_CFIOGrid), intent(out), optional :: grid

grid

character(len=*), intent(out), optional :: vTitle

variable long name

character(len=*), intent(out), optional :: vUnits

variable units

logical, optional :: twoDimVar

True for 2D

real, intent(out), optional :: validRange(2)

Variable valid range

real, intent(out), optional :: amiss

FILL value

real, intent(out), optional :: addOffSet
real, intent(out), optional :: scaleFactor
character(len=*), intent(out), optional :: standardName
integer, intent(out), optional :: nVarAttChar
character(len=*), optional, pointer :: attCharNames(:)
integer, optional, pointer :: vAttCharCnts(:)

length of attributes

character(len=*), optional, pointer :: varAttChars(:)
integer, intent(out), optional :: nVarAttReal
character(len=*), optional, pointer :: attRealNames(:)
integer, optional, pointer :: vAttRealCnts(:)

length of attributes

real, optional, pointer :: varAttReals(:,:)
integer, intent(out), optional :: nVarAttInt
character(len=*), optional, pointer :: attIntNames(:)
integer, optional, pointer :: vAttIntCnts(:)

length of attributes

integer, optional, pointer :: varAttInts(:,:)
character(len=*), optional :: ordering

(time, lev, lat, lon) (default) can be any combination of xyzt

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

User defined char attribute name

integer, intent(out), optional :: attCharCnt
character(len=*), intent(out), optional :: attChar

User defined char attribute

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

User defined real attribute name

integer, intent(out), optional :: attRealCnt
real, optional, pointer :: attReal(:)

User defined real attribute

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

User defined int attribute name

integer, intent(out), optional :: attIntCnt
integer, optional, pointer :: attInt(:)

User defined int attribute

real, intent(out), optional :: packingRange(2)
logical, optional :: timAve

True for time average

character(len=1), optional :: aveMethod

‘c’: center, ‘d’: downstream ‘u’: upstream

character(len=MVARLEN), optional :: cellMthd

Cell methmod units

integer, optional, pointer :: ChunkSize(:)

User defined Chunksize int

integer, intent(out), optional :: rc

Error return code:
0 all is well
-1 Allocation for attCharNames failed
-2 Allocation for attRealNames failed
-3 Allocation for attIntNames failed
-4 Allocation for vAttCharCnts failed
-5 Allocation for vAttRealCnts failed
-6 Allocation for vAttIntCnts failed
-7 Allocation for varAttChars failed
-8 Allocation for varAttReals failed
-9 Allocation for varAttInts failed

public subroutine ESMF_CFIOVarInfoSet(varObj, vName, grid, vTitle, vUnits, twoDimVar, validRange, amiss, addOffSet, scaleFactor, standardName, attCharNames, vAttCharCnts, varAttChars, attRealNames, vAttRealCnts, varAttReals, attIntNames, vAttIntCnts, varAttInts, ordering, attCharName, attChar, attRealName, attReal, attIntName, attInt, packingRange, timAve, aveMethod, cellMthd, ChunkSize, rc)

ESMF_CFIOVarInfoSet – Set meta data for a CFIO variable

Arguments

Type IntentOptional Attributes Name
type(ESMF_CFIOVarInfo), intent(inout) :: varObj

variable obj

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

variable name

type(ESMF_CFIOGrid), intent(in), optional :: grid

grid

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

variable long name

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

variable units

logical, optional :: twoDimVar

True for 2D

real, intent(in), optional :: validRange(2)

Variable valid range

real, intent(in), optional :: amiss

FILL value

real, intent(in), optional :: addOffSet
real, intent(in), optional :: scaleFactor
character(len=*), intent(in), optional :: standardName
character(len=*), intent(in), optional :: attCharNames(:)
integer, intent(in), optional :: vAttCharCnts(:)

length of attributes

character(len=*), intent(in), optional :: varAttChars(:)
character(len=*), intent(in), optional :: attRealNames(:)
integer, intent(in), optional :: vAttRealCnts(:)

length of attributes

real, intent(in), optional :: varAttReals(:,:)
character(len=*), intent(in), optional :: attIntNames(:)
integer, intent(in), optional :: vAttIntCnts(:)

length of attributes

integer, intent(in), optional :: varAttInts(:,:)
character(len=*), optional :: ordering

(time, lev, lat, lon) (default) can be any combination of xyzt

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

User defined variable attribute name

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

User defined variable char attribute

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

User defined variable real attribute name

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

User defined variable real attribute

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

User defined variable int attribute name

integer, intent(in), optional :: attInt(:)

User defined variable int attribute

real, intent(in), optional :: packingRange(2)

Variable valid range

logical, optional :: timAve

True for time average

character(len=1), optional :: aveMethod

‘c’: center, ‘d’: downstream ‘u’: upstream

character(len=*), optional :: cellMthd

Cell methmod units

integer, intent(in), optional :: ChunkSize(:)

User defined Chunksize int

integer, intent(out), optional :: rc

0 all is well
-1 Allocation for attCharCnts failed
-2 Allocation for attRealCnts failed
-3 Allocation for attIntCnts failed
-4 Allocation for varAttChars failed
-5 Allocation for varAttReals failed
-6 Allocation for varAttInts failed
-7 Allocation for attCharNames failed
-8 Allocation for attRealNames failed
-9 Allocation for attIntNames failed

public subroutine cNodeDestroy(List)

Arguments

Type IntentOptional Attributes Name
type(cNode), pointer :: List

public subroutine iNodeDestroy(List)

Arguments

Type IntentOptional Attributes Name
type(iNode), pointer :: List

public subroutine rNodeDestroy(List)

Arguments

Type IntentOptional Attributes Name
type(rNode), pointer :: List