ESMF_CFIOFileClose
– close an open CFIO stream
Type | Intent | Optional | 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) |
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