f_esmf_statecreate Subroutine

subroutine f_esmf_statecreate(state, name, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_State) :: state
character(len=*), intent(in) :: name
integer, intent(out) :: rc

Source Code

   subroutine f_esmf_statecreate(state, name, rc)
#undef  ESMF_METHOD
#define ESMF_METHOD "f_esmf_statecreate"

       use ESMF_UtilTypesMod
       use ESMF_LogErrMod
       use ESMF_BaseMod    ! ESMF base class
       use ESMF_StateMod
       implicit none

       type(ESMF_State) :: state
       character(len=*), intent(in) :: name
       integer, intent(out) :: rc

       integer :: localrc

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

       state = ESMF_StateCreate(name=name, rc=localrc)
       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU,  &
           ESMF_CONTEXT, rcToReturn=rc)) return

       rc = localrc
    
   end subroutine f_esmf_statecreate