MAPL_DisableRecord Subroutine

public recursive subroutine MAPL_DisableRecord(MAPLOBJ, ALARM_NAME, rc)

Arguments

Type IntentOptional Attributes Name
type(MAPL_MetaComp), intent(inout) :: MAPLOBJ
character(len=*), intent(in) :: ALARM_NAME
integer, intent(out), optional :: rc

Calls

proc~~mapl_disablerecord~~CallsGraph proc~mapl_disablerecord MAPL_DisableRecord proc~mapl_disablerecord->proc~mapl_disablerecord ESMF_AlarmDisable ESMF_AlarmDisable proc~mapl_disablerecord->ESMF_AlarmDisable ESMF_AlarmGet ESMF_AlarmGet proc~mapl_disablerecord->ESMF_AlarmGet interface~mapl_getobjectfromgc MAPL_GetObjectFromGC proc~mapl_disablerecord->interface~mapl_getobjectfromgc none~get_child_gridcomp MAPL_MetaComp%get_child_gridcomp proc~mapl_disablerecord->none~get_child_gridcomp none~get_num_children~3 CompositeComponent%get_num_children proc~mapl_disablerecord->none~get_num_children~3 proc~mapl_return MAPL_Return proc~mapl_disablerecord->proc~mapl_return proc~mapl_verify MAPL_Verify proc~mapl_disablerecord->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_DisableRecord(MAPLOBJ, ALARM_NAME, RC)
      type(MAPL_MetaComp), intent(inout) :: MAPLOBJ
      character(len=*),    intent(in   ) :: ALARM_NAME
      integer, optional,   intent(out) :: rc

      integer :: k
      character(len=ESMF_MAXSTR) :: ANAME
      type(MAPL_MetaComp), pointer :: CMAPL => null()

      integer :: status
      character(len=ESMF_MAXSTR), parameter :: Iam="MAPL_DisableRecord"
      type(ESMF_GridComp), pointer :: gridcomp

      do k=1,MAPLOBJ%get_num_children()
         gridcomp => MAPLOBJ%GET_CHILD_GRIDCOMP(K)
         call MAPL_GetObjectFromGC ( gridcomp, CMAPL, RC=status)
         _VERIFY(status)
         call MAPL_DisableRecord(CMAPL,ALARM_NAME,RC=status)
         _VERIFY(status)
      enddo

      do k=1,size(MAPLOBJ%record%alarm)
         call ESMF_AlarmGet(MAPLOBJ%RECORD%ALARM(K), name=ANAME, RC=status)
         if (trim(ANAME)==trim(ALARM_NAME)) then
            call ESMF_AlarmDisable(MAPLOBJ%RECORD%ALARM(K))
            _RETURN(ESMF_SUCCESS)
         end if
      enddo
      _RETURN(ESMF_FAILURE)

   end subroutine MAPL_DisableRecord