MAPL_RequestService Subroutine

public subroutine MAPL_RequestService(GC, SERVICE, VARS, RC)

Arguments

Type IntentOptional Attributes Name
type(ESMF_GridComp), intent(inout) :: GC
character(len=*), intent(in) :: SERVICE
character(len=*), intent(in) :: VARS(:)
integer, intent(out), optional :: RC

Calls

proc~~mapl_requestservice~~CallsGraph proc~mapl_requestservice MAPL_RequestService esmf_fieldbundlecreate esmf_fieldbundlecreate proc~mapl_requestservice->esmf_fieldbundlecreate none~push_back~53 requestedServiceItemVector%push_back proc~mapl_requestservice->none~push_back~53 proc~mapl_internalstateretrieve MAPL_InternalStateRetrieve proc~mapl_requestservice->proc~mapl_internalstateretrieve proc~mapl_return MAPL_Return proc~mapl_requestservice->proc~mapl_return proc~mapl_verify MAPL_Verify proc~mapl_requestservice->proc~mapl_verify none~capacity~313 requestedServiceItemVector%capacity none~push_back~53->none~capacity~313 none~resize~106 requestedServiceItemVector%resize none~push_back~53->none~resize~106 proc~mapl_internalstateretrieve->proc~mapl_return proc~mapl_internalstateretrieve->proc~mapl_verify ESMF_GridCompGet ESMF_GridCompGet proc~mapl_internalstateretrieve->ESMF_GridCompGet ESMF_UserCompGetInternalState ESMF_UserCompGetInternalState proc~mapl_internalstateretrieve->ESMF_UserCompGetInternalState proc~mapl_internalstatecreate MAPL_InternalStateCreate proc~mapl_internalstateretrieve->proc~mapl_internalstatecreate 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 none~resize_32~51 requestedServiceItemVector%resize_32 none~resize~106->none~resize_32~51 proc~mapl_internalstatecreate->proc~mapl_return proc~mapl_internalstatecreate->proc~mapl_verify proc~mapl_internalstatecreate->ESMF_GridCompGet ESMF_UserCompSetInternalState ESMF_UserCompSetInternalState proc~mapl_internalstatecreate->ESMF_UserCompSetInternalState none~get_component~4 ConcreteComposite%get_component proc~mapl_internalstatecreate->none~get_component~4 none~initialize~19 ConcreteComposite%initialize proc~mapl_internalstatecreate->none~initialize~19 none~set_composite~2 CompositeComponent%set_composite proc~mapl_internalstatecreate->none~set_composite~2 none~resize_32~51->none~resize~106

Source Code

   subroutine MAPL_RequestService(GC, SERVICE, VARS, RC)
      type(ESMF_GridComp),            intent(INOUT) :: GC ! Gridded component
      character (len=*),              intent(IN   ) :: SERVICE
      character (len=*),              intent(IN   ) :: VARS(:)
      integer,              optional, intent(  OUT) :: RC     ! Error code:

      integer :: status
      type (MAPL_MetaComp), pointer     :: MAPLOBJ
      type (ESMF_FieldBundle) :: bundle

      !get MAPL
      call MAPL_InternalStateRetrieve ( GC, MAPLOBJ, _RC )

      bundle = ESMF_FieldBundleCreate(NAME=SERVICE, _RC)
      call maplobj%requested_services%push_back( &
           RequestedServiceType( &
           service_name=service, &
           var_list = vars, &
           bundle = bundle ))

      _RETURN(ESMF_SUCCESS)

   end subroutine MAPL_RequestService