ESMF_CFIOVarInfoDestroy
– destructor for a CFIO varInfo object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIOVarInfo), | intent(inout) | :: | varObj |
CFIOVarInfo object |
||
integer, | intent(out), | optional | :: | rc |
Error return code: |
subroutine ESMF_CFIOVarInfoDestroy (varObj, rc) ! ! !INPUT PARAMETERS: ! integer, intent(out), OPTIONAL :: rc !! Error return code: !! 0 all is well ! ! !INPUT/OUTPUT PARAMETERS: ! type(ESMF_CFIOVarInfo), intent(inout) :: varObj !! CFIOVarInfo object ! !------------------------------------------------------------------------------ integer :: rtcode = 0 if ( associated(varObj%attCharCnts) ) deallocate(varObj%attCharCnts, & stat=rtcode) if ( associated(varObj%attRealCnts) ) deallocate(varObj%attRealCnts, & stat=rtcode) if ( associated(varObj%attIntCnts) ) deallocate(varObj%attIntCnts, & stat=rtcode) if ( associated(varObj%attCharNames) ) deallocate(varObj%attCharNames,& stat=rtcode) if ( associated(varObj%attRealNames) ) deallocate(varObj%attRealNames,& stat=rtcode) if ( associated(varObj%attIntNames) ) deallocate(varObj%attIntNames, & stat=rtcode) if ( associated(varObj%varAttChars) ) deallocate(varObj%varAttChars, & stat=rtcode) if ( associated(varObj%varAttReals) ) deallocate(varObj%varAttReals, & stat=rtcode) if ( associated(varObj%varAttInts) ) deallocate(varObj%varAttInts, & stat=rtcode) if ( associated(varObj%ChunkSize ) ) deallocate(varObj%ChunkSize, & stat=rtcode) if (.not. varObj%isGridSet) then call ESMF_CFIOGridDestroy(varObj%grid, rc=rtcode) end if if ( associated(varObj%iList) ) call iNodeDestroy(varObj%iList) if ( associated(varObj%rList) ) call rNodeDestroy(varObj%rList) if ( associated(varObj%cList) ) call cNodeDestroy(varObj%cList) if ( present(rc) ) rc = rtcode end subroutine ESMF_CFIOVarInfoDestroy