Define a new data type ESMF_CFIO – a CFIO object(file) with file name,
CFIO variable objects, time, grid index and global attributes.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=16), | public | :: | format | 
                 output/input format – GrADS or SDF(HDF) default is SDF.  | 
        |||
| character(len=MLEN), | public, | pointer | :: | attCharNames(:) | => | NULL() | 
                 User defined char attribute name  | 
        
| character(len=MLEN), | public, | pointer | :: | attChars(:) | => | NULL() | 
                 char attributes  | 
        
| character(len=MLEN), | public, | pointer | :: | attIntNames(:) | => | NULL() | 
                 int attribute name  | 
        
| character(len=MLEN), | public, | pointer | :: | attRealNames(:) | => | NULL() | 
                 Real attribute name  | 
        
| character(len=MLEN), | public | :: | cfioObjName | 
                 name for this CFIO object  | 
        |||
| character(len=MLEN), | public | :: | comment | ||||
| character(len=MLEN), | public | :: | contact | 
                 Who to contact about the data set  | 
        |||
| character(len=MLEN), | public | :: | convention | 
                 CFIO  | 
        |||
| character(len=MLEN), | public | :: | expid | 
                 Experiment I  | 
        |||
| character(len=MLEN), | public | :: | fName | 
                 file name in this CFIO obj.  | 
        |||
| character(len=MLEN), | public | :: | fNameTmplt | 
                 file name in this CFIO obj.  | 
        |||
| character(len=MLEN), | public | :: | history | ||||
| character(len=MLEN), | public | :: | institution | ||||
| character(len=MLEN), | public | :: | references | ||||
| character(len=MLEN), | public | :: | source | 
                 Source of data, e.g. NASA/GMAO  | 
        |||
| character(len=MLEN), | public | :: | title | 
                 A title for the data set  | 
        |||
| integer, | public, | pointer | :: | attCharCnts(:) | => | NULL() | 
                 length of char attributes  | 
        
| integer, | public, | pointer | :: | attIntCnts(:) | => | NULL() | 
                 length of int attributes  | 
        
| integer, | public, | pointer | :: | attInts(:,:) | => | NULL() | 
                 global integer attributes  | 
        
| integer, | public, | pointer | :: | attRealCnts(:) | => | NULL() | 
                 length of real attributes  | 
        
| integer, | public | :: | begTime | 
                 hhmmss  | 
        |||
| integer, | public | :: | date | 
                 yyyymmdd  | 
        |||
| integer, | public | :: | deflate | 
                 gzip compress level  | 
        |||
| integer, | public | :: | fid | 
                 file ID for internal use  | 
        |||
| integer, | public | :: | mGrids | 
                 total number of grids  | 
        |||
| integer, | public | :: | mVars | 
                 total number of variables  | 
        |||
| integer, | public | :: | nAttChar | 
                 Number of char attributes  | 
        |||
| integer, | public | :: | nAttInt | 
                 Number of int attributes  | 
        |||
| integer, | public | :: | nAttReal | 
                 Number of Real attributes  | 
        |||
| integer, | public | :: | prec | 
                 Desired precision of data  | 
        |||
| integer, | public | :: | sd_id | 
                 file ID for EOS  | 
        |||
| integer, | public | :: | tSteps | 
                 total time steps  | 
        |||
| integer, | public | :: | timeInc | 
                 time step increment  | 
        |||
| integer, | public | :: | vdir | 
                 The positive vertical direction  | 
        |||
| logical, | public | :: | isCyclic | 
                 flag for cyclic for input files  | 
        |||
| logical, | public | :: | isGridSet | 
                 True only if grid was passed in  | 
        |||
| logical, | public | :: | isOpen | = | .false. | 
                 flag to check fName is opened or not  | 
        |
| logical, | public | :: | useVertexCoordinates | = | .false. | ||
| real, | public | :: | FormatVersion | = | 1.0 | ||
| real, | public, | pointer | :: | attReals(:,:) | => | NULL() | 
                 global real attributes  | 
        
| type(ESMF_CFIOGrid), | public, | pointer | :: | grids(:) | => | null() | 
                 CFIO variable grid  | 
        
| type(ESMF_CFIOVarInfo), | public, | pointer | :: | varObjs(:) | => | null() | 
                 CFIO variable objects  | 
        
| type(cNode), | public, | pointer | :: | cList | => | NULL() | |
| type(iNode), | public, | pointer | :: | iList | => | NULL() | |
| type(rNode), | public, | pointer | :: | rList | => | NULL() | 
type ESMF_CFIO ! private character(len=MLEN) :: cfioObjName !! name for this CFIO object character(len=MLEN) :: fName !! file name in this CFIO obj. character(len=MLEN) :: fNameTmplt !! file name in this CFIO obj. character(len=MLEN) :: expid !! Experiment I integer :: mVars !! total number of variables type(ESMF_CFIOVarInfo), pointer :: varObjs(:)=>null() !! CFIO variable objects integer :: mGrids !! total number of grids type(ESMF_CFIOGrid), pointer :: grids(:)=>null() !! CFIO variable grid integer :: vdir !! The positive vertical direction integer :: date !! yyyymmdd integer :: begTime !! hhmmss integer :: timeInc !! time step increment integer :: tSteps !! total time steps integer :: deflate !! gzip compress level character(len=MLEN) :: title !! A title for the data set character(len=MLEN) :: source !! Source of data, e.g. NASA/GMAO character(len=MLEN) :: contact !! Who to contact about the data set character(len=MLEN) :: history !! character(len=MLEN) :: convention !! CFIO character(len=MLEN) :: institution character(len=MLEN) :: references character(len=MLEN) :: comment integer :: nAttChar !! Number of char attributes integer :: nAttReal !! Number of Real attributes integer :: nAttInt !! Number of int attributes integer, pointer :: attCharCnts(:) => NULL() !! length of char attributes integer, pointer :: attRealCnts(:) => NULL() !! length of real attributes integer, pointer :: attIntCnts(:) => NULL() !! length of int attributes character(len=MLEN), pointer :: attCharNames(:) => NULL()!! User defined char !! attribute name character(len=MLEN), pointer :: attRealNames(:) => NULL()!! Real attribute name character(len=MLEN), pointer :: attIntNames(:) => NULL() !! int attribute name character(len=MLEN), pointer :: attChars(:) => NULL() !! char attributes real, pointer :: attReals(:,:) => NULL() !! global real attributes integer, pointer :: attInts(:,:) => NULL() !! global integer attributes integer :: prec !! Desired precision of data integer :: fid !! file ID for internal use integer :: sd_id !! file ID for EOS logical :: isGridSet !! True only if grid was passed in type(iNode), pointer :: iList => NULL() type(rNode), pointer :: rList => NULL() type(cNode), pointer :: cList => NULL() logical :: isOpen = .false. !! flag to check fName is opened or not ! integer :: nSteps logical :: isCyclic !! flag for cyclic for input files character(len=16) :: format !! output/input format -- GrADS or SDF(HDF) !! default is SDF. logical :: useVertexCoordinates = .false. real :: FormatVersion = 1.0 end type ESMF_CFIO