Skip to content

Commit 99f66f2

Browse files
Julie SchrammJulie Schramm
Julie Schramm
authored and
Julie Schramm
committed
Moved some namelist checks from dyn_em/namelist_remappings_em.h
to share/module_check_a_mundo.F and provided additional bullet-proofing: If the user turns off sst_update, grid_fdda or grid_sfdda, check_a_mundo will set related namelist options to 0 as a kind favor, print out a note, and run the simulation If the user turns on any of these options and does not set the appropriate io_form option (io_form_auxinput4, io_form_gfdda, io_form_sgfdda), check_a_mundo will stop. An an error message will be printed requesting the user to modify the namelist as a learning experience. M share/module_check_a_mundo.F M dyn_em/namelist_remappings_em.h git-svn-id: https://svn-wrf-model.cgd.ucar.edu/trunk@4392 b0b5d27b-6f0f-0410-a2a3-cb1e977edc3d
1 parent a8d34fb commit 99f66f2

File tree

2 files changed

+61
-40
lines changed

2 files changed

+61
-40
lines changed

Diff for: dyn_em/namelist_remappings_em.h

-34
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,5 @@
11
!WRF:DRIVER_LAYER:CORE_SPECIFIC
22

3-
! Special input considerations: if analysis FDDA is turned off, reset the
4-
! interval and io_forms to zero so that there is no chance that the WRF
5-
! tries to input the data. Same for the SST update option.
6-
7-
IF ( MAXVAL( model_config_rec%grid_fdda ) .EQ. 0 ) THEN
8-
model_config_rec%io_form_gfdda = 0
9-
model_config_rec%gfdda_interval = 0
10-
model_config_rec%gfdda_interval_d = 0
11-
model_config_rec%gfdda_interval_h = 0
12-
model_config_rec%gfdda_interval_m = 0
13-
model_config_rec%gfdda_interval_s = 0
14-
model_config_rec%gfdda_interval_y = 0
15-
END IF
16-
17-
IF ( MAXVAL( model_config_rec%grid_sfdda ) .EQ. 0 ) THEN
18-
model_config_rec%io_form_sgfdda = 0
19-
model_config_rec%sgfdda_interval = 0
20-
model_config_rec%sgfdda_interval_d = 0
21-
model_config_rec%sgfdda_interval_h = 0
22-
model_config_rec%sgfdda_interval_m = 0
23-
model_config_rec%sgfdda_interval_s = 0
24-
model_config_rec%sgfdda_interval_y = 0
25-
END IF
26-
27-
IF ( model_config_rec%sst_update .EQ. 0 ) THEN
28-
model_config_rec%io_form_auxinput4 = 0
29-
model_config_rec%auxinput4_interval = 0
30-
model_config_rec%auxinput4_interval_d = 0
31-
model_config_rec%auxinput4_interval_h = 0
32-
model_config_rec%auxinput4_interval_m = 0
33-
model_config_rec%auxinput4_interval_s = 0
34-
model_config_rec%auxinput4_interval_y = 0
35-
END IF
36-
373
! Namelist remappings. This file is included by the initial_config
384
! routine in frame/module_configure.F and provides em_core specific
395
! remappings of namelist variables

Diff for: share/module_check_a_mundo.F

+61-6
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,33 @@ SUBROUTINE check_nml_consistency
8383
END IF
8484
ENDDO
8585

86+
!-----------------------------------------------------------------------
87+
! If sst_update = 0, set io_form_auxinput4 to 0 so WRF will not try to
88+
! input the data; auxinput_interval must also be 0
89+
!-----------------------------------------------------------------------
90+
91+
IF ( model_config_rec%sst_update .EQ. 0 ) THEN
92+
model_config_rec%io_form_auxinput4 = 0
93+
DO i = 1, model_config_rec % max_dom
94+
WRITE (wrf_err_message, FMT='(A,A)') '--- NOTE: sst_update is 0, ', &
95+
'setting io_form_auxinput4 = 0 and auxinput4_interval = 0 for all domains'
96+
CALL wrf_message ( wrf_err_message )
97+
model_config_rec%auxinput4_interval(i) = 0
98+
model_config_rec%auxinput4_interval_y(i) = 0
99+
model_config_rec%auxinput4_interval_d(i) = 0
100+
model_config_rec%auxinput4_interval_h(i) = 0
101+
model_config_rec%auxinput4_interval_m(i) = 0
102+
model_config_rec%auxinput4_interval_s(i) = 0
103+
ENDDO
104+
ELSE
105+
IF ( model_config_rec%io_form_auxinput4 .EQ. 0 ) THEN
106+
wrf_err_message = '--- ERROR: If sst_update /= 0, io_form_auxinput4 must be /= 0'
107+
CALL wrf_message ( wrf_err_message )
108+
wrf_err_message = '--- Set io_form_auxinput4 in the time_control namelist (probably to 2).'
109+
CALL wrf_error_fatal ( TRIM( wrf_err_message ) )
110+
END IF
111+
END IF
112+
86113
#if ((EM_CORE == 1) && (DA_CORE != 1))
87114
!-----------------------------------------------------------------------
88115
! Check that if grid_sfdda is one, grid_fdda is also 1
@@ -109,7 +136,7 @@ SUBROUTINE check_nml_consistency
109136
DO i = 1, model_config_rec % max_dom
110137

111138
IF ( model_config_rec%grid_fdda(i) .EQ. 0 ) THEN
112-
WRITE (wrf_err_message, FMT='(A,I6,A)') 'NOTE: grid_fdda is 0 for domain ', &
139+
WRITE (wrf_err_message, FMT='(A,I6,A)') '--- NOTE: grid_fdda is 0 for domain ', &
113140
i, ', setting gfdda interval and ending time to 0 for that domain.'
114141
CALL wrf_message ( wrf_err_message )
115142

@@ -129,7 +156,7 @@ SUBROUTINE check_nml_consistency
129156
IF ( ( model_config_rec%grid_sfdda(i) .EQ. 0 ) .AND. &
130157
( model_config_rec%pxlsm_soil_nudge(i) .EQ. 0 ) ) THEN
131158
WRITE (wrf_err_message, FMT='(A,I6,A)') &
132-
'NOTE: both grid_sfdda and pxlsm_soil_nudge are 0 for domain ', &
159+
'--- NOTE: both grid_sfdda and pxlsm_soil_nudge are 0 for domain ', &
133160
i, ', setting sgfdda interval and ending time to 0 for that domain.'
134161
CALL wrf_message ( wrf_err_message )
135162

@@ -147,7 +174,7 @@ SUBROUTINE check_nml_consistency
147174
END IF
148175

149176
IF ( model_config_rec%obs_nudge_opt(i) .EQ. 0 ) THEN
150-
WRITE (wrf_err_message, FMT='(A,I6,A)') 'NOTE: obs_nudge_opt is 0 for domain ', &
177+
WRITE (wrf_err_message, FMT='(A,I6,A)') '--- NOTE: obs_nudge_opt is 0 for domain ', &
151178
i, ', setting obs nudging interval and ending time to 0 for that domain.'
152179
CALL wrf_message ( wrf_err_message )
153180

@@ -165,7 +192,35 @@ SUBROUTINE check_nml_consistency
165192
model_config_rec%auxinput11_end_m(i) = 0
166193
model_config_rec%auxinput11_end_s(i) = 0
167194
END IF
168-
ENDDO
195+
196+
ENDDO ! Loop over domains
197+
198+
!-----------------------------------------------------------------------
199+
! If analysis FDDA is turned off, reset the io_forms to zero so that
200+
! there is no chance that WRF tries to input the data.
201+
!-----------------------------------------------------------------------
202+
203+
IF ( MAXVAL( model_config_rec%grid_fdda ) .EQ. 0 ) THEN
204+
model_config_rec%io_form_gfdda = 0
205+
ELSE
206+
IF ( model_config_rec%io_form_gfdda .EQ. 0 ) THEN
207+
wrf_err_message = '--- ERROR: If grid_fdda /= 0, io_form_gfdda must be /= 0'
208+
CALL wrf_message ( wrf_err_message )
209+
wrf_err_message = '--- Set io_form_gfdda in the time_control namelist (probably to 2).'
210+
CALL wrf_error_fatal ( TRIM( wrf_err_message ) )
211+
END IF
212+
END IF
213+
IF ( MAXVAL( model_config_rec%grid_sfdda ) .EQ. 0 ) THEN
214+
model_config_rec%io_form_sgfdda = 0
215+
ELSE
216+
IF ( model_config_rec%io_form_sgfdda .EQ. 0 ) THEN
217+
wrf_err_message = '--- ERROR: If grid_sfdda /= 0, io_form_sgfdda must be /= 0'
218+
CALL wrf_message ( wrf_err_message )
219+
wrf_err_message = '--- Set io_form_sgfdda in the time_control namelist (probably to 2).'
220+
CALL wrf_error_fatal ( TRIM( wrf_err_message ) )
221+
END IF
222+
END IF
223+
169224
#endif
170225

171226
END SUBROUTINE
@@ -197,7 +252,7 @@ SUBROUTINE set_physics_rconfigs
197252
model_config_rec % cam_abs_dim1 = 4
198253
model_config_rec % cam_abs_dim2 = model_config_rec % e_vert(1)
199254

200-
wrf_err_message = 'NOTE: CAM radiation is in use, setting: ' // &
255+
wrf_err_message = '--- NOTE: CAM radiation is in use, setting: ' // &
201256
'paerlev=29, levsiz=59, cam_abs_dim1=4, cam_abs_dim2=e_vert'
202257
CALL wrf_message ( wrf_err_message )
203258

@@ -221,7 +276,7 @@ SUBROUTINE set_physics_rconfigs
221276
IF ( model_config_rec % sf_surface_physics(1) .EQ. 88 ) &
222277
model_config_rec % num_soil_layers = 4
223278

224-
WRITE (wrf_err_message, FMT='(A,I6)') 'NOTE: num_soil_layers has been set to ', &
279+
WRITE (wrf_err_message, FMT='(A,I6)') '--- NOTE: num_soil_layers has been set to ', &
225280
model_config_rec % num_soil_layers
226281
CALL wrf_message ( wrf_err_message )
227282

0 commit comments

Comments
 (0)