2 !==============================================================================
5 module WRF_ESMF_AlarmMod
7 !==============================================================================
9 ! This file contains the Alarm class definition and all Alarm class
12 !------------------------------------------------------------------------------
14 #include <ESMF_TimeMgr.inc>
16 !===============================================================================
19 ! !MODULE: WRF_ESMF_AlarmMod
22 ! Part of Time Manager F90 API wrapper of C++ implemenation
24 ! Defines F90 wrapper entry points for corresponding
25 ! C++ class {\tt ESMC\_Alarm}
27 ! See {\tt ../include/ESMC\_Alarm.h} for complete description
29 !------------------------------------------------------------------------------
31 ! inherit from ESMF base class
34 ! associated derived types
35 use WRF_ESMF_TimeIntervalMod, only : ESMF_TimeInterval, &
36 ESMF_TimeIntervalAbsValue
37 use WRF_ESMF_TimeMod, only : ESMF_Time
41 !------------------------------------------------------------------------------
44 !------------------------------------------------------------------------------
47 ! ! F90 class type to match C++ Alarm class in size only;
48 ! ! all dereferencing within class is performed by C++ implementation
50 ! internals for ESMF_Alarm
52 type(ESMF_TimeInterval) :: RingInterval
53 type(ESMF_Time) :: RingTime
54 type(ESMF_Time) :: PrevRingTime
55 type(ESMF_Time) :: StopTime
60 logical :: RingTimeSet
61 logical :: RingIntervalSet
62 logical :: StopTimeSet
65 ! Actual public type: this bit allows easy mimic of "deep" ESMF_AlarmCreate
66 ! in ESMF 2.1.0+. Note that ESMF_AlarmCreate is in a separate module to avoid
68 ! NOTE: DO NOT ADD NON-POINTER STATE TO THIS DATA TYPE. It emulates ESMF
69 ! shallow-copy-masquerading-as-reference-copy insanity.
71 type(ESMF_AlarmInt), pointer :: alarmint
74 !------------------------------------------------------------------------------
77 public ESMF_AlarmInt ! needed on AIX but not PGI
78 !------------------------------------------------------------------------------
80 ! !PUBLIC MEMBER FUNCTIONS:
81 public ESMF_AlarmDestroy
84 ! public ESMF_AlarmGetRingInterval
85 ! public ESMF_AlarmSetRingInterval
86 ! public ESMF_AlarmGetRingTime
87 ! public ESMF_AlarmSetRingTime
88 ! public ESMF_AlarmGetPrevRingTime
89 ! public ESMF_AlarmSetPrevRingTime
90 ! public ESMF_AlarmGetStopTime
91 ! public ESMF_AlarmSetStopTime
92 public ESMF_AlarmEnable
93 public ESMF_AlarmDisable
94 public ESMF_AlarmRingerOn
95 public ESMF_AlarmRingerOff
96 public ESMF_AlarmIsRinging
97 ! public ESMF_AlarmCheckRingTime
100 ! Required inherited and overridden ESMF_Base class methods
102 ! public ESMF_AlarmRead
103 ! public ESMF_AlarmWrite
104 public ESMF_AlarmValidate
105 public ESMF_AlarmPrint
107 ! !PRIVATE MEMBER FUNCTIONS:
111 !==============================================================================
115 !==============================================================================
118 interface operator(==)
120 ! !PRIVATE MEMBER FUNCTIONS:
121 module procedure ESMF_AlarmEQ
124 ! This interface overloads the == operator for the {\tt ESMF\_Alarm} class
129 !------------------------------------------------------------------------------
131 !==============================================================================
135 !==============================================================================
137 !------------------------------------------------------------------------------
139 ! This section includes the Set methods.
141 !------------------------------------------------------------------------------
143 ! !IROUTINE: ESMF_AlarmSet - Initializes an alarm
146 subroutine ESMF_AlarmSet(alarm, RingTime, RingInterval, PrevRingTime, &
147 StopTime, Enabled, rc)
150 type(ESMF_Alarm), intent(inout) :: alarm ! really INTENT(OUT)
151 type(ESMF_Time), intent(in), optional :: RingTime, PrevRingTime
152 type(ESMF_TimeInterval), intent(in), optional :: RingInterval
153 type(ESMF_Time), intent(in), optional :: StopTime
154 logical, intent(in), optional :: Enabled
155 integer, intent(out), optional :: rc
158 ! Initializes an {\tt ESMF\_Alarm}
161 ! \begin{description}
163 ! The object instance to initialize
164 ! \item[{[RingTime]}]
165 ! Optional ring time for one-shot or first repeating alarm
166 ! \item[{[RingInterval]}]
167 ! Optional ring interval for repeating alarms
168 ! \item[{[StopTime]}]
169 ! Optional stop time for repeating alarms
171 ! Alarm enabled/disabled
173 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
179 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
180 alarm%alarmint%RingTimeSet = .FALSE.
181 alarm%alarmint%RingIntervalSet = .FALSE.
182 alarm%alarmint%StopTimeSet = .FALSE.
183 IF ( PRESENT( RingInterval ) ) THEN
184 ! force RingInterval to be positive
185 alarm%alarmint%RingInterval = &
186 ESMF_TimeIntervalAbsValue( RingInterval )
187 alarm%alarmint%RingIntervalSet = .TRUE.
189 IF ( PRESENT( PrevRingTime ) ) THEN
190 alarm%alarmint%PrevRingTime = PrevRingTime
192 IF ( PRESENT( RingTime ) ) THEN
193 alarm%alarmint%RingTime = RingTime
194 alarm%alarmint%RingTimeSet = .TRUE.
196 IF ( PRESENT( StopTime ) ) THEN
197 alarm%alarmint%StopTime = StopTime
198 alarm%alarmint%StopTimeSet = .TRUE.
200 alarm%alarmint%Enabled = .TRUE.
201 IF ( PRESENT( Enabled ) ) THEN
202 alarm%alarmint%Enabled = Enabled
204 IF ( PRESENT( rc ) ) THEN
207 alarm%alarmint%Ringing = .FALSE.
208 alarm%alarmint%Enabled = .TRUE.
210 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
213 end subroutine ESMF_AlarmSet
217 ! Deallocate memory for ESMF_Alarm
218 SUBROUTINE ESMF_AlarmDestroy( alarm, rc )
219 TYPE(ESMF_Alarm), INTENT(INOUT) :: alarm
220 INTEGER, INTENT( OUT), OPTIONAL :: rc
221 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
222 DEALLOCATE( alarm%alarmint )
224 ! TBH: ignore deallocate errors, for now
225 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
226 END SUBROUTINE ESMF_AlarmDestroy
230 !------------------------------------------------------------------------------
232 ! !IROUTINE: ESMF_AlarmGetRingInterval - Get an alarm's ring interval
235 subroutine ESMF_AlarmGetRingInterval(alarm, RingInterval, rc)
238 type(ESMF_Alarm), intent(in) :: alarm
239 type(ESMF_TimeInterval), intent(out) :: RingInterval
240 integer, intent(out), optional :: rc
243 ! Get an {\tt ESMF\_Alarm}'s ring interval
246 ! \begin{description}
248 ! The object instance to get the ring interval
249 ! \item[RingInterval]
250 ! The {\tt Alarm}'s ring interval
252 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
258 RingInterval = alarm%alarmint%RingInterval
260 end subroutine ESMF_AlarmGetRingInterval
262 !------------------------------------------------------------------------------
264 ! !IROUTINE: ESMF_AlarmSetRingInterval - Set an alarm's ring interval
267 subroutine ESMF_AlarmSetRingInterval(alarm, RingInterval, rc)
270 type(ESMF_Alarm), intent(out) :: alarm
271 type(ESMF_TimeInterval), intent(in) :: RingInterval
272 integer, intent(out), optional :: rc
275 ! Set an {\tt ESMF\_Alarm}'s ring interval
278 ! \begin{description}
280 ! The object instance to set the ring interval
281 ! \item[RingInterval]
282 ! The {\tt Alarm}'s ring interval
284 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
290 CALL wrf_error_fatal( 'ESMF_AlarmSetRingInterval not supported' )
291 end subroutine ESMF_AlarmSetRingInterval
293 !------------------------------------------------------------------------------
295 ! !IROUTINE: ESMF_AlarmGetRingTime - Get an alarm's time to ring
298 subroutine ESMF_AlarmGetRingTime(alarm, RingTime, rc)
301 type(ESMF_Alarm), intent(in) :: alarm
302 type(ESMF_Time), intent(out) :: RingTime
303 integer, intent(out), optional :: rc
306 ! Get an {\tt ESMF\_Alarm}'s time to ring
309 ! \begin{description}
311 ! The object instance to get the ring time
313 ! The {\tt ESMF\_Alarm}'s ring time
315 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
321 CALL wrf_error_fatal( 'ESMF_AlarmGetRingTime not supported' )
322 end subroutine ESMF_AlarmGetRingTime
324 !------------------------------------------------------------------------------
326 ! !IROUTINE: ESMF_AlarmSetRingTime - Set an alarm's time to ring
329 subroutine ESMF_AlarmSetRingTime(alarm, RingTime, rc)
332 type(ESMF_Alarm), intent(out) :: alarm
333 type(ESMF_Time), intent(in) :: RingTime
334 integer, intent(out), optional :: rc
337 ! Set an {\tt ESMF\_Alarm}'s time to ring
340 ! \begin{description}
342 ! The object instance to set the ring time
344 ! The {\tt ESMF\_Alarm}'s ring time to set
346 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
350 ! TMG4.5.1, TMG4.7, TMG4.8
352 CALL wrf_error_fatal( 'ESMF_AlarmSetRingTime not supported' )
353 end subroutine ESMF_AlarmSetRingTime
355 !------------------------------------------------------------------------------
357 ! !IROUTINE: ESMF_AlarmGet - Get an alarm's parameters -- compatibility with ESMF 2.0.1
360 subroutine ESMF_AlarmGet(alarm, PrevRingTime, RingInterval, rc)
363 type(ESMF_Alarm), intent(in) :: alarm
364 type(ESMF_Time), intent(out), optional :: PrevRingTime
365 type(ESMF_TimeInterval), intent(out), optional :: RingInterval
366 integer, intent(out), optional :: rc
370 ! Get an {\tt ESMF\_Alarm}'s previous ring time
373 ! \begin{description}
375 ! The object instance to get the previous ring time
376 ! \item[PrevRingTime]
377 ! The {\tt ESMF\_Alarm}'s previous ring time
379 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
388 IF ( PRESENT(PrevRingTime) ) THEN
389 CALL ESMF_AlarmGetPrevRingTime(alarm, PrevRingTime, rc=ierr)
391 IF ( PRESENT(RingInterval) ) THEN
392 CALL ESMF_AlarmGetRingInterval(alarm, RingInterval, rc=ierr)
395 IF ( PRESENT(rc) ) THEN
399 end subroutine ESMF_AlarmGet
401 !------------------------------------------------------------------------------
403 ! !IROUTINE: ESMF_AlarmGetPrevRingTime - Get an alarm's previous ring time
406 subroutine ESMF_AlarmGetPrevRingTime(alarm, PrevRingTime, rc)
409 type(ESMF_Alarm), intent(in) :: alarm
410 type(ESMF_Time), intent(out) :: PrevRingTime
411 integer, intent(out), optional :: rc
414 ! Get an {\tt ESMF\_Alarm}'s previous ring time
417 ! \begin{description}
419 ! The object instance to get the previous ring time
420 ! \item[PrevRingTime]
421 ! The {\tt ESMF\_Alarm}'s previous ring time
423 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
429 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
430 PrevRingTime = alarm%alarmint%PrevRingTime
431 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
433 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
435 end subroutine ESMF_AlarmGetPrevRingTime
437 !------------------------------------------------------------------------------
439 ! !IROUTINE: ESMF_AlarmSetPrevRingTime - Set an alarm's previous ring time
442 subroutine ESMF_AlarmSetPrevRingTime(alarm, PrevRingTime, rc)
445 type(ESMF_Alarm), intent(out) :: alarm
446 type(ESMF_Time), intent(in) :: PrevRingTime
447 integer, intent(out), optional :: rc
450 ! Set an {\tt ESMF\_Alarm}'s previous ring time
453 ! \begin{description}
455 ! The object instance to set the previous ring time
456 ! \item[PrevRingTime]
457 ! The {\tt ESMF\_Alarm}'s previous ring time to set
459 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
465 CALL wrf_error_fatal( 'ESMF_AlarmSetPrevRingTime not supported' )
466 end subroutine ESMF_AlarmSetPrevRingTime
468 !------------------------------------------------------------------------------
470 ! !IROUTINE: ESMF_AlarmGetStopTime - Get an alarm's stop time
473 subroutine ESMF_AlarmGetStopTime(alarm, StopTime, rc)
476 type(ESMF_Alarm), intent(in) :: alarm
477 type(ESMF_Time), intent(out) :: StopTime
478 integer, intent(out), optional :: rc
481 ! Get an {\tt ESMF\_Alarm}'s stop time
484 ! \begin{description}
486 ! The object instance to get the stop time
488 ! The {\tt ESMF\_Alarm}'s stop time
490 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
496 CALL wrf_error_fatal( 'ESMF_AlarmGetStopTime not supported' )
497 end subroutine ESMF_AlarmGetStopTime
499 !------------------------------------------------------------------------------
501 ! !IROUTINE: ESMF_AlarmSetStopTime - Set an alarm's stop time
504 subroutine ESMF_AlarmSetStopTime(alarm, StopTime, rc)
507 type(ESMF_Alarm), intent(out) :: alarm
508 type(ESMF_Time), intent(in) :: StopTime
509 integer, intent(out), optional :: rc
512 ! Set an {\tt ESMF\_Alarm}'s stop time
515 ! \begin{description}
517 ! The object instance to set the stop time
519 ! The {\tt ESMF\_Alarm}'s stop time
521 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
527 CALL wrf_error_fatal( 'ESMF_AlarmSetStopTime not supported' )
528 end subroutine ESMF_AlarmSetStopTime
530 !------------------------------------------------------------------------------
532 ! !IROUTINE: ESMF_AlarmEnable - Enables an alarm
535 subroutine ESMF_AlarmEnable(alarm, rc)
538 type(ESMF_Alarm), intent(inout) :: alarm ! really INTENT(OUT)
539 integer, intent(out), optional :: rc
542 ! Enables an {\tt ESMF\_Alarm} to function
545 ! \begin{description}
547 ! The object instance to enable
549 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
555 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
556 alarm%alarmint%Enabled = .TRUE.
557 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
559 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
561 end subroutine ESMF_AlarmEnable
563 !------------------------------------------------------------------------------
565 ! !IROUTINE: ESMF_AlarmDisable - Disables an alarm
568 subroutine ESMF_AlarmDisable(alarm, rc)
571 type(ESMF_Alarm), intent(inout) :: alarm ! really INTENT(OUT)
572 integer, intent(out), optional :: rc
575 ! Disables an {\tt ESMF\_Alarm}
578 ! \begin{description}
580 ! The object instance to disable
582 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
588 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
589 alarm%alarmint%Enabled = .FALSE.
590 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
592 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
594 end subroutine ESMF_AlarmDisable
596 !------------------------------------------------------------------------------
598 ! !IROUTINE: ESMF_AlarmRingerOn - Turn on an alarm
602 subroutine ESMF_AlarmRingerOn(alarm, rc)
605 type(ESMF_Alarm), intent(inout) :: alarm ! really INTENT(OUT)
606 integer, intent(out), optional :: rc
609 ! Turn on an {\tt ESMF\_Alarm}; sets ringing state
612 ! \begin{description}
614 ! The object instance to turn on
616 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
622 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
623 IF ( alarm%alarmint%Enabled ) THEN
624 alarm%alarmint%Ringing = .TRUE.
625 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
627 alarm%alarmint%Ringing = .FALSE.
628 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
631 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
634 end subroutine ESMF_AlarmRingerOn
636 !------------------------------------------------------------------------------
638 ! !IROUTINE: ESMF_AlarmRingerOff - Turn off an alarm
641 subroutine ESMF_AlarmRingerOff(alarm, rc)
644 type(ESMF_Alarm), intent(inout) :: alarm ! really INTENT(OUT)
645 integer, intent(out), optional :: rc
648 ! Turn off an {\tt ESMF\_Alarm}; unsets ringing state
651 ! \begin{description}
653 ! The object instance to turn off
655 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
661 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
662 alarm%alarmint%Ringing = .FALSE.
663 IF ( alarm%alarmint%Enabled ) THEN
664 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
666 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
669 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
671 end subroutine ESMF_AlarmRingerOff
673 !------------------------------------------------------------------------------
675 ! !IROUTINE: ESMF_AlarmIsRinging - Check if alarm is ringing
678 function ESMF_AlarmIsRinging(alarm, rc)
681 logical :: ESMF_AlarmIsRinging
684 type(ESMF_Alarm), intent(in) :: alarm
685 integer, intent(out), optional :: rc
688 ! Check if {\tt ESMF\_Alarm} is ringing.
691 ! \begin{description}
693 ! The object instance to check for ringing state
695 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
701 IF ( ASSOCIATED( alarm%alarmint ) ) THEN
702 IF ( alarm%alarmint%Enabled ) THEN
703 ESMF_AlarmIsRinging = alarm%alarmint%Ringing
704 IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
706 ESMF_AlarmIsRinging = .FALSE.
707 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
710 IF ( PRESENT( rc ) ) rc = ESMF_FAILURE
712 end function ESMF_AlarmIsRinging
714 !------------------------------------------------------------------------------
716 ! !IROUTINE: ESMF_AlarmCheckRingTime - Method used by a clock to check whether to trigger an alarm
719 function ESMF_AlarmCheckRingTime(alarm, ClockCurrTime, positive, rc)
722 logical :: ESMF_AlarmCheckRingTime
725 type(ESMF_Alarm), intent(inout) :: alarm
726 type(ESMF_Time), intent(in) :: ClockCurrTime
727 integer, intent(in) :: positive
728 integer, intent(out), optional :: rc
731 ! Main method used by a {\tt ESMF\_Clock} to check whether to trigger
732 ! the {\tt ESMF\_Alarm}
735 ! \begin{description}
737 ! The object instance to check if time to ring
738 ! \item[ClockCurrTime]
739 ! The {\tt ESMF\_Clock}'s current time
741 ! Whether to check ring time in the positive or negative direction
743 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
749 CALL wrf_error_fatal( 'ESMF_AlarmCheckRingTime not supported' )
750 ESMF_AlarmCheckRingTime = .FALSE. ! keep compilers happy
751 end function ESMF_AlarmCheckRingTime
753 !------------------------------------------------------------------------------
755 ! !IROUTINE: ESMF_AlarmEQ - Compare two alarms for equality
758 function ESMF_AlarmEQ(alarm1, alarm2)
761 logical :: ESMF_AlarmEQ
764 type(ESMF_Alarm), intent(in) :: alarm1
765 type(ESMF_Alarm), intent(in) :: alarm2
768 ! Compare two alarms for equality; return true if equal, false otherwise
769 ! Maps to overloaded (==) operator interface function
772 ! \begin{description}
774 ! The first {\tt ESMF\_Alarm} to compare
776 ! The second {\tt ESMF\_Alarm} to compare
781 CALL wrf_error_fatal( 'ESMF_AlarmEQ not supported ' )
782 ESMF_AlarmEQ = .FALSE. ! keep compilers happy
783 end function ESMF_AlarmEQ
785 !------------------------------------------------------------------------------
787 ! This section defines the overridden Read, Write, Validate and Print methods
788 ! from the ESMF_Base class
790 !------------------------------------------------------------------------------
792 ! !IROUTINE: ESMF_AlarmRead - restores an alarm
795 subroutine ESMF_AlarmRead(alarm, RingInterval, RingTime, &
796 PrevRingTime, StopTime, Ringing, &
800 type(ESMF_Alarm), intent(out) :: alarm
801 type(ESMF_TimeInterval), intent(in) :: RingInterval
802 type(ESMF_Time), intent(in) :: RingTime
803 type(ESMF_Time), intent(in) :: PrevRingTime
804 type(ESMF_Time), intent(in) :: StopTime
805 logical, intent(in) :: Ringing
806 logical, intent(in) :: Enabled
807 integer, intent(in) :: ID
808 integer, intent(out), optional :: rc
811 ! Restores an {\tt ESMF\_Alarm}
814 ! \begin{description}
816 ! The object instance to restore
817 ! \item[RingInterval]
818 ! The ring interval for repeating alarms
820 ! Ring time for one-shot or first repeating alarm
821 ! \item[PrevRingTime]
822 ! The {\tt ESMF\_Alarm}'s previous ring time
824 ! Stop time for repeating alarms
826 ! The {\tt ESMF\_Alarm}'s ringing state
828 ! {\tt ESMF\_Alarm} enabled/disabled
830 ! The {\tt ESMF\_Alarm}'s ID
832 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
837 CALL wrf_error_fatal( 'ESMF_AlarmRead not supported' )
838 end subroutine ESMF_AlarmRead
840 !------------------------------------------------------------------------------
842 ! !IROUTINE: ESMF_AlarmWrite - saves an alarm
845 subroutine ESMF_AlarmWrite(alarm, RingInterval, RingTime, &
846 PrevRingTime, StopTime, Ringing, &
850 type(ESMF_Alarm), intent(in) :: alarm
851 type(ESMF_TimeInterval), intent(out) :: RingInterval
852 type(ESMF_Time), intent(out) :: RingTime
853 type(ESMF_Time), intent(out) :: PrevRingTime
854 type(ESMF_Time), intent(out) :: StopTime
855 logical, intent(out) :: Ringing
856 logical, intent(out) :: Enabled
857 integer, intent(out) :: ID
858 integer, intent(out), optional :: rc
861 ! Saves an {\tt ESMF\_Alarm}
864 ! \begin{description}
866 ! The object instance to save
867 ! \item[RingInterval]
868 ! Ring interval for repeating alarms
870 ! Ring time for one-shot or first repeating alarm
871 ! \item[PrevRingTime]
872 ! The {\tt ESMF\_Alarm}'s previous ring time
874 ! Stop time for repeating alarms
876 ! The {\tt ESMF\_Alarm}'s ringing state
878 ! {\tt ESMF\_Alarm} enabled/disabled
880 ! The {\tt ESMF\_Alarm}'s ID
882 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
887 CALL wrf_error_fatal( 'ESMF_AlarmWrite not supported' )
888 end subroutine ESMF_AlarmWrite
890 !------------------------------------------------------------------------------
892 ! !IROUTINE: ESMF_AlarmValidate - Validate an Alarm's properties
895 subroutine ESMF_AlarmValidate(alarm, opts, rc)
898 type(ESMF_Alarm), intent(in) :: alarm
899 character (len=*), intent(in), optional :: opts
900 integer, intent(out), optional :: rc
903 ! Perform a validation check on a {\tt ESMF\_Alarm}'s properties
906 ! \begin{description}
908 ! {\tt ESMF\_Alarm} to validate
912 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
918 CALL wrf_error_fatal( 'ESMF_AlarmValidate not supported' )
919 end subroutine ESMF_AlarmValidate
921 !------------------------------------------------------------------------------
923 ! !IROUTINE: ESMF_AlarmPrint - Print out an Alarm's properties
926 subroutine ESMF_AlarmPrint(alarm, opts, rc)
929 type(ESMF_Alarm), intent(in) :: alarm
930 character (len=*), intent(in), optional :: opts
931 integer, intent(out), optional :: rc
934 ! To support testing/debugging, print out a {\tt ESMF\_Alarm}'s
938 ! \begin{description}
940 ! {\tt ESMF\_Alarm} to print out
944 ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
950 CALL wrf_error_fatal( 'ESMF_AlarmPrint not supported' )
951 end subroutine ESMF_AlarmPrint
953 !------------------------------------------------------------------------------
955 end module WRF_ESMF_AlarmMod