ESMF_CFIOGridDestroy
– destructor for a CFIO grid object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CFIOGrid), | intent(inout) | :: | grid |
CFIOGrid object |
||
integer, | intent(out), | optional | :: | rc |
Error return code: |
subroutine ESMF_CFIOGridDestroy (grid, rc) ! ! !INPUT PARAMETERS: ! integer, intent(out), OPTIONAL :: rc !! Error return code: !! 0 all is well ! ! !INPUT/OUTPUT PARAMETERS: ! type(ESMF_CFIOGrid), intent(inout) :: grid !! CFIOGrid object ! !------------------------------------------------------------------------------ integer :: rtcode = 0 if (.not. grid%twoDimLat) then if ( associated(grid%lon) ) deallocate(grid%lon, stat=rtcode) if ( associated(grid%lat) ) deallocate(grid%lat, stat=rtcode) end if if ( associated(grid%lev) ) deallocate(grid%lev, stat=rtcode) if ( associated(grid%ak) ) deallocate(grid%ak, stat=rtcode) if ( associated(grid%bk) ) deallocate(grid%bk, stat=rtcode) if ( associated(grid%sigma) ) deallocate(grid%sigma, stat=rtcode) if ( present(rc) ) rc = rtcode end subroutine ESMF_CFIOGridDestroy