ESMF_CFIOEosMod Module

MODULE: ESMF_CFIOEosMod

Author: GMAO SI-Team

ESMF_CFIOEosMod - Source file for CFIO

The module ESMF_CFIOEosMod provides data type definitions and interface specifications. It provides all the necessary subroutines for users to write/read HDF format output using CF convention.

History

  • Jan2004 Baoyu Yin Initial design and prototyping.
  • Apr2004 Baoyu Yin Implementation
  • Sep2004 Baoyu Yin Modified return codes to make it more specific.
  • Sep2004 Baoyu Yin Moved some utility routines to ESMF_CFIOUtil.F90.
  • Sep2004 Baoyu Yin Modified station grid metadata.
  • Sep2004 Baoyu Yin Added ptopUnit to ptop for eta and sigma coordinates.
  • Oct2004 Baoyu Yin Migrated to Halem and fixed some bugs.
  • Oct2004 Baoyu Yin Added timeString to ESMF_CFIOSet and ESMF_CFIOEosVarWrite. Rearranged the argument order in ESMF_CFIOEosVarWrite.
  • Jan2005 Baoyu Yin Fixed some memory problems. Fixed scaleFactor and offset problem. Fixed standard_name problem in reading CFIO files.
  • Mar2005 Baoyu Yin Moved some utility routines into ESMF_CFIOUtil.F90 Modified error return codes.

Uses

  • module~~esmf_cfioeosmod~~UsesGraph module~esmf_cfioeosmod ESMF_CFIOEosMod ESMF_CFIOrGrADSMod ESMF_CFIOrGrADSMod module~esmf_cfioeosmod->ESMF_CFIOrGrADSMod ESMF_CFIOwGrADSMod ESMF_CFIOwGrADSMod module~esmf_cfioeosmod->ESMF_CFIOwGrADSMod module~esmf_cfiofilemod ESMF_CFIOFileMod module~esmf_cfioeosmod->module~esmf_cfiofilemod module~esmf_cfiogridmod ESMF_CFIOGridMod module~esmf_cfioeosmod->module~esmf_cfiogridmod module~esmf_cfioutilmod ESMF_CFIOUtilMod module~esmf_cfioeosmod->module~esmf_cfioutilmod module~esmf_cfiovarinfomod ESMF_CFIOVarInfoMod module~esmf_cfioeosmod->module~esmf_cfiovarinfomod module~esmf_cfiofilemod->module~esmf_cfiogridmod module~esmf_cfiofilemod->module~esmf_cfioutilmod module~esmf_cfiofilemod->module~esmf_cfiovarinfomod 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 module~esmf_cfiovarinfomod->module~esmf_cfiogridmod module~esmf_cfiovarinfomod->module~esmf_cfioutilmod

Interfaces

public interface ESMF_CFIOEosVarWrite

  • private subroutine ESMF_CFIOEosVarWrite3D_(cfio, vName, field, date, curTime, kbeg, kount, timeString, doComp, doChunk, rc)

    ESMF_CFIOEosVarWrite3D_ – Write a variable to a output file.

    Arguments

    Type IntentOptional Attributes Name
    type(ESMF_CFIO), intent(in) :: cfio

    a CFIO obj

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

    Variable name

    real, intent(in) :: field(:,:,:)

    array contains data

    integer, intent(in), optional :: date

    yyyymmdd

    integer, intent(in), optional :: curTime

    hhmmss

    integer, intent(in), optional :: kbeg

    first level to write

    integer, intent(in), optional :: kount

    number of levels to write

    character(len=*), intent(in), optional :: timeString
    logical, intent(in), optional :: doComp

    do szip compression

    logical, intent(in), optional :: doChunk

    do szip compression string expression for date and time

    integer, intent(out), optional :: rc

    Error return code: 0 all is well rc = -2 time is inconsistent with increment rc = -3 number of levels is incompatible with file rc = -4 im is incompatible with file rc = -5 jm is incompatible with file rc = -6 time must fall on a minute boundary rc = -7 error in diffdate rc = -12 error determining default precision rc = -13 error determining variable type rc = -15 data outside of valid range rc = -16 data outside of packing range rc = -17 data outside of pack and valid range rc = -38 error from NF90_PUT_VAR (dimension variable) rc = -40 error from NF90_INQ_VARID rc = -41 error from NF90_INQ_DIMID or NF90_INQUIRE_DIMENSION (lat or lon) rc = -42 error from NF90_INQ_DIMID or NF90_INQUIRE_DIMENSION (lev) rc = -43 error from NF90_INQ_VARID (time variable) rc = -44 error from NF90_GET_ATT (time attribute) rc = -45 error from NF90_PUT_VAR rc = -46 error from NF90_GET_VAR rc = -52 error from NF90_INQUIRE_VARIABLE rc = -53 error from NF90_GET_ATT

  • private subroutine ESMF_CFIOEosVarWrite2D_(cfio, vName, field, date, curTime, kbeg, kount, timeString, doComp, doChunk, rc)

    Arguments

    Type IntentOptional Attributes Name
    type(ESMF_CFIO), intent(in) :: cfio

    a CFIO obj

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

    Variable name

    real, intent(in) :: field(:,:)

    array contains data

    integer, intent(in), optional :: date

    yyyymmdd

    integer, intent(in), optional :: curTime

    hhmmss

    integer, intent(in), optional :: kbeg

    first level to write

    integer, intent(in), optional :: kount

    number of levels to write

    character(len=*), intent(in), optional :: timeString
    logical, intent(in), optional :: doComp

    do szip compression

    logical, intent(in), optional :: doChunk

    do szip compression string expression for date and time

    integer, intent(out), optional :: rc

    Error return code: 0 all is well

  • private subroutine ESMF_CFIOEosVarWrite1D_(cfio, vName, field, date, curTime, timeString, doComp, doChunk, rc)

    ESMF_CFIOEosVarWrite1D_ – Write a variable to a output file.

    Arguments

    Type IntentOptional Attributes Name
    type(ESMF_CFIO), intent(in) :: cfio

    a CFIO obj

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

    Variable name

    real, intent(in) :: field(:)

    array contains data

    integer, intent(in), optional :: date

    yyyymmdd

    integer, intent(in), optional :: curTime

    hhmmss

    character(len=*), intent(in), optional :: timeString
    logical, intent(in), optional :: doComp

    do szip compression

    logical, intent(in), optional :: doChunk

    do szip compression string expression for date and time

    integer, intent(out), optional :: rc

    Error return code: 0 all is well


Subroutines

public subroutine ESMF_CFIOEosFileClose(cfio, rc)

ESMF_CFIOEosFileClose – close an open CFIO stream.

Arguments

Type IntentOptional Attributes Name
type(ESMF_CFIO), intent(inout) :: cfio

CFIO object

integer, intent(out), optional :: rc

Error return code: 0 all is well -54 error from NF90_CLOSE (file close)

public subroutine ESMF_CFIOEosFileCreate(cfio, rc)

ESMF_CFIOEosFileCreate – Create a CFIO output file with meta data

Arguments

Type IntentOptional Attributes Name
type(ESMF_CFIO), intent(inout) :: cfio

a CFIO object

integer, intent(out), optional :: rc

Error return code: 0 all is well -1 Time increment is 0 -2 allocate memory error -3 Num of int/char/real elements and Cnt don’t match -12 error determining default precision -18 incorrect time increment -30 can’t open file -31 error from NF90_DEF_DIM -32 error from NF90_DEF_VAR (dimension variable) -33 error from NF90_PUT_ATT (dimension attribute) -34 error from NF90_DEF_VAR (variable) -35 error from NF90_PUT_ATT (variable attribute) -36 error from NF90_PUT_ATT (global attribute) -37 error from NF90_ENDDEF -38 error from NF90_PUT_VAR (dimension variable) -39 Num of real var elements and Cnt differ -55 error from NF90_REDEF (enter define mode) -56 error from NF90_ENDDEF (exit define mode)