MAPL_SetStateSave Subroutine

public recursive subroutine MAPL_SetStateSave(state, filetype, rc)

Arguments

Type IntentOptional Attributes Name
type(MAPL_MetaComp), intent(inout) :: state
integer, intent(in) :: filetype
integer, intent(out), optional :: rc

Calls

proc~~mapl_setstatesave~~CallsGraph proc~mapl_setstatesave MAPL_SetStateSave proc~mapl_setstatesave->proc~mapl_setstatesave interface~mapl_getobjectfromgc MAPL_GetObjectFromGC proc~mapl_setstatesave->interface~mapl_getobjectfromgc none~get_child_gridcomp MAPL_MetaComp%get_child_gridcomp proc~mapl_setstatesave->none~get_child_gridcomp none~get_num_children~5 CompositeComponent%get_num_children proc~mapl_setstatesave->none~get_num_children~5 proc~mapl_verify MAPL_Verify proc~mapl_setstatesave->proc~mapl_verify none~get_gridcomp~2 MaplGenericComponent%get_gridcomp none~get_child_gridcomp->none~get_gridcomp~2 none~get_ith_child MAPL_MetaComp%get_ith_child none~get_child_gridcomp->none~get_ith_child none~get_num_children~3 ConcreteComposite%get_num_children none~get_num_children~5->none~get_num_children~3 proc~mapl_throw_exception MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception none~is_threading_active MaplGenericComponent%is_threading_active none~get_gridcomp~2->none~is_threading_active proc~get_current_thread get_current_thread none~get_gridcomp~2->proc~get_current_thread none~get_child~57 MAPL_MetaComp%get_child none~get_ith_child->none~get_child~57 none~get_child_by_index~3 CompositeComponent%get_child_by_index none~get_child~57->none~get_child_by_index~3 none~get_child_by_name~4 CompositeComponent%get_child_by_name none~get_child~57->none~get_child_by_name~4

Source Code

   recursive subroutine MAPL_SetStateSave(state,filetype,rc)
      type(MAPL_MetaComp), intent(inout) :: state
      integer,             intent(in ) :: filetype
      integer, optional,   intent(out) :: rc
      type(MAPL_MetaComp), pointer :: CMAPL => null()
      integer :: k, status

      type(ESMF_GridComp), pointer :: gridcomp

      do k=1,state%get_num_children()
         gridcomp => state%GET_CHILD_GRIDCOMP(K)
         call MAPL_GetObjectFromGC ( gridcomp, CMAPL, RC=status)
         _VERIFY(status)
         call MAPL_SetStateSave(CMAPL,filetype,RC=status)
         _VERIFY(status)
      enddo

      state%initial_state%filetype = filetype

   end subroutine MAPL_SetStateSave