MAPL_ExchangeGridSet Subroutine

public recursive subroutine MAPL_ExchangeGridSet(GC, EXCH, RC)

Arguments

Type IntentOptional Attributes Name
type(ESMF_GridComp), intent(inout) :: GC
type(MAPL_LocStream), intent(in) :: EXCH
integer, intent(out), optional :: RC

Calls

proc~~mapl_exchangegridset~~CallsGraph proc~mapl_exchangegridset MAPL_ExchangeGridSet proc~mapl_exchangegridset->proc~mapl_exchangegridset ESMF_GridCompGet ESMF_GridCompGet proc~mapl_exchangegridset->ESMF_GridCompGet ESMF_UserCompGetInternalState ESMF_UserCompGetInternalState proc~mapl_exchangegridset->ESMF_UserCompGetInternalState none~get_child_gridcomp MAPL_MetaComp%get_child_gridcomp proc~mapl_exchangegridset->none~get_child_gridcomp none~get_num_children~3 CompositeComponent%get_num_children proc~mapl_exchangegridset->none~get_num_children~3 proc~mapl_return MAPL_Return proc~mapl_exchangegridset->proc~mapl_return proc~mapl_verify MAPL_Verify proc~mapl_exchangegridset->proc~mapl_verify none~get_gridcomp MaplGenericComponent%get_gridcomp none~get_child_gridcomp->none~get_gridcomp none~get_ith_child MAPL_MetaComp%get_ith_child none~get_child_gridcomp->none~get_ith_child none~get_num_children~5 ConcreteComposite%get_num_children none~get_num_children~3->none~get_num_children~5 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~is_threading_active MaplGenericComponent%is_threading_active none~get_gridcomp->none~is_threading_active proc~get_current_thread get_current_thread none~get_gridcomp->proc~get_current_thread none~get_child~26 MAPL_MetaComp%get_child none~get_ith_child->none~get_child~26 none~get_child_by_index CompositeComponent%get_child_by_index none~get_child~26->none~get_child_by_index none~get_child_by_name CompositeComponent%get_child_by_name none~get_child~26->none~get_child_by_name

Source Code

   recursive subroutine MAPL_ExchangeGridSet ( GC, EXCH, RC )

      ! !ARGUMENTS:

      type(ESMF_GridComp), intent(INOUT) :: GC     ! Gridded component
      type(MAPL_LocStream),intent(IN   ) :: EXCH   ! Exchange grid
      integer, optional,   intent(  OUT) :: RC     ! Error code:

      !EOPI

      ! ErrLog Variables

      character(len=ESMF_MAXSTR)    :: IAm
      character(len=ESMF_MAXSTR)    :: comp_name
      integer                       :: status

      ! Local derived type aliases

      type (MAPL_MetaComp),pointer     :: STATE
      integer                          :: I
      type(ESMF_GridComp), pointer :: gridcomp
      Iam = "MAPL_ExchangeGridSet"
      call ESMF_GridCompGet( GC, NAME=comp_name, RC=status )
      _VERIFY(status)
      Iam = trim(comp_name) // trim(Iam)

      ! Retrieve the pointer to the internal state.
      ! -------------------------------------------

      call MAPL_InternalStateGet ( GC, STATE, RC=status)
      _VERIFY(status)

      STATE%EXCHANGEGRID=EXCH

      do I = 1, STATE%get_num_children()
         gridcomp => STATE%GET_CHILD_GRIDCOMP(I)
         call MAPL_ExchangeGridSet(gridcomp, exch, RC=status)
         _VERIFY(status)
      end do

      _RETURN(ESMF_SUCCESS)
   end subroutine MAPL_ExchangeGridSet