MAPL_ChildAddAttribToImportSpec Subroutine

public subroutine MAPL_ChildAddAttribToImportSpec(STATE, CHILD_ID, REFRESH_INTERVAL, AVERAGING_INTERVAL, OFFSET, RC)

Arguments

Type IntentOptional Attributes Name
type(MAPL_MetaComp), intent(inout) :: STATE
integer, intent(in) :: CHILD_ID
integer, intent(in), optional :: REFRESH_INTERVAL
integer, intent(in), optional :: AVERAGING_INTERVAL
integer, intent(in), optional :: OFFSET
integer, intent(out), optional :: RC

Calls

proc~~mapl_childaddattribtoimportspec~~CallsGraph proc~mapl_childaddattribtoimportspec MAPL_ChildAddAttribToImportSpec ESMF_GridCompGet ESMF_GridCompGet proc~mapl_childaddattribtoimportspec->ESMF_GridCompGet interface~mapl_varspecset MAPL_VarSpecSet proc~mapl_childaddattribtoimportspec->interface~mapl_varspecset none~get_child_gridcomp MAPL_MetaComp%get_child_gridcomp proc~mapl_childaddattribtoimportspec->none~get_child_gridcomp none~get_num_children~3 CompositeComponent%get_num_children proc~mapl_childaddattribtoimportspec->none~get_num_children~3 proc~mapl_internalstateretrieve MAPL_InternalStateRetrieve proc~mapl_childaddattribtoimportspec->proc~mapl_internalstateretrieve proc~mapl_return MAPL_Return proc~mapl_childaddattribtoimportspec->proc~mapl_return proc~mapl_verify MAPL_Verify proc~mapl_childaddattribtoimportspec->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 proc~mapl_internalstateretrieve->ESMF_GridCompGet proc~mapl_internalstateretrieve->proc~mapl_return proc~mapl_internalstateretrieve->proc~mapl_verify 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~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 proc~mapl_internalstatecreate->ESMF_GridCompGet proc~mapl_internalstatecreate->proc~mapl_return proc~mapl_internalstatecreate->proc~mapl_verify 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~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

   subroutine MAPL_ChildAddAttribToImportSpec ( STATE, CHILD_ID, &
        REFRESH_INTERVAL, AVERAGING_INTERVAL, OFFSET, RC )

      !ARGUMENTS:
      type (MAPL_MetaComp)            , intent(INOUT)   :: STATE
      integer                         , intent(IN)      :: CHILD_ID
      integer            , optional   , intent(IN)      :: REFRESH_INTERVAL
      integer            , optional   , intent(IN)      :: AVERAGING_INTERVAL
      integer            , optional   , intent(IN)      :: OFFSET
      integer            , optional   , intent(OUT)     :: RC
      !EOPI

      character(len=ESMF_MAXSTR), parameter :: IAm="MAPL_ChildAddAttribToImportSpec"
      integer                               :: status
      type (MAPL_VarSpec),      pointer     :: SPECS(:)
      integer                               :: I
      type(ESMF_GridComp), pointer :: gridcomp


      if (.not. STATE%get_num_children() > 0) then
         _RETURN(ESMF_FAILURE)
      end if

      gridcomp => STATE%GET_CHILD_GRIDCOMP(CHILD_ID)
      call MAPL_GridCompGetVarSpecs(gridcomp, IMPORT=SPECS, RC=status)
      _VERIFY(status)

      do I = 1, size(SPECS)

         call MAPL_VarSpecSet(SPECS(I),                  &
              ACCMLT_INTERVAL= AVERAGING_INTERVAL,       &
              COUPLE_INTERVAL= REFRESH_INTERVAL,         &
              OFFSET         = OFFSET,                   &
              RC=status  )
         _VERIFY(status)
      end do

      _RETURN(ESMF_SUCCESS)
   end subroutine MAPL_ChildAddAttribToImportSpec