source: lmdz_wrf/trunk/WRFV3/share/set_timekeeping_alarms.m4 @ 1939

Last change on this file since 1939 was 1, checked in by lfita, 10 years ago
  • -- --- Opening of the WRF+LMDZ coupling repository --- -- -

WRF: version v3.3
LMDZ: version v1818

More details in:

File size: 3.4 KB
Line 
1define( ALARM,
2`! $1$2_ INTERVAL
3! $1$2_interval is left there (and means minutes) for consistency, but
4! $1$2_interval_m will take precedence if specified
5   CALL nl_get_$1$2_interval( grid%id, $1$2_interval )   ! same as minutes
6   CALL nl_get_$1$2_interval_d( grid%id, $1$2_interval_d )
7   CALL nl_get_$1$2_interval_h( grid%id, $1$2_interval_h )
8   CALL nl_get_$1$2_interval_m( grid%id, $1$2_interval_m )
9   CALL nl_get_$1$2_interval_s( grid%id, $1$2_interval_s )
10   IF ( $1$2_interval_m .EQ. 0 ) $1$2_interval_m = $1$2_interval
11
12   IF ( MAX( $1$2_interval_d,   &
13             $1$2_interval_h, $1$2_interval_m , $1$2_interval_s   ) .GT. 0 ) THEN
14     CALL WRFU_TimeIntervalSet( interval, D=$1$2_interval_d, &
15                                        H=$1$2_interval_h, M=$1$2_interval_m, S=$1$2_interval_s, rc=rc )
16     CALL wrf_check_error( WRFU_SUCCESS, rc, &
17                           "WRFU_TimeIntervalSet($1$2_interval) FAILED", &
18                           __FILE__ , &
19                           __LINE__  )
20   ELSE
21     interval = run_length + padding_interval
22   ENDIF
23
24   CALL nl_get_$1$2_begin_y( grid%id, $1$2_begin_y )
25   CALL nl_get_$1$2_begin_d( grid%id, $1$2_begin_d )
26   CALL nl_get_$1$2_begin_h( grid%id, $1$2_begin_h )
27   CALL nl_get_$1$2_begin_m( grid%id, $1$2_begin_m )
28   CALL nl_get_$1$2_begin_s( grid%id, $1$2_begin_s )
29   IF ( MAX( $1$2_begin_y, $1$2_begin_d,   &
30             $1$2_begin_h, $1$2_begin_m , $1$2_begin_s   ) .GT. 0 ) THEN
31      CALL WRFU_TimeIntervalSet( begin_time , D=$1$2_begin_d, &
32                                      H=$1$2_begin_h, M=$1$2_begin_m, S=$1$2_begin_s, rc=rc )
33      CALL wrf_check_error( WRFU_SUCCESS, rc, &
34                            "WRFU_TimeIntervalSet($1$2_begin) FAILED", &
35                            __FILE__ , &
36                            __LINE__  )
37   ELSE
38      begin_time = zero_time
39   ENDIF
40
41   CALL nl_get_$1$2_end_y( grid%id, $1$2_end_y )
42   CALL nl_get_$1$2_end_d( grid%id, $1$2_end_d )
43   CALL nl_get_$1$2_end_h( grid%id, $1$2_end_h )
44   CALL nl_get_$1$2_end_m( grid%id, $1$2_end_m )
45   CALL nl_get_$1$2_end_s( grid%id, $1$2_end_s )
46   IF ( MAX( $1$2_end_y, $1$2_end_d,   &
47             $1$2_end_h, $1$2_end_m , $1$2_end_s   ) .GT. 0 ) THEN
48      CALL WRFU_TimeIntervalSet( end_time , D=$1$2_end_d, &
49                                     H=$1$2_end_h, M=$1$2_end_m, S=$1$2_end_s, rc=rc )
50      CALL wrf_check_error( WRFU_SUCCESS, rc, &
51                            "WRFU_TimeIntervalSet($1$2_end) FAILED", &
52                            __FILE__ , &
53                            __LINE__  )
54   ELSE
55      end_time = run_length + padding_interval
56   ENDIF
57
58   CALL domain_alarm_create( grid, $1$2_ALARM, interval, begin_time, end_time )
59
60   IF ( interval .NE. run_length + padding_interval .AND. begin_time .EQ. zero_time ) THEN
61     CALL WRFU_AlarmRingerOn( grid%alarms( $1$2_ALARM ),  rc=rc )
62     CALL wrf_check_error( WRFU_SUCCESS, rc, &
63                           "WRFU_AlarmRingerOn($1$2_ALARM) FAILED", &
64                           __FILE__ , &
65                           __LINE__  )
66   ENDIF'
67)
68
69ALARM(history,)
70
71ALARM(auxinput,1)
72ALARM(auxinput,2)
73ALARM(auxinput,3)
74ALARM(auxinput,4)
75#ifndef WRF_CHEM
76ALARM(auxinput,5)
77#endif
78ALARM(auxinput,6)
79ALARM(auxinput,7)
80ALARM(auxinput,8)
81ALARM(auxinput,9)
82ALARM(auxinput,10)
83ALARM(auxinput,11)
84
85ALARM(auxhist,1)
86ALARM(auxhist,2)
87ALARM(auxhist,3)
88ALARM(auxhist,4)
89ALARM(auxhist,5)
90ALARM(auxhist,6)
91ALARM(auxhist,7)
92ALARM(auxhist,8)
93ALARM(auxhist,9)
94ALARM(auxhist,10)
95ALARM(auxhist,11)
96
97
Note: See TracBrowser for help on using the repository browser.