ESMF_MosaicDestroy Subroutine

public subroutine ESMF_MosaicDestroy(mosaic, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Mosaic), intent(inout) :: mosaic
integer, intent(out), optional :: rc

Source Code

subroutine ESMF_MosaicDestroy(mosaic, rc)

! !ARGUMENTS:
 
    type(ESMF_Mosaic), intent(inout)       :: mosaic
    integer, optional, intent(out)         :: rc

!EOPI

   ! Only allocated when there is netcdf
#ifdef ESMF_NETCDF

    ! Get rid of allocated members
    deallocate(mosaic%filenames)
    if (allocated(mosaic%contact)) deallocate(mosaic%contact)
    if (allocated(mosaic%connindex)) deallocate(mosaic%connindex)
#endif

    ! return success
    if (present(rc)) rc=ESMF_SUCCESS   

end subroutine ESMF_MosaicDestroy