ESMF_CFIOFileClose Subroutine

public subroutine ESMF_CFIOFileClose(cfio, rc)

ESMF_CFIOFileClose – close an open CFIO stream

Arguments

Type IntentOptional Attributes Name
type(ESMF_CFIO), intent(inout) :: cfio
integer, intent(out), optional :: rc

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


Calls

proc~~esmf_cfiofileclose~~CallsGraph proc~esmf_cfiofileclose ESMF_CFIOFileClose proc~esmf_cfioget ESMF_CFIOGet proc~esmf_cfiofileclose->proc~esmf_cfioget proc~esmf_cfiosdffileclose ESMF_CFIOSdfFileClose proc~esmf_cfiofileclose->proc~esmf_cfiosdffileclose proc~err err proc~esmf_cfioget->proc~err proc~cfio_close CFIO_Close proc~esmf_cfiosdffileclose->proc~cfio_close proc~cfio_close->proc~err ncclos ncclos proc~cfio_close->ncclos

Called by

proc~~esmf_cfiofileclose~~CalledByGraph proc~esmf_cfiofileclose ESMF_CFIOFileClose proc~mapl_cfioclose MAPL_CFIOClose proc~mapl_cfioclose->proc~esmf_cfiofileclose proc~mapl_cfiodestroy MAPL_CFIODestroy proc~mapl_cfiodestroy->proc~esmf_cfiofileclose program~test test program~test->proc~esmf_cfiofileclose program~test~10 test program~test~10->proc~esmf_cfiofileclose program~test~11 test program~test~11->proc~esmf_cfiofileclose program~test~12 test program~test~12->proc~esmf_cfiofileclose program~test~14 test program~test~14->proc~esmf_cfiofileclose program~test~2 test program~test~2->proc~esmf_cfiofileclose program~test~3 test program~test~3->proc~esmf_cfiofileclose program~test~4 test program~test~4->proc~esmf_cfiofileclose program~test~5 test program~test~5->proc~esmf_cfiofileclose program~test~6 test program~test~6->proc~esmf_cfiofileclose program~test~7 test program~test~7->proc~esmf_cfiofileclose program~test~8 test program~test~8->proc~esmf_cfiofileclose program~test~9 test program~test~9->proc~esmf_cfiofileclose interface~esmf_iodestroy ESMF_ioDestroy interface~esmf_iodestroy->proc~mapl_cfiodestroy proc~test_main~5 test_main proc~test_main~5->interface~esmf_iodestroy program~utcfio~3 utCFIO program~utcfio~3->proc~test_main~5

Source Code

      subroutine ESMF_CFIOFileClose (cfio, rc)
!
! !OUTPUT PARAMETERS:
!
      integer, intent(out), OPTIONAL :: rc    !! Error return code:
                                              !! 0   all is well
                                              !! -54  error from ncclos (file close)
!
! !INPUT/OUTPUT PARAMETERS:
!
      type(ESMF_CFIO), intent(inout) :: cfio       ! CFIO object
!
!------------------------------------------------------------------------------
       integer :: rtcode
       character(len=16) format
      call ESMF_CFIOGet(cfio, format=format, rc=rtcode)
      if (rtcode .ne. 0) print *, "Error in ESMF_CFIOGet in FileClose"

      select case (format)
      case ('SDF')
          call ESMF_CFIOSdfFileClose(cfio,rtcode)
          if (rtcode .ne. 0) print *, "Error in ESMF_CFIOFileClose"
          if ( present(rc) ) rc = rtcode
          return
#if defined(HDFEOS)
      case ('EOS')
          call ESMF_CFIOEosFileClose(cfio,rtcode)
          if (rtcode .ne. 0) print *, "Error in ESMF_CFIOEosFileClose"
          if ( present(rc) ) rc = rtcode
          return
#endif
      end select


      end subroutine ESMF_CFIOFileClose