f_esmf_locstreamcollectgarbage Subroutine

subroutine f_esmf_locstreamcollectgarbage(locstream, rc)

Uses

  • proc~~f_esmf_locstreamcollectgarbage~~UsesGraph proc~f_esmf_locstreamcollectgarbage f_esmf_locstreamcollectgarbage module~esmf_basemod ESMF_BaseMod proc~f_esmf_locstreamcollectgarbage->module~esmf_basemod module~esmf_locstreammod ESMF_LocStreamMod proc~f_esmf_locstreamcollectgarbage->module~esmf_locstreammod module~esmf_logerrmod ESMF_LogErrMod proc~f_esmf_locstreamcollectgarbage->module~esmf_logerrmod module~esmf_utiltypesmod ESMF_UtilTypesMod proc~f_esmf_locstreamcollectgarbage->module~esmf_utiltypesmod module~esmf_basemod->module~esmf_logerrmod module~esmf_basemod->module~esmf_utiltypesmod iso_c_binding iso_c_binding module~esmf_basemod->iso_c_binding module~esmf_initmacrosmod ESMF_InitMacrosMod module~esmf_basemod->module~esmf_initmacrosmod module~esmf_ioutilmod ESMF_IOUtilMod module~esmf_basemod->module~esmf_ioutilmod module~esmf_vmmod ESMF_VMMod module~esmf_basemod->module~esmf_vmmod module~esmf_locstreammod->module~esmf_basemod module~esmf_locstreammod->module~esmf_logerrmod module~esmf_locstreammod->module~esmf_utiltypesmod ESMF_ArrayCreateMod ESMF_ArrayCreateMod module~esmf_locstreammod->ESMF_ArrayCreateMod ESMF_ArrayGetMod ESMF_ArrayGetMod module~esmf_locstreammod->ESMF_ArrayGetMod module~esmf_arraybundlemod ESMF_ArrayBundleMod module~esmf_locstreammod->module~esmf_arraybundlemod module~esmf_arraymod ESMF_ArrayMod module~esmf_locstreammod->module~esmf_arraymod module~esmf_arrayspecmod ESMF_ArraySpecMod module~esmf_locstreammod->module~esmf_arrayspecmod module~esmf_delayoutmod ESMF_DELayoutMod module~esmf_locstreammod->module~esmf_delayoutmod module~esmf_distgridmod ESMF_DistGridMod module~esmf_locstreammod->module~esmf_distgridmod module~esmf_gridmod ESMF_GridMod module~esmf_locstreammod->module~esmf_gridmod module~esmf_gridutilmod ESMF_GridUtilMod module~esmf_locstreammod->module~esmf_gridutilmod module~esmf_locstreammod->module~esmf_initmacrosmod module~esmf_ioscripmod ESMF_IOScripMod module~esmf_locstreammod->module~esmf_ioscripmod module~esmf_iougridmod ESMF_IOUGridMod module~esmf_locstreammod->module~esmf_iougridmod module~esmf_locstreammod->module~esmf_ioutilmod module~esmf_localarraymod ESMF_LocalArrayMod module~esmf_locstreammod->module~esmf_localarraymod module~esmf_meshmod ESMF_MeshMod module~esmf_locstreammod->module~esmf_meshmod module~esmf_rhandlemod ESMF_RHandleMod module~esmf_locstreammod->module~esmf_rhandlemod module~esmf_staggerlocmod ESMF_StaggerLocMod module~esmf_locstreammod->module~esmf_staggerlocmod module~esmf_utilmod ESMF_UtilMod module~esmf_locstreammod->module~esmf_utilmod module~esmf_locstreammod->module~esmf_vmmod module~esmf_logerrmod->module~esmf_utiltypesmod module~esmf_logerrmod->module~esmf_ioutilmod module~esmf_utilstringmod ESMF_UtilStringMod module~esmf_logerrmod->module~esmf_utilstringmod module~esmf_utiltypesmod->iso_c_binding

Arguments

Type IntentOptional Attributes Name
type(ESMF_LocStream) :: locstream
integer, intent(out) :: rc

Calls

proc~~f_esmf_locstreamcollectgarbage~~CallsGraph proc~f_esmf_locstreamcollectgarbage f_esmf_locstreamcollectgarbage proc~esmf_locstreamdestruct ESMF_LocStreamDestruct proc~f_esmf_locstreamcollectgarbage->proc~esmf_locstreamdestruct proc~esmf_logfounddeallocerror ESMF_LogFoundDeallocError proc~f_esmf_locstreamcollectgarbage->proc~esmf_logfounddeallocerror proc~esmf_logfounderror ESMF_LogFoundError proc~f_esmf_locstreamcollectgarbage->proc~esmf_logfounderror proc~esmf_locstreamdestruct->proc~esmf_logfounderror esmf_arraydestroy esmf_arraydestroy proc~esmf_locstreamdestruct->esmf_arraydestroy proc~esmf_basegetstatus ESMF_BaseGetStatus proc~esmf_locstreamdestruct->proc~esmf_basegetstatus proc~esmf_basesetstatus ESMF_BaseSetStatus proc~esmf_locstreamdestruct->proc~esmf_basesetstatus proc~esmf_distgriddestroy ESMF_DistGridDestroy proc~esmf_locstreamdestruct->proc~esmf_distgriddestroy esmf_breakpoint esmf_breakpoint proc~esmf_logfounddeallocerror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounddeallocerror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounddeallocerror->proc~esmf_logwrite proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logfounderror->proc~esmf_logwrite proc~esmf_basegetstatus->proc~esmf_logfounderror c_esmc_basegetstatus c_esmc_basegetstatus proc~esmf_basegetstatus->c_esmc_basegetstatus proc~esmf_basesetstatus->proc~esmf_logfounderror c_esmc_basesetstatus c_esmc_basesetstatus proc~esmf_basesetstatus->c_esmc_basesetstatus proc~esmf_distgriddestroy->proc~esmf_logfounderror c_esmc_distgriddestroy c_esmc_distgriddestroy proc~esmf_distgriddestroy->c_esmc_distgriddestroy proc~esmf_distgridgetinit ESMF_DistGridGetInit proc~esmf_distgriddestroy->proc~esmf_distgridgetinit proc~esmf_imerr ESMF_IMErr proc~esmf_distgriddestroy->proc~esmf_imerr c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Source Code

  subroutine f_esmf_locstreamcollectgarbage(locstream, rc)
#undef  ESMF_METHOD
#define ESMF_METHOD "f_esmf_fieldcollectgarbage()"
    use ESMF_UtilTypesMod
    use ESMF_BaseMod
    use ESMF_LogErrMod
    use ESMF_LocStreamMod

    implicit none

    type(ESMF_LocStream) :: locstream
    integer, intent(out) :: rc     
  
    integer :: localrc              
  
    ! initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    rc = ESMF_RC_NOT_IMPL
  
    !print *, "collecting LocStream garbage"
  
    ! destruct internal data allocations
    call ESMF_LocStreamDestruct(locstream%lstypep, rc=localrc)
    if (ESMF_LogFoundError(localrc, &
      ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! deallocate actual LocStreamType allocation
    if (associated(locstream%lstypep)) then
      deallocate(locstream%lstypep, stat=localrc)
      if (ESMF_LogFoundDeallocError(localrc, msg="Deallocating LocStream", &
        ESMF_CONTEXT, rcToReturn=rc)) return
    endif
    nullify(locstream%lstypep)

    ! return successfully
    rc = ESMF_SUCCESS

  end subroutine f_esmf_locstreamcollectgarbage