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

Called by

proc~~esmf_mosaicdestroy~~CalledByGraph proc~esmf_mosaicdestroy ESMF_MosaicDestroy proc~esmf_gridcreatemosaicireg ESMF_GridCreateMosaicIReg proc~esmf_gridcreatemosaicireg->proc~esmf_mosaicdestroy proc~esmf_gridcreatemosaicreg ESMF_GridCreateMosaicReg proc~esmf_gridcreatemosaicreg->proc~esmf_mosaicdestroy interface~esmf_gridcreatemosaic ESMF_GridCreateMosaic interface~esmf_gridcreatemosaic->proc~esmf_gridcreatemosaicireg interface~esmf_gridcreatemosaic->proc~esmf_gridcreatemosaicreg proc~test_bilinear_regrid_csmosaic test_bilinear_regrid_csmosaic proc~test_bilinear_regrid_csmosaic->interface~esmf_gridcreatemosaic proc~test_conserve_regrid_csmosaic test_conserve_regrid_csmosaic proc~test_conserve_regrid_csmosaic->interface~esmf_gridcreatemosaic program~esmf_gridcreateutest ESMF_GridCreateUTest program~esmf_gridcreateutest->interface~esmf_gridcreatemosaic

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