ESMFL_StateFieldIsNeeded Function

public function ESMFL_StateFieldIsNeeded(STATE, NAME, RC) result(NEEDED)

Arguments

Type IntentOptional Attributes Name
type(ESMF_State), intent(inout) :: STATE
character(len=*), intent(in) :: NAME
integer, intent(out), optional :: RC

Return Value logical


Calls

proc~~esmfl_statefieldisneeded~~CallsGraph proc~esmfl_statefieldisneeded ESMFL_StateFieldIsNeeded ESMF_InfoGetFromHost ESMF_InfoGetFromHost proc~esmfl_statefieldisneeded->ESMF_InfoGetFromHost ESMF_InfoSet ESMF_InfoSet proc~esmfl_statefieldisneeded->ESMF_InfoSet esmf_stateget esmf_stateget proc~esmfl_statefieldisneeded->esmf_stateget proc~mapl_return MAPL_Return proc~esmfl_statefieldisneeded->proc~mapl_return proc~mapl_verify MAPL_Verify proc~esmfl_statefieldisneeded->proc~mapl_verify at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

function ESMFL_StateFieldIsNeeded(STATE, NAME, RC) result(NEEDED)
   type(ESMF_State),  intent(INOUT) :: STATE
   character(len=*),  intent(IN   ) :: NAME
   integer, optional, intent(  OUT) :: RC
   logical                          :: NEEDED

   integer                          :: STATUS

   type(ESMF_Field)                 :: FIELD
   type(ESMF_Info)                  :: infoh

   call ESMF_StateGet(STATE, trim(NAME), FIELD, RC=STATUS)
   _VERIFY(STATUS)

   call ESMF_InfoGetFromHost(FIELD,infoh,RC=STATUS)
   _VERIFY(STATUS)
   call ESMF_InfoSet(infoh,'Needed',NEEDED,RC=STATUS)
   if(STATUS /= ESMF_SUCCESS) NEEDED = .false.

   _RETURN(ESMF_SUCCESS)

 end function ESMFL_StateFieldIsNeeded