2 ! Earth System Modeling Framework
3 ! Copyright 2002-2003, University Corporation for Atmospheric Research,
4 ! Massachusetts Institute of Technology, Geophysical Fluid Dynamics
5 ! Laboratory, University of Michigan, National Centers for Environmental
6 ! Prediction, Los Alamos National Laboratory, Argonne National Laboratory,
7 ! NASA Goddard Space Flight Center.
8 ! Licensed under the University of Illinois-NCSA license.
10 !==============================================================================
15 !==============================================================================
17 ! This file contains the Alarm class definition and all Alarm class
20 !------------------------------------------------------------------------------
22 #include <ESMF_TimeMgr.inc>
24 !===============================================================================
27 ! !MODULE: ESMF_AlarmMod
30 ! Part of Time Manager F90 API wrapper of C++ implemenation
32 ! Defines F90 wrapper entry points for corresponding
33 ! C++ class {\tt ESMC\_Alarm}
35 ! See {\tt ../include/ESMC\_Alarm.h} for complete description
37 !------------------------------------------------------------------------------
39 ! inherit from ESMF base class
42 ! associated derived types
43 use ESMF_TimeIntervalMod, only : ESMF_TimeInterval, &
44 ESMF_TimeIntervalAbsValue
45 use ESMF_TimeMod, only : ESMF_Time
49 !------------------------------------------------------------------------------
52 !------------------------------------------------------------------------------
55 ! ! F90 class type to match C++ Alarm class in size only;
56 ! ! all dereferencing within class is performed by C++ implementation
58 ! internals for ESMF_Alarm
60 type(ESMF_TimeInterval) :: RingInterval
61 type(ESMF_Time) :: RingTime
62 type(ESMF_Time) :: PrevRingTime
63 type(ESMF_Time) :: StopTime
68 logical :: RingTimeSet
69 logical :: RingIntervalSet
70 logical :: StopTimeSet
73 ! Actual public type: this bit allows easy mimic of "deep" ESMF_AlarmCreate
74 ! in ESMF 2.1.0+. Note that ESMF_AlarmCreate is in a separate module to avoid
76 ! NOTE: DO NOT ADD NON-POINTER STATE TO THIS DATA TYPE. It emulates ESMF
77 ! shallow-copy-masquerading-as-reference-copy insanity.
79 type(ESMF_AlarmInt), pointer :: alarmint
82 !------------------------------------------------------------------------------
85 public ESMF_AlarmInt ! needed on AIX but not PGI
86 !------------------------------------------------------------------------------
88 ! !PUBLIC MEMBER FUNCTIONS:
89 public ESMF_AlarmDestroy
92 ! public ESMF_AlarmGetRingInterval
93 ! public ESMF_AlarmSetRingInterval
94 ! public ESMF_AlarmGetRingTime
95 ! public ESMF_AlarmSetRingTime
96 ! public ESMF_AlarmGetPrevRingTime
97 ! public ESMF_AlarmSetPrevRingTime
98 ! public ESMF_AlarmGetStopTime
99 ! public ESMF_AlarmSetStopTime
100 public ESMF_AlarmEnable
101 public ESMF_AlarmDisable
102 public ESMF_AlarmRingerOn
103 public ESMF_AlarmRingerOff
104 public ESMF_AlarmIsRinging
105 ! public ESMF_AlarmCheckRingTime
108 ! Required inherited and overridden ESMF_Base class methods
110 ! public ESMF_AlarmRead
111 ! public ESMF_AlarmWrite
112 public ESMF_AlarmValidate
113 public ESMF_AlarmPrint
115 ! !PRIVATE MEMBER FUNCTIONS:
119 !==============================================================================
123 !==============================================================================
126 interface operator(==)
128 ! !PRIVATE MEMBER FUNCTIONS:
129 module procedure ESMF_AlarmEQ
132 ! This interface overloads the == operator for the {\tt ESMF\_Alarm} class
137 !------------------------------------------------------------------------------
139 !==============================================================================
143 !==============================================================================
145 !------------------------------------------------------------------------------
147 ! This section includes the Set methods.
149 !------------------------------------------------------------------------------
151 ! !IROUTINE: ESMF_AlarmSet - Initializes an alarm
154 subroutine ESMF_AlarmSet(alarm, RingTime, RingInterval, PrevRingTime, &
155 StopTime, Enabled, rc)
158 type(ESMF_Alarm), intent(inout) :: alarm ! really INTENT(OUT)
159 type(ESMF_Time), intent(in), optional :: RingTime, PrevRingTime
160 type(ESMF_TimeInterval), intent(in), optional :: RingInterval
161 type(ESMF_Time), intent(in), optional :: StopTime
162 logical, intent(in), optional :: Enabled
163 integer, intent(out), optional :: rc
166 ! Initializes an {\tt ESMF\_Alarm}
169 ! \begin{description}
171 ! The object instance to initialize
172 ! \item[{[RingTime]}]
173 ! Optional ring time for one-shot or first repeating alarm
174 ! \item[{[RingInterval]}]
175 ! Optional ring interval for repeating alarms
176 ! \item[{[StopTime]}]
177 ! Optional stop time for repeating alarms
179 ! Alarm enabled/disabled
181 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
187 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
188 alarm%alarmint%RingTimeSet = .FALSE.
189 alarm%alarmint%RingIntervalSet = .FALSE.
190 alarm%alarmint%StopTimeSet = .FALSE.
191 IF ( PRESENT( RingInterval ) ) THEN
192 ! force RingInterval to be positive
193 alarm%alarmint%RingInterval = &
194 ESMF_TimeIntervalAbsValue( RingInterval )
195 alarm%alarmint%RingIntervalSet = .TRUE.
197 IF ( PRESENT( PrevRingTime ) ) THEN
198 alarm%alarmint%PrevRingTime = PrevRingTime
200 IF ( PRESENT( RingTime ) ) THEN
201 alarm%alarmint%RingTime = RingTime
202 alarm%alarmint%RingTimeSet = .TRUE.
204 IF ( PRESENT( StopTime ) ) THEN
205 alarm%alarmint%StopTime = StopTime
206 alarm%alarmint%StopTimeSet = .TRUE.
208 alarm%alarmint%Enabled = .TRUE.
209 IF ( PRESENT( Enabled ) ) THEN
210 alarm%alarmint%Enabled = Enabled
212 IF ( PRESENT( rc ) ) THEN
215 alarm%alarmint%Ringing = .FALSE.
216 alarm%alarmint%Enabled = .TRUE.
218 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
221 end subroutine ESMF_AlarmSet
225 ! Deallocate memory for ESMF_Alarm
226 SUBROUTINE ESMF_AlarmDestroy( alarm, rc )
227 TYPE(ESMF_Alarm), INTENT(INOUT) :: alarm
228 INTEGER, INTENT( OUT), OPTIONAL :: rc
229 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
230 DEALLOCATE( alarm%alarmint )
232 ! TBH: ignore deallocate errors, for now
233 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
234 END SUBROUTINE ESMF_AlarmDestroy
238 !------------------------------------------------------------------------------
240 ! !IROUTINE: ESMF_AlarmGetRingInterval - Get an alarm's ring interval
243 subroutine ESMF_AlarmGetRingInterval(alarm, RingInterval, rc)
246 type(ESMF_Alarm), intent(in) :: alarm
247 type(ESMF_TimeInterval), intent(out) :: RingInterval
248 integer, intent(out), optional :: rc
251 ! Get an {\tt ESMF\_Alarm}'s ring interval
254 ! \begin{description}
256 ! The object instance to get the ring interval
257 ! \item[RingInterval]
258 ! The {\tt Alarm}'s ring interval
260 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
266 RingInterval = alarm%alarmint%RingInterval
268 end subroutine ESMF_AlarmGetRingInterval
270 !------------------------------------------------------------------------------
272 ! !IROUTINE: ESMF_AlarmSetRingInterval - Set an alarm's ring interval
275 subroutine ESMF_AlarmSetRingInterval(alarm, RingInterval, rc)
278 type(ESMF_Alarm), intent(out) :: alarm
279 type(ESMF_TimeInterval), intent(in) :: RingInterval
280 integer, intent(out), optional :: rc
283 ! Set an {\tt ESMF\_Alarm}'s ring interval
286 ! \begin{description}
288 ! The object instance to set the ring interval
289 ! \item[RingInterval]
290 ! The {\tt Alarm}'s ring interval
292 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
298 CALL wrf_error_fatal( 'ESMF_AlarmSetRingInterval not supported' )
299 end subroutine ESMF_AlarmSetRingInterval
301 !------------------------------------------------------------------------------
303 ! !IROUTINE: ESMF_AlarmGetRingTime - Get an alarm's time to ring
306 subroutine ESMF_AlarmGetRingTime(alarm, RingTime, rc)
309 type(ESMF_Alarm), intent(in) :: alarm
310 type(ESMF_Time), intent(out) :: RingTime
311 integer, intent(out), optional :: rc
314 ! Get an {\tt ESMF\_Alarm}'s time to ring
317 ! \begin{description}
319 ! The object instance to get the ring time
321 ! The {\tt ESMF\_Alarm}'s ring time
323 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
329 CALL wrf_error_fatal( 'ESMF_AlarmGetRingTime not supported' )
330 end subroutine ESMF_AlarmGetRingTime
332 !------------------------------------------------------------------------------
334 ! !IROUTINE: ESMF_AlarmSetRingTime - Set an alarm's time to ring
337 subroutine ESMF_AlarmSetRingTime(alarm, RingTime, rc)
340 type(ESMF_Alarm), intent(out) :: alarm
341 type(ESMF_Time), intent(in) :: RingTime
342 integer, intent(out), optional :: rc
345 ! Set an {\tt ESMF\_Alarm}'s time to ring
348 ! \begin{description}
350 ! The object instance to set the ring time
352 ! The {\tt ESMF\_Alarm}'s ring time to set
354 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
358 ! TMG4.5.1, TMG4.7, TMG4.8
360 CALL wrf_error_fatal( 'ESMF_AlarmSetRingTime not supported' )
361 end subroutine ESMF_AlarmSetRingTime
363 !------------------------------------------------------------------------------
365 ! !IROUTINE: ESMF_AlarmGet - Get an alarm's parameters -- compatibility with ESMF 2.0.1
368 subroutine ESMF_AlarmGet(alarm, PrevRingTime, RingInterval, rc)
371 type(ESMF_Alarm), intent(in) :: alarm
372 type(ESMF_Time), intent(out), optional :: PrevRingTime
373 type(ESMF_TimeInterval), intent(out), optional :: RingInterval
374 integer, intent(out), optional :: rc
378 ! Get an {\tt ESMF\_Alarm}'s previous ring time
381 ! \begin{description}
383 ! The object instance to get the previous ring time
384 ! \item[PrevRingTime]
385 ! The {\tt ESMF\_Alarm}'s previous ring time
387 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
396 IF ( PRESENT(PrevRingTime) ) THEN
397 CALL ESMF_AlarmGetPrevRingTime(alarm, PrevRingTime, rc=ierr)
399 IF ( PRESENT(RingInterval) ) THEN
400 CALL ESMF_AlarmGetRingInterval(alarm, RingInterval, rc=ierr)
403 IF ( PRESENT(rc) ) THEN
407 end subroutine ESMF_AlarmGet
409 !------------------------------------------------------------------------------
411 ! !IROUTINE: ESMF_AlarmGetPrevRingTime - Get an alarm's previous ring time
414 subroutine ESMF_AlarmGetPrevRingTime(alarm, PrevRingTime, rc)
417 type(ESMF_Alarm), intent(in) :: alarm
418 type(ESMF_Time), intent(out) :: PrevRingTime
419 integer, intent(out), optional :: rc
422 ! Get an {\tt ESMF\_Alarm}'s previous ring time
425 ! \begin{description}
427 ! The object instance to get the previous ring time
428 ! \item[PrevRingTime]
429 ! The {\tt ESMF\_Alarm}'s previous ring time
431 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
437 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
438 PrevRingTime = alarm%alarmint%PrevRingTime
439 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
441 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
443 end subroutine ESMF_AlarmGetPrevRingTime
445 !------------------------------------------------------------------------------
447 ! !IROUTINE: ESMF_AlarmSetPrevRingTime - Set an alarm's previous ring time
450 subroutine ESMF_AlarmSetPrevRingTime(alarm, PrevRingTime, rc)
453 type(ESMF_Alarm), intent(out) :: alarm
454 type(ESMF_Time), intent(in) :: PrevRingTime
455 integer, intent(out), optional :: rc
458 ! Set an {\tt ESMF\_Alarm}'s previous ring time
461 ! \begin{description}
463 ! The object instance to set the previous ring time
464 ! \item[PrevRingTime]
465 ! The {\tt ESMF\_Alarm}'s previous ring time to set
467 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
473 CALL wrf_error_fatal( 'ESMF_AlarmSetPrevRingTime not supported' )
474 end subroutine ESMF_AlarmSetPrevRingTime
476 !------------------------------------------------------------------------------
478 ! !IROUTINE: ESMF_AlarmGetStopTime - Get an alarm's stop time
481 subroutine ESMF_AlarmGetStopTime(alarm, StopTime, rc)
484 type(ESMF_Alarm), intent(in) :: alarm
485 type(ESMF_Time), intent(out) :: StopTime
486 integer, intent(out), optional :: rc
489 ! Get an {\tt ESMF\_Alarm}'s stop time
492 ! \begin{description}
494 ! The object instance to get the stop time
496 ! The {\tt ESMF\_Alarm}'s stop time
498 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
504 CALL wrf_error_fatal( 'ESMF_AlarmGetStopTime not supported' )
505 end subroutine ESMF_AlarmGetStopTime
507 !------------------------------------------------------------------------------
509 ! !IROUTINE: ESMF_AlarmSetStopTime - Set an alarm's stop time
512 subroutine ESMF_AlarmSetStopTime(alarm, StopTime, rc)
515 type(ESMF_Alarm), intent(out) :: alarm
516 type(ESMF_Time), intent(in) :: StopTime
517 integer, intent(out), optional :: rc
520 ! Set an {\tt ESMF\_Alarm}'s stop time
523 ! \begin{description}
525 ! The object instance to set the stop time
527 ! The {\tt ESMF\_Alarm}'s stop time
529 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
535 CALL wrf_error_fatal( 'ESMF_AlarmSetStopTime not supported' )
536 end subroutine ESMF_AlarmSetStopTime
538 !------------------------------------------------------------------------------
540 ! !IROUTINE: ESMF_AlarmEnable - Enables an alarm
543 subroutine ESMF_AlarmEnable(alarm, rc)
546 type(ESMF_Alarm), intent(inout) :: alarm ! really INTENT(OUT)
547 integer, intent(out), optional :: rc
550 ! Enables an {\tt ESMF\_Alarm} to function
553 ! \begin{description}
555 ! The object instance to enable
557 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
563 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
564 alarm%alarmint%Enabled = .TRUE.
565 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
567 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
569 end subroutine ESMF_AlarmEnable
571 !------------------------------------------------------------------------------
573 ! !IROUTINE: ESMF_AlarmDisable - Disables an alarm
576 subroutine ESMF_AlarmDisable(alarm, rc)
579 type(ESMF_Alarm), intent(inout) :: alarm ! really INTENT(OUT)
580 integer, intent(out), optional :: rc
583 ! Disables an {\tt ESMF\_Alarm}
586 ! \begin{description}
588 ! The object instance to disable
590 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
596 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
597 alarm%alarmint%Enabled = .FALSE.
598 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
600 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
602 end subroutine ESMF_AlarmDisable
604 !------------------------------------------------------------------------------
606 ! !IROUTINE: ESMF_AlarmRingerOn - Turn on an alarm
610 subroutine ESMF_AlarmRingerOn(alarm, rc)
613 type(ESMF_Alarm), intent(inout) :: alarm ! really INTENT(OUT)
614 integer, intent(out), optional :: rc
617 ! Turn on an {\tt ESMF\_Alarm}; sets ringing state
620 ! \begin{description}
622 ! The object instance to turn on
624 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
630 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
631 IF ( alarm%alarmint%Enabled ) THEN
632 alarm%alarmint%Ringing = .TRUE.
633 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
635 alarm%alarmint%Ringing = .FALSE.
636 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
639 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
642 end subroutine ESMF_AlarmRingerOn
644 !------------------------------------------------------------------------------
646 ! !IROUTINE: ESMF_AlarmRingerOff - Turn off an alarm
649 subroutine ESMF_AlarmRingerOff(alarm, rc)
652 type(ESMF_Alarm), intent(inout) :: alarm ! really INTENT(OUT)
653 integer, intent(out), optional :: rc
656 ! Turn off an {\tt ESMF\_Alarm}; unsets ringing state
659 ! \begin{description}
661 ! The object instance to turn off
663 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
669 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
670 alarm%alarmint%Ringing = .FALSE.
671 IF ( alarm%alarmint%Enabled ) THEN
672 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
674 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
677 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
679 end subroutine ESMF_AlarmRingerOff
681 !------------------------------------------------------------------------------
683 ! !IROUTINE: ESMF_AlarmIsRinging - Check if alarm is ringing
686 function ESMF_AlarmIsRinging(alarm, rc)
689 logical :: ESMF_AlarmIsRinging
692 type(ESMF_Alarm), intent(in) :: alarm
693 integer, intent(out), optional :: rc
696 ! Check if {\tt ESMF\_Alarm} is ringing.
699 ! \begin{description}
701 ! The object instance to check for ringing state
703 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
709 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
710 IF ( alarm%alarmint%Enabled ) THEN
711 ESMF_AlarmIsRinging = alarm%alarmint%Ringing
712 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
714 ESMF_AlarmIsRinging = .FALSE.
715 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
718 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
720 end function ESMF_AlarmIsRinging
722 !------------------------------------------------------------------------------
724 ! !IROUTINE: ESMF_AlarmCheckRingTime - Method used by a clock to check whether to trigger an alarm
727 function ESMF_AlarmCheckRingTime(alarm, ClockCurrTime, positive, rc)
730 logical :: ESMF_AlarmCheckRingTime
733 type(ESMF_Alarm), intent(inout) :: alarm
734 type(ESMF_Time), intent(in) :: ClockCurrTime
735 integer, intent(in) :: positive
736 integer, intent(out), optional :: rc
739 ! Main method used by a {\tt ESMF\_Clock} to check whether to trigger
740 ! the {\tt ESMF\_Alarm}
743 ! \begin{description}
745 ! The object instance to check if time to ring
746 ! \item[ClockCurrTime]
747 ! The {\tt ESMF\_Clock}'s current time
749 ! Whether to check ring time in the positive or negative direction
751 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
757 CALL wrf_error_fatal( 'ESMF_AlarmCheckRingTime not supported' )
758 ESMF_AlarmCheckRingTime = .FALSE. ! keep compilers happy
759 end function ESMF_AlarmCheckRingTime
761 !------------------------------------------------------------------------------
763 ! !IROUTINE: ESMF_AlarmEQ - Compare two alarms for equality
766 function ESMF_AlarmEQ(alarm1, alarm2)
769 logical :: ESMF_AlarmEQ
772 type(ESMF_Alarm), intent(in) :: alarm1
773 type(ESMF_Alarm), intent(in) :: alarm2
776 ! Compare two alarms for equality; return true if equal, false otherwise
777 ! Maps to overloaded (==) operator interface function
780 ! \begin{description}
782 ! The first {\tt ESMF\_Alarm} to compare
784 ! The second {\tt ESMF\_Alarm} to compare
789 CALL wrf_error_fatal( 'ESMF_AlarmEQ not supported ' )
790 ESMF_AlarmEQ = .FALSE. ! keep compilers happy
791 end function ESMF_AlarmEQ
793 !------------------------------------------------------------------------------
795 ! This section defines the overridden Read, Write, Validate and Print methods
796 ! from the ESMF_Base class
798 !------------------------------------------------------------------------------
800 ! !IROUTINE: ESMF_AlarmRead - restores an alarm
803 subroutine ESMF_AlarmRead(alarm, RingInterval, RingTime, &
804 PrevRingTime, StopTime, Ringing, &
808 type(ESMF_Alarm), intent(out) :: alarm
809 type(ESMF_TimeInterval), intent(in) :: RingInterval
810 type(ESMF_Time), intent(in) :: RingTime
811 type(ESMF_Time), intent(in) :: PrevRingTime
812 type(ESMF_Time), intent(in) :: StopTime
813 logical, intent(in) :: Ringing
814 logical, intent(in) :: Enabled
815 integer, intent(in) :: ID
816 integer, intent(out), optional :: rc
819 ! Restores an {\tt ESMF\_Alarm}
822 ! \begin{description}
824 ! The object instance to restore
825 ! \item[RingInterval]
826 ! The ring interval for repeating alarms
828 ! Ring time for one-shot or first repeating alarm
829 ! \item[PrevRingTime]
830 ! The {\tt ESMF\_Alarm}'s previous ring time
832 ! Stop time for repeating alarms
834 ! The {\tt ESMF\_Alarm}'s ringing state
836 ! {\tt ESMF\_Alarm} enabled/disabled
838 ! The {\tt ESMF\_Alarm}'s ID
840 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
845 CALL wrf_error_fatal( 'ESMF_AlarmRead not supported' )
846 end subroutine ESMF_AlarmRead
848 !------------------------------------------------------------------------------
850 ! !IROUTINE: ESMF_AlarmWrite - saves an alarm
853 subroutine ESMF_AlarmWrite(alarm, RingInterval, RingTime, &
854 PrevRingTime, StopTime, Ringing, &
858 type(ESMF_Alarm), intent(in) :: alarm
859 type(ESMF_TimeInterval), intent(out) :: RingInterval
860 type(ESMF_Time), intent(out) :: RingTime
861 type(ESMF_Time), intent(out) :: PrevRingTime
862 type(ESMF_Time), intent(out) :: StopTime
863 logical, intent(out) :: Ringing
864 logical, intent(out) :: Enabled
865 integer, intent(out) :: ID
866 integer, intent(out), optional :: rc
869 ! Saves an {\tt ESMF\_Alarm}
872 ! \begin{description}
874 ! The object instance to save
875 ! \item[RingInterval]
876 ! Ring interval for repeating alarms
878 ! Ring time for one-shot or first repeating alarm
879 ! \item[PrevRingTime]
880 ! The {\tt ESMF\_Alarm}'s previous ring time
882 ! Stop time for repeating alarms
884 ! The {\tt ESMF\_Alarm}'s ringing state
886 ! {\tt ESMF\_Alarm} enabled/disabled
888 ! The {\tt ESMF\_Alarm}'s ID
890 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
895 CALL wrf_error_fatal( 'ESMF_AlarmWrite not supported' )
896 end subroutine ESMF_AlarmWrite
898 !------------------------------------------------------------------------------
900 ! !IROUTINE: ESMF_AlarmValidate - Validate an Alarm's properties
903 subroutine ESMF_AlarmValidate(alarm, opts, rc)
906 type(ESMF_Alarm), intent(in) :: alarm
907 character (len=*), intent(in), optional :: opts
908 integer, intent(out), optional :: rc
911 ! Perform a validation check on a {\tt ESMF\_Alarm}'s properties
914 ! \begin{description}
916 ! {\tt ESMF\_Alarm} to validate
920 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
926 CALL wrf_error_fatal( 'ESMF_AlarmValidate not supported' )
927 end subroutine ESMF_AlarmValidate
929 !------------------------------------------------------------------------------
931 ! !IROUTINE: ESMF_AlarmPrint - Print out an Alarm's properties
934 subroutine ESMF_AlarmPrint(alarm, opts, rc)
937 type(ESMF_Alarm), intent(in) :: alarm
938 character (len=*), intent(in), optional :: opts
939 integer, intent(out), optional :: rc
942 ! To support testing/debugging, print out a {\tt ESMF\_Alarm}'s
946 ! \begin{description}
948 ! {\tt ESMF\_Alarm} to print out
952 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
958 CALL wrf_error_fatal( 'ESMF_AlarmPrint not supported' )
959 end subroutine ESMF_AlarmPrint
961 !------------------------------------------------------------------------------
963 end module ESMF_AlarmMod