f_esmf_statedestroy Subroutine

subroutine f_esmf_statedestroy(state, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_State) :: state
integer, intent(out) :: rc

Source Code

   subroutine f_esmf_statedestroy(state, rc)
#undef  ESMF_METHOD
#define ESMF_METHOD "f_esmf_statedestroy"
       use ESMF_UtilTypesMod
       use ESMF_LogErrMod
       use ESMF_BaseMod    ! ESMF base class
       use ESMF_StateMod
       implicit none

       type(ESMF_State) :: state
       integer, intent(out) :: rc

       integer :: localrc

       ! Initialize return code; assume routine not implemented
       rc = ESMF_RC_NOT_IMPL

       call ESMF_StateDestroy(state, rc=localrc)
       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU,  &
           ESMF_CONTEXT, rcToReturn=rc)) return

       rc = localrc
    
   end subroutine f_esmf_statedestroy