ESMF_CFIOFileCreate Subroutine

public subroutine ESMF_CFIOFileCreate(cfio, rc, expid, format)

ESMF_CFIOFileCreate – 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)

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

Experiment ID

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

GrADS or SDF


Calls

proc~~esmf_cfiofilecreate~~CallsGraph proc~esmf_cfiofilecreate ESMF_CFIOFileCreate ESMF_UtilStringUpperCase ESMF_UtilStringUpperCase proc~esmf_cfiofilecreate->ESMF_UtilStringUpperCase proc~esmf_cfiosdffilecreate ESMF_CFIOSdfFileCreate proc~esmf_cfiofilecreate->proc~esmf_cfiosdffilecreate proc~esmf_cfioset ESMF_CFIOSet proc~esmf_cfiofilecreate->proc~esmf_cfioset proc~esmf_cfiosdffilecreate->proc~esmf_cfioset nf90_create nf90_create proc~esmf_cfiosdffilecreate->nf90_create nf90_def_dim nf90_def_dim proc~esmf_cfiosdffilecreate->nf90_def_dim nf90_def_var nf90_def_var proc~esmf_cfiosdffilecreate->nf90_def_var nf90_def_var_chunking nf90_def_var_chunking proc~esmf_cfiosdffilecreate->nf90_def_var_chunking nf90_def_var_deflate nf90_def_var_deflate proc~esmf_cfiosdffilecreate->nf90_def_var_deflate nf90_enddef nf90_enddef proc~esmf_cfiosdffilecreate->nf90_enddef nf90_put_att nf90_put_att proc~esmf_cfiosdffilecreate->nf90_put_att nf90_put_var nf90_put_var proc~esmf_cfiosdffilecreate->nf90_put_var proc~cfio_parseinttime CFIO_parseIntTime proc~esmf_cfiosdffilecreate->proc~cfio_parseinttime proc~cfio_putcharatt CFIO_PutCharAtt proc~esmf_cfiosdffilecreate->proc~cfio_putcharatt proc~cfio_putintatt CFIO_PutIntAtt proc~esmf_cfiosdffilecreate->proc~cfio_putintatt proc~cfio_putrealatt CFIO_PutRealAtt proc~esmf_cfiosdffilecreate->proc~cfio_putrealatt proc~err err proc~esmf_cfiosdffilecreate->proc~err proc~esmf_cfioget ESMF_CFIOGet proc~esmf_cfiosdffilecreate->proc~esmf_cfioget proc~getlist getList proc~esmf_cfiosdffilecreate->proc~getlist proc~getmaxlencnt getMaxLenCnt proc~esmf_cfiosdffilecreate->proc~getmaxlencnt proc~strtemplate_ strTemplate_ proc~esmf_cfiosdffilecreate->proc~strtemplate_ proc~addlist addList proc~esmf_cfioset->proc~addlist proc~esmf_cfioset->proc~err proc~strtoint strToInt proc~esmf_cfioset->proc~strtoint proc~cfio_putcharatt->nf90_enddef proc~cfio_putcharatt->nf90_put_att proc~cfio_putcharatt->proc~err nf90_redef nf90_redef proc~cfio_putcharatt->nf90_redef proc~cfio_putintatt->nf90_enddef proc~cfio_putintatt->nf90_put_att proc~cfio_putintatt->proc~err proc~cfio_putintatt->nf90_redef proc~cfio_putrealatt->nf90_enddef proc~cfio_putrealatt->nf90_put_att proc~cfio_putrealatt->proc~err proc~cfio_putrealatt->nf90_redef proc~esmf_cfioget->proc~err proc~getlist->proc~getmaxlencnt proc~gx_ GX_ proc~strtemplate_->proc~gx_

Called by

proc~~esmf_cfiofilecreate~~CalledByGraph proc~esmf_cfiofilecreate ESMF_CFIOFileCreate proc~mapl_cfiocreatewrite MAPL_CFIOCreatewrite proc~mapl_cfiocreatewrite->proc~esmf_cfiofilecreate program~test~10 test program~test~10->proc~esmf_cfiofilecreate program~test~12 test program~test~12->proc~esmf_cfiofilecreate program~test~13 test program~test~13->proc~esmf_cfiofilecreate program~test~14 test program~test~14->proc~esmf_cfiofilecreate program~test~2 test program~test~2->proc~esmf_cfiofilecreate program~test~3 test program~test~3->proc~esmf_cfiofilecreate program~test~4 test program~test~4->proc~esmf_cfiofilecreate program~test~5 test program~test~5->proc~esmf_cfiofilecreate program~test~6 test program~test~6->proc~esmf_cfiofilecreate program~test~8 test program~test~8->proc~esmf_cfiofilecreate

Source Code

      subroutine ESMF_CFIOFileCreate (cfio, rc, expid, format)
!
! !ARGUMENTS:
!
! !INPUT PARAMETERS:
!
      type(ESMF_CFIO), intent(inout) :: cfio              !! a CFIO object
      character(len=*), intent(in), OPTIONAL  :: expid    !! Experiment ID
      character(len=*), intent(in), OPTIONAL  :: format   !! GrADS or SDF
!
! !OUTPUT PARAMETERS:
!
      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)
!
!------------------------------------------------------------------------------
      integer :: rtcode
      character (len=16) :: myFormat

      myFormat = 'SDF'
      if (present(format)) then
         if (trim(ESMF_UtilStringUpperCase(format)) .eq. 'GRADS' )  then
             call ESMF_CFIOSet(cfio, format='GRADS')
             myFormat = 'GRADS'
         end if
#if defined(HDFEOS)
         if (ESMF_UtilStringUpperCase(format)) .eq. 'EOS' )  then
             call ESMF_CFIOSet(cfio, format='EOS')
             myFormat = 'EOS'
         end if
#endif
      end if
      select case (myFormat)
      case ('SDF')
         if (present(expid)) then
            call ESMF_CFIOSdfFileCreate (cfio, rtcode, expid)
         else
            call ESMF_CFIOSdfFileCreate (cfio, rtcode)
         end if
         if (present(rc)) rc = rtcode
         return
#if defined(HDFEOS)
      case ('EOS')
         call ESMF_CFIOEOSFileCreate (cfio, rtcode)
         if (present(rc)) rc = rtcode
         return
#endif
      end select

    end subroutine ESMF_CFIOFileCreate