ESMF_CFIOSdfMod
Author: GMAO SI-Team
ESMF_CFIOSdfMod
- Source file for CFIO.
The module ESMF_CFIOSdfMod
provides data type definitions and interface
specifications. It provides all the necessary subroutines for users to write/read
HDF format output using CF convention.
ESMF_CFIOSdfVarRead3D_
– Read a variable from an existing file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIO), | intent(inout) | :: | cfio |
a CFIO obj |
||
character(len=*), | intent(in) | :: | vName |
variable name |
||
real, | pointer | :: | 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 |
|
integer, | intent(in), | optional | :: | xBeg |
first point for lon |
|
integer, | intent(in), | optional | :: | xCount |
number of points to read |
|
integer, | intent(in), | optional | :: | yBeg |
first point for lat |
|
integer, | intent(in), | optional | :: | yCount |
number of points to read |
|
character(len=*), | intent(in), | optional | :: | timeString |
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 = -8 vname miss-match rc = -12 error determining default precision rc = -13 error determining variable type rc = -19 unable to identify coordinate variable rc = -38 error from NF90_VAR_PUT (dimension variable) rc = -40 error from NF90_INQ_VARID rc = -41 error from NF90_INQ_DIMID (lat or lon) rc = -42 error from NF90_INQ_DIMID (lev) rc = -43 error from NF90_INQ_VARID (time variable) rc = -44 error from NF90_GET_ATT (time attribute) rc = -46 error from NF90_GET_VAR rc = -48 error from NF90_INQUIRE rc = -52 error from NF90_INQUIRE_VARIABLE |
ESMF_CFIOSdfVarRead2D_
– Read a variable from an existing file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIO), | intent(inout) | :: | cfio |
a CFIO obj |
||
character(len=*), | intent(in) | :: | vName |
variable name |
||
real, | pointer | :: | 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 |
|
integer, | intent(in), | optional | :: | xBeg |
first point for lon |
|
integer, | intent(in), | optional | :: | xCount |
number of points to read |
|
integer, | intent(in), | optional | :: | yBeg |
first point for lat |
|
integer, | intent(in), | optional | :: | yCount |
number of points to read |
|
character(len=*), | intent(in), | optional | :: | timeString |
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 = -8 vname miss-match rc = -12 error determining default precision rc = -13 error determining variable type rc = -19 unable to identify coordinate variable rc = -38 error from NF90_VAR_PUT (dimension variable) rc = -40 error from NF90_INQ_VARID rc = -41 error from NF90_INQ_DIMID (lat or lon) rc = -42 error from NF90_INQ_DIMID (lev) rc = -43 error from NF90_INQ_VARID (time variable) rc = -44 error from NF90_GET_ATT (time attribute) rc = -46 error from NF90_GET_VAR rc = -48 error from NF90_INQUIRE rc = -52 error from NF90_INQUIRE_VARIABLE |
ESMF_CFIOSdfVarRead1D_
– Read a variable from an existing file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIO), | intent(inout) | :: | cfio |
a CFIO obj |
||
character(len=*), | intent(in) | :: | vName |
variable name |
||
real, | pointer | :: | field(:) |
array contains data |
||
integer, | intent(in), | optional | :: | date |
yyyymmdd |
|
integer, | intent(in), | optional | :: | curTime |
hhmmss |
|
integer, | intent(in), | optional | :: | xBeg |
first point for lon |
|
integer, | intent(in), | optional | :: | xCount |
number of points to read |
|
character(len=*), | intent(in), | optional | :: | timeString |
string expression for date and time |
|
integer, | intent(out), | optional | :: | rc |
Error return code: 0 all is well |
ESMF_CFIOSdfVarReadT3D_
– Read a variable from an existing file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIO), | intent(inout) | :: | cfio |
a CFIO obj |
||
character(len=*), | intent(in) | :: | vName |
variable name |
||
real, | pointer | :: | field(:,:,:) |
array contains data |
||
character(len=*), | intent(in) | :: | timeString |
string expression for date and time |
||
type(ESMF_CFIO), | intent(inout), | optional | :: | cfio2 |
second CFIO obj |
|
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 = -19 unable to identify coordinate variable rc = -38 error from NF90_VAR_PUT (dimension variable) rc = -40 error from NF90_INQ_VARID rc = -41 error from NF90_INQ_DIMID (lat or lon) rc = -42 error from NF90_INQ_DIMID (lev) rc = -43 error from NF90_INQ_VARID (time variable) rc = -44 error from NF90_GET_ATT (time attribute) rc = -46 error from NF90_GET_VAR rc = -48 error from NF90_INQUIRE rc = -52 error from NF90_INQUIRE_VARIABLE rc = -99 must specify date/curTime of timeString |
ESMF_CFIOSdfVarReadT2D_` – Read a variable from an existing file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIO), | intent(inout) | :: | cfio |
a CFIO obj |
||
character(len=*), | intent(in) | :: | vName |
variable name |
||
real, | pointer | :: | field(:,:) |
array contains data |
||
character(len=*), | intent(in) | :: | timeString |
string expression for date and time |
||
type(ESMF_CFIO), | intent(inout), | optional | :: | cfio2 |
second CFIO obj |
|
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 = -19 unable to identify coordinate variable rc = -38 error from NF90_VAR_PUT (dimension variable) rc = -40 error from NF90_INQ_VARID rc = -41 error from NF90_INQ_DIMID (lat or lon) rc = -42 error from NF90_INQ_DIMID (lev) rc = -43 error from NF90_INQ_VARID (time variable) rc = -44 error from NF90_GET_ATT (time attribute) rc = -46 error from NV_GET_VARA rc = -48 error from NF90_INQUIRE rc = -52 error from NF90_INQUIRE_VARIABLE rc = -99 must specify date/curTime of timeString |
ESMF_CFIOSdfVarReadT3D_
– Read a variable from an existing file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIO), | intent(inout) | :: | cfio |
a CFIO obj |
||
character(len=*), | intent(in) | :: | vName |
variable name |
||
integer, | intent(in) | :: | date |
yyyymmdd |
||
integer, | intent(in) | :: | curTime |
hhmmss |
||
real, | pointer | :: | field(:,:,:) |
array contains data |
||
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 = -19 unable to identify coordinate variable rc = -38 error from NF90_VAR_PUT (dimension variable) rc = -40 error from NF90_INQ_VARID rc = -41 error from NF90_INQ_DIMID (lat or lon) rc = -42 error from NF90_INQ_DIMID (lev) rc = -43 error from NF90_INQ_VARID (time variable) rc = -44 error from NF90_GET_ATT (time attribute) rc = -46 error from NF90_GET_VAR rc = -48 error from NF90_INQUIRE rc = -52 error from NF90_INQUIRE_VARIABLE |
|
type(ESMF_CFIO), | intent(inout), | optional | :: | cfio2 |
second CFIO obj |
ESMF_CFIOSdfVarReadT2D_
– Read a variable from an existing file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIO), | intent(inout) | :: | cfio |
a CFIO obj |
||
character(len=*), | intent(in) | :: | vName |
variable name |
||
integer, | intent(in) | :: | date |
yyyymmdd |
||
integer, | intent(in) | :: | curTime |
hhmmss |
||
real, | pointer | :: | field(:,:) |
array contains data |
||
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 = -19 unable to identify coordinate variable rc = -38 error from NF90_VAR_PUT (dimension variable) rc = -40 error from NF90_INQ_VARID rc = -41 error from NF90_INQ_DIMID (lat or lon) rc = -42 error from NF90_INQ_DIMID (lev) rc = -43 error from NF90_INQ_VARID (time variable) rc = -44 error from NF90_GET_ATT (time attribute) rc = -46 error from NF90_GET_VAR rc = -48 error from NF90_INQUIRE rc = -52 error from NF90_INQUIRE_VARIABLE |
|
type(ESMF_CFIO), | intent(inout), | optional | :: | cfio2 |
second CFIO obj |
ESMF_CFIOSdfVarWrite3D_
– Write a variable to a output file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIO), | intent(inout) | :: | 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 |
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_VAR_PUT (dimension variable) rc = -40 error from NF90_INQ_VARID rc = -41 error from NF90_INQ_DIMID (lat or lon) rc = -42 error from NF90_INQ_DIMID (lev) rc = -43 error from NF90_INQ_VARID (time variable) rc = -44 error from NF90_GET_ATT (time attribute) rc = -45 error from NF90_VAR_PUT rc = -46 error from NF90_GET_VAR rc = -52 error from NF90_INQUIRE_VARIABLE rc = -53 error from NF90_GET_ATT |
ESMF_CFIOSdfVarWrite2D_
– Write a variable to a output file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIO), | intent(inout) | :: | 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 |
string expression for date and time |
|
integer, | intent(out), | optional | :: | rc |
Error return code: 0 all is well |
ESMF_CFIOSdfVarWrite1D_
– Write a variable to a output file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIO), | intent(inout) | :: | 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 |
string expression for date and time |
|
integer, | intent(out), | optional | :: | rc |
Error return code: 0 all is well |
ESMF_CFIOSdfFileClose
– close an open CFIO stream.
Type | Intent | Optional | 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 ncclos (file close) |
ESMF_CFIOSdfFileCreate
– Create a CFIO output file with meta data
Type | Intent | Optional | 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_VAR_PUT (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) |
|
character(len=*), | intent(in), | optional | :: | expid |
Experiment ID |
ESMF_CFIOSdfFileOpen
– open a CFIO file, and get CFIO meta data into a cfio Object.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIO), | intent(inout) | :: | cfio |
a CFIO object |
||
integer, | intent(in) | :: | fmode |
0 for READ-WRITE non-zero for READ-ONLY |
||
integer, | intent(out), | optional | :: | rc |
Error return code: 0 all is well -1 invalid count -2 type mismatch -12 error determining default precision -10 ngatts is incompatible with file -11 character string not long enough -19 unable to identify coordinate variable -36 error from NF90_PUT_ATT (global attribute) -39 error from ncopn (file open) -40 error from NF90_INQ_VARID -41 error from NF90_INQ_DIMID (lat or lon) -42 error from NF90_INQ_DIMID (lev) -43 error from NF90_INQ_VARID (time variable) -47 error from NF90_INQ_DIMID (time) -48 error from NF90_INQUIRE -51 error from NF90_GET_ATT (global attribute) -52 error from NF90_INQUIRE_VARIABLE -53 error from NF90_GET_ATT -57 error from NF90_INQ_ATTNAME -58 error from NF90_INQUIRE_ATTRIBUTE |
|
character(len=*), | intent(in), | optional | :: | expid |
Experiment ID |
|
logical, | intent(in), | optional | :: | cyclic |
cyclic input file |