Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_GridComp), | intent(inout) | :: | GC | |||
character(len=*), | intent(in) | :: | NAME | |||
type(ESMF_Field), | intent(out) | :: | FIELD | |||
character(len=*), | intent(in), | optional | :: | REQUESTER | ||
integer, | intent(out), | optional | :: | RC |
subroutine MAPL_FriendlyGet ( GC, NAME, FIELD, REQUESTER, RC ) ! !ARGUMENTS: type(ESMF_GridComp), intent(INOUT) :: GC character(len=*), intent(IN ) :: NAME character(len=*), optional, intent(IN ) :: REQUESTER !ALT (set to optional TEMPORARY) type(ESMF_Field), intent( OUT) :: FIELD integer, optional, intent( OUT) :: RC !============================================================================= ! ! ErrLog Variables integer :: status ! Local variables ! --------------- type (MAPL_MetaComp), pointer :: STATE logical :: FRIENDLY integer :: N, STAT ! Retrieve the pointer to the internal state of Root. ! ---------------------------------------------------- call MAPL_InternalStateRetrieve ( GC, STATE, RC=status ) _VERIFY(status) N = MAPL_VarSpecGetIndex(STATE%COMPONENT_SPEC%INTERNAL%OLD_VAR_SPECS, NAME, RC=status) if(N /= -1) then _VERIFY(status) else _RETURN(ESMF_FAILURE) endif call MAPL_VarSpecGet(STATE%COMPONENT_SPEC%INTERNAL%OLD_VAR_SPECS(N), STAT=STAT, RC=status) _VERIFY(status) _ASSERT(iand(STAT, MAPL_FriendlyVariable) /= 0,'needs informative message') call ESMF_StateGet(STATE%get_internal_state(), NAME, FIELD, RC=status) _VERIFY(status) if (present(REQUESTER)) then call ESMF_AttributeGet (FIELD, NAME="FriendlyTo"//trim(REQUESTER),VALUE=FRIENDLY, RC=status) _VERIFY(status) _ASSERT(FRIENDLY,'needs informative message') end if _RETURN(ESMF_SUCCESS) end subroutine MAPL_FriendlyGet