1 | #!/bin/csh |
---|
2 | |
---|
3 | #BSUB -a poe # at NCAR: bluevista |
---|
4 | #BSUB -R "span[ptile=32]" # how many tasks per node (up to 8) |
---|
5 | #BSUB -n 4 # number of total tasks |
---|
6 | #BSUB -o reg.out # output filename (%J to add job id) |
---|
7 | #BSUB -e reg.err # error filename |
---|
8 | #BSUB -J regtest1 # job name |
---|
9 | #BSUB -q share # queue |
---|
10 | #BSUB -W 6:00 # wallclock time |
---|
11 | #BSUB -P 64000400 |
---|
12 | ##BSUB -P 66770001 |
---|
13 | |
---|
14 | # This is a script to test the bit-for-bit reproducibility of |
---|
15 | # the WRF model, when comparing single processor serial runs to |
---|
16 | # OpenMP and MPI parallel runs. There are several regression tests |
---|
17 | # that are performed. Failed comparisons get reported, but don't |
---|
18 | # stop the script. Failed builds force an exit from the script. |
---|
19 | |
---|
20 | setenv WRF_NMM_NEST 1 |
---|
21 | set WHERE_AM_I = `pwd` |
---|
22 | |
---|
23 | if ( `uname` == AIX ) then |
---|
24 | |
---|
25 | set USE_SPECIAL_XLF = TRUE |
---|
26 | |
---|
27 | if ( $USE_SPECIAL_XLF == TRUE ) then |
---|
28 | xlf -qversion |
---|
29 | source ~gill/sourceme_modules |
---|
30 | #module load xlf/12.01.0000.0005.091127 |
---|
31 | #module load xlf/12.01.0000.0005 |
---|
32 | module load xlf/84213 |
---|
33 | xlf -qversion |
---|
34 | |
---|
35 | set VERSION = `xlf -qversion | grep AIX | cut -f2 -d, | cut -f2 -dV | cut -f1 -d.` |
---|
36 | if ( $VERSION != 12 ) then |
---|
37 | echo wrong xlf version $VERSION |
---|
38 | exit |
---|
39 | else |
---|
40 | echo right xlf version $VERSION |
---|
41 | endif |
---|
42 | endif |
---|
43 | |
---|
44 | set tdir = 1 |
---|
45 | if ( ! -d /ptmp/${USER}/${tdir} ) then |
---|
46 | mkdir /ptmp/${USER}/${tdir} |
---|
47 | endif |
---|
48 | endif |
---|
49 | |
---|
50 | # Do we keep running even when there are BAD failures? |
---|
51 | |
---|
52 | set KEEP_ON_RUNNING = FALSE |
---|
53 | set KEEP_ON_RUNNING = TRUE |
---|
54 | |
---|
55 | # These need to be changed for your particular set of runs. This is |
---|
56 | # where email gets sent. |
---|
57 | |
---|
58 | if ( ( `uname` == AIX ) && ( ( `hostname | cut -c 1-2` != bs ) && \ |
---|
59 | ( `hostname | cut -c 1-2` != bv ) && ( `hostname | cut -c 1-2` != be ) ) ) then |
---|
60 | set FAIL_MAIL = ( ${user}@noaa.gov ) |
---|
61 | set GOOD_MAIL = ( ${user}@noaa.gov ) |
---|
62 | |
---|
63 | setenv MP_EAGER_LIMIT 65536 |
---|
64 | setenv MP_SHARED_MEMORY yes |
---|
65 | setenv MP_SINGLE_THREAD yes |
---|
66 | setenv MP_LABELIO yes |
---|
67 | setenv MP_STDOUTMODE ordered |
---|
68 | |
---|
69 | setenv OMP_NUM_THREADS 4 |
---|
70 | setenv XLSMPOPTS "parthds=4:spins=0:yields=0:stack=128000000:schedule=static" |
---|
71 | setenv AIXTHREAD_SCOPE S |
---|
72 | setenv AIXTHREAD_MNRATIO 1:1 |
---|
73 | setenv SPINLOOPTIME 1000 |
---|
74 | setenv YIELDLOOPTIME 1000 |
---|
75 | else |
---|
76 | set FAIL_MAIL = ( ${user}@ucar.edu ) |
---|
77 | set GOOD_MAIL = ( ${user}@ucar.edu ) |
---|
78 | endif |
---|
79 | |
---|
80 | unalias cd cp rm ls pushd popd mv |
---|
81 | if ( ( `uname` == Linux ) || ( `uname` == Darwin ) ) alias banner echo |
---|
82 | |
---|
83 | # Get the command line input |
---|
84 | |
---|
85 | set thedate = -999 |
---|
86 | set thefile = "null" |
---|
87 | set thedata = "null" |
---|
88 | set clrm = 0 # compile local run mmmtmp, for using clsroom cluster and local disk |
---|
89 | |
---|
90 | # If this is a batch job (NCAR's IBMs or FSL's Intel and Alpha), we need to muck with the "input" |
---|
91 | # parameters a bit. |
---|
92 | |
---|
93 | if ( ( `uname` == AIX ) || ( `hostname` == tempest ) || ( `hostname | cut -c 1-2` == ln ) ) then |
---|
94 | set argv = ( -here ) |
---|
95 | set argv = ( -ftp ) |
---|
96 | set argv = ( -D today ) |
---|
97 | set argv = ( -env ) |
---|
98 | set WRFREGFILE = /mmm/users/gill/wrf.tar |
---|
99 | if ( ( `uname` == AIX ) && ( ( `hostname | cut -c 1-2` != bs ) && \ |
---|
100 | ( `hostname | cut -c 1-2` != bv ) && ( `hostname | cut -c 1-2` != be ) ) ) then |
---|
101 | set argv = ( -f /nbns/meso/wx22tb/regression_tests/wrf.tar ) |
---|
102 | else |
---|
103 | set argv = ( -f wrf.tar ) |
---|
104 | endif |
---|
105 | endif |
---|
106 | |
---|
107 | # Where is the input data located - for a few known NCAR/MMM machines. |
---|
108 | |
---|
109 | if ( ( `hostname` == master ) || (`hostname | cut -c 1-4` == node ) ) then |
---|
110 | set WRFREGDATAEM = /big/users/gill/WRF-data-EM |
---|
111 | set WRFREGDATANMM = /big/users/gill/WRF-data-NMM |
---|
112 | else if ( `hostname` == jacaranda ) then |
---|
113 | set WRFREGDATAEM = /jacaranda/users/gill/WRF-data-EM |
---|
114 | set WRFREGDATANMM = /jacaranda/users/gill/WRF-data-NMM |
---|
115 | else if ( `hostname` == basswood ) then |
---|
116 | set WRFREGDATAEM = /basswood/gill/Regression_Tests/WRF_regression_data/processed |
---|
117 | set WRFREGDATANMM = /basswood/gill/Regression_Tests/WRF_regression_data/WRF-data-NMM_new |
---|
118 | else if ( `hostname` == stink ) then |
---|
119 | set WRFREGDATAEM = /stink/gill/Regression_Tests/WRF_regression_data/processed |
---|
120 | set WRFREGDATANMM = /stink/gill/Regression_Tests/WRF_regression_data/WRF-data-NMM_new |
---|
121 | else if ( `hostname` == cape ) then |
---|
122 | set WRFREGDATAEM = /cape/users/michalak/WRF-data-EM |
---|
123 | set WRFREGDATANMM = /cape/users/michalak/WRF-data-NMM |
---|
124 | else if ( (`hostname | cut -c 1-6` == joshua ) || \ |
---|
125 | ( `hostname` == maple ) || (`hostname | cut -c 1-7` == service ) ) then |
---|
126 | set WRFREGDATAEM = /users/gill/WRF-data-EM |
---|
127 | set WRFREGDATANMM = /users/gill/WRF-data-NMM |
---|
128 | else if ( ( `hostname | cut -c 1-2` == bs ) || ( `hostname` == tempest ) || ( `hostname | cut -c 1-2` == ln ) || \ |
---|
129 | ( `hostname | cut -c 1-2` == bv ) || ( `hostname | cut -c 1-2` == be ) ) then |
---|
130 | set WRFREGDATAEM = /mmm/users/gill/WRF-data-EM |
---|
131 | set WRFREGDATAEM = /mmm/users/gill/WRF_regression_data/processed |
---|
132 | set WRFREGDATANMM = /mmm/users/gill/WRF-data-NMM_new |
---|
133 | else if ( ( `uname` == AIX ) && ( ( `hostname | cut -c 1-2` != bs ) && \ |
---|
134 | ( `hostname | cut -c 1-2` != bv ) && ( `hostname | cut -c 1-2` != be ) ) ) then |
---|
135 | set WRFREGDATAEM = /nbns/meso/wx22tb/regression_tests/WRF-data-EM |
---|
136 | set WRFREGDATANMM = /nbns/meso/wx22tb/regression_tests/WRF-data-NMM |
---|
137 | else |
---|
138 | if ( ( -d /users/gill/WRF-data-EM ) && ( -d /users/gill/WRF-data-NMM ) ) then |
---|
139 | set WRFREGDATAEM = /users/gill/WRF-data-EM |
---|
140 | set WRFREGDATANMM = /users/gill/WRF-data-NMM |
---|
141 | else if ( ( -d /mmm/users/gill/WRF-data-EM ) && ( -d /mmm/users/gill/WRF-data-NMM ) ) then |
---|
142 | set WRFREGDATAEM = /mmm/users/gill/WRF-data-EM |
---|
143 | set WRFREGDATANMM = /mmm/users/gill/WRF-data-NMM |
---|
144 | else |
---|
145 | echo "stick the WRF em and nmm data somewhere, and then fill in the shell vars" |
---|
146 | echo "inside this script, you NEED WRFREGDATAEM and WRFREGDATANMM set" |
---|
147 | exit ( 1 ) |
---|
148 | endif |
---|
149 | endif |
---|
150 | #DAVE################################################### |
---|
151 | echo DAVE em data is located at $WRFREGDATAEM |
---|
152 | ls -ls $WRFREGDATAEM |
---|
153 | echo DAVE nmm data is located at $WRFREGDATANMM |
---|
154 | ls -ls $WRFREGDATANMM |
---|
155 | banner 1 |
---|
156 | #set ans = "$<" |
---|
157 | #DAVE################################################### |
---|
158 | |
---|
159 | if ( $#argv == 0 ) then |
---|
160 | echo "Please enter either a date for cvs checkout. ex regtest.csh -D date" |
---|
161 | echo " or a file name containing WRF. ex regtest.csh -f tarfile" |
---|
162 | echo " or the -ftp flag for the script to pick code off anon ftp" |
---|
163 | exit ( 2 ) |
---|
164 | endif |
---|
165 | |
---|
166 | set theargs = 0 |
---|
167 | foreach a ( $argv ) |
---|
168 | if ( "$a" == "-D" ) then |
---|
169 | |
---|
170 | rsh -n maple.mmm.ucar.edu w >& /dev/null |
---|
171 | if ( $status ) then |
---|
172 | echo "Cannot execute a remote shell on maple.mmm.ucar.edu, where the" |
---|
173 | echo "WRF code resides." |
---|
174 | echo "Please check that it is up and that you have permission to rsh" |
---|
175 | echo "to this host. (Create a .rhosts file)." |
---|
176 | ping -c 1 maple.mmm.ucar.edu |
---|
177 | exit 2 |
---|
178 | endif |
---|
179 | setenv CVSROOT maple.mmm.ucar.edu:/data3/mp/wrfhelp/WRF |
---|
180 | |
---|
181 | set acquire_from = "cvs" |
---|
182 | set thedate = $argv[2] |
---|
183 | |
---|
184 | endif |
---|
185 | |
---|
186 | if ( "$a" == "-f" ) then |
---|
187 | |
---|
188 | set thefile = $argv[2] |
---|
189 | # Check for absolute path, if not, make it absolute |
---|
190 | echo $thefile | grep '^/' > /dev/null |
---|
191 | if ( $status != 0 ) set thefile = `pwd`/$thefile |
---|
192 | set acquire_from = "filearg" |
---|
193 | |
---|
194 | endif |
---|
195 | |
---|
196 | if ( "$a" == "-ftp" ) then |
---|
197 | set acquire_from = "ftp" |
---|
198 | echo "anon ftp temporarily disabled" |
---|
199 | exit ( 3 ) |
---|
200 | endif |
---|
201 | |
---|
202 | if ( "$a" == "-here" ) then |
---|
203 | set acquire_from = "here" |
---|
204 | endif |
---|
205 | |
---|
206 | if ( "$a" == "-env" ) then |
---|
207 | set acquire_from = "environment" |
---|
208 | set thefile = $WRFREGFILE |
---|
209 | endif |
---|
210 | end |
---|
211 | |
---|
212 | # Start recording everything - for debug purposes. |
---|
213 | |
---|
214 | set echo |
---|
215 | set date |
---|
216 | |
---|
217 | # And to tell us how long we've spent on this whole regression test, |
---|
218 | # we should remember when we started. |
---|
219 | |
---|
220 | set start = ( `date` ) |
---|
221 | |
---|
222 | ##################################################################### |
---|
223 | |
---|
224 | # Initial set up values |
---|
225 | |
---|
226 | # Is this a single domain regression test or is this nested. Well, a nested one |
---|
227 | # is a bit special. It can only run on machines that have the WRF RSL_LITE-but-no-MPI |
---|
228 | # option available. |
---|
229 | |
---|
230 | set NESTED1 = TRUE |
---|
231 | set NESTED1 = FALSE |
---|
232 | |
---|
233 | set NESTED2 = TRUE |
---|
234 | set NESTED2 = FALSE |
---|
235 | |
---|
236 | if ( ( $NESTED1 == TRUE ) || ( $NESTED2 == TRUE ) ) then |
---|
237 | echo DOING a NESTED TEST |
---|
238 | set NESTED = TRUE |
---|
239 | else |
---|
240 | set NESTED = FALSE |
---|
241 | endif |
---|
242 | |
---|
243 | # Use the adaptive time step option |
---|
244 | |
---|
245 | set ADAPTIVE = TRUE |
---|
246 | set ADAPTIVE = FALSE |
---|
247 | |
---|
248 | if ( $ADAPTIVE == TRUE ) then |
---|
249 | set STEP_TO_OUTPUT_TIME = .TRUE. |
---|
250 | set USE_ADAPTIVE_TIME_STEP = .TRUE. |
---|
251 | else |
---|
252 | set STEP_TO_OUTPUT_TIME = .FALSE. |
---|
253 | set USE_ADAPTIVE_TIME_STEP = .FALSE. |
---|
254 | endif |
---|
255 | |
---|
256 | # We can choose to do grid and obs nudging tests. |
---|
257 | |
---|
258 | set FDDA = TRUE |
---|
259 | set FDDA = FALSE |
---|
260 | |
---|
261 | set FDDA2 = TRUE |
---|
262 | set FDDA2 = FALSE |
---|
263 | |
---|
264 | if ( $FDDA2 == TRUE ) then |
---|
265 | set FDDA = TRUE |
---|
266 | endif |
---|
267 | |
---|
268 | # The default floating point precision is either 4 bytes or 8 bytes. |
---|
269 | # We assume that it is 4 (or the default for the architecture) unless |
---|
270 | # REAL8 is set to TRUE. |
---|
271 | |
---|
272 | set REAL8 = TRUE |
---|
273 | set REAL8 = FALSE |
---|
274 | |
---|
275 | # Are we shooting for a bit-for-bit run (serial vs OpenMP, serial vs MPI), or not? |
---|
276 | # If you want to do a performance-only run, the forecasts are still short, but you |
---|
277 | # get to insure that the optimized code builds and runs. |
---|
278 | |
---|
279 | set REG_TYPE = OPTIMIZED |
---|
280 | set REG_TYPE = BIT4BIT |
---|
281 | |
---|
282 | # For a Mac/Intel, we can run either g95 or PGI. |
---|
283 | |
---|
284 | if ( ( `uname` == Darwin ) || ( `uname` == Linux ) ) then |
---|
285 | set LINUX_COMP = G95 |
---|
286 | set LINUX_COMP = PGI |
---|
287 | endif |
---|
288 | |
---|
289 | # We can choose to do a global test |
---|
290 | |
---|
291 | if ( $NESTED != TRUE ) then |
---|
292 | set GLOBAL = TRUE |
---|
293 | set GLOBAL = FALSE |
---|
294 | else if ( $NESTED == TRUE ) then |
---|
295 | set GLOBAL = FALSE |
---|
296 | endif |
---|
297 | |
---|
298 | # Is this a WRF chem test? |
---|
299 | # if CHEM = TRUE, then chemistry run |
---|
300 | # if KPP = TRUE, then chemistry with KPP run (CHEM set to true) |
---|
301 | |
---|
302 | if ( $NESTED != TRUE ) then |
---|
303 | set KPP = TRUE |
---|
304 | set KPP = FALSE |
---|
305 | set CHEM = TRUE |
---|
306 | set CHEM = FALSE |
---|
307 | if ( $KPP == TRUE ) then |
---|
308 | set CHEM = TRUE |
---|
309 | endif |
---|
310 | else if ( $NESTED == TRUE ) then |
---|
311 | set CHEM = FALSE |
---|
312 | set KPP = FALSE |
---|
313 | endif |
---|
314 | if ( $CHEM == TRUE ) then |
---|
315 | setenv WRF_CHEM 1 |
---|
316 | else if ( $CHEM == FALSE ) then |
---|
317 | setenv WRF_CHEM 0 |
---|
318 | endif |
---|
319 | if ( $KPP == TRUE ) then |
---|
320 | setenv WRF_KPP 1 |
---|
321 | setenv FLEX_LIB_DIR /usr/local/lib |
---|
322 | setenv YACC "/usr/bin/yacc -d" |
---|
323 | set CHEM_OPT = 104 |
---|
324 | else if ( $KPP == FALSE ) then |
---|
325 | setenv WRF_KPP 0 |
---|
326 | setenv FLEX_LIB_DIR |
---|
327 | setenv YACC "/usr/bin/yacc -d" |
---|
328 | set CHEM_OPT = |
---|
329 | endif |
---|
330 | |
---|
331 | # For the real data case, we can run either one of two data cases. If this is |
---|
332 | # a chemistry run, we are forced to use that data. |
---|
333 | |
---|
334 | set dataset = jun01 |
---|
335 | set dataset = jan00 |
---|
336 | if ( $CHEM == TRUE ) then |
---|
337 | set dataset = chem |
---|
338 | endif |
---|
339 | if ( $GLOBAL == TRUE ) then |
---|
340 | set dataset = global |
---|
341 | endif |
---|
342 | |
---|
343 | # Yet another local variable to change the name of where the data is located. |
---|
344 | |
---|
345 | set thedataem = ${WRFREGDATAEM}/${dataset} |
---|
346 | set thedatanmm = $WRFREGDATANMM |
---|
347 | |
---|
348 | # A separately installed version of the latest ESMF library (NOT the |
---|
349 | # ESMF library included in the WRF tarfile) can be tested by setting |
---|
350 | # "ESMF_LIB" to "TRUE" below. This test is not supported on all |
---|
351 | # machines. |
---|
352 | |
---|
353 | set ESMF_LIB = TRUE |
---|
354 | set ESMF_LIB = FALSE |
---|
355 | |
---|
356 | # serial and OMP are not tested with ESMF so always start with env vars cleared |
---|
357 | unsetenv ESMFLIB |
---|
358 | unsetenv ESMFINC |
---|
359 | |
---|
360 | if ( $ESMF_LIB == TRUE ) then |
---|
361 | if ( ( `uname` == AIX ) && ( ( `hostname | cut -c 1-2` == bv ) || ( `hostname | cut -c 1-2` == be ) ) ) then |
---|
362 | echo "A separately installed version of the latest ESMF library" |
---|
363 | echo "(NOT the ESMF library included in the WRF tarfile) will" |
---|
364 | echo "be used for MPI tests" |
---|
365 | setenv OBJECT_MODE 64 |
---|
366 | # set ESMFLIBSAVE = /home/bluevista/hender/esmf/esmf_2_2_2r/lib/libO/AIX.default.64.mpi.default |
---|
367 | # set ESMFINCSAVE = /home/bluevista/hender/esmf/esmf_2_2_2r/mod/modO/AIX.default.64.mpi.default |
---|
368 | set NEVER = FALSE |
---|
369 | if ( $NEVER == TRUE ) then |
---|
370 | setenv ESMF_DIR /mmm/users/michalak/esmf |
---|
371 | setenv ESMF_BOPT g |
---|
372 | setenv ESMF_ABI 64 |
---|
373 | setenv ESMF_INSTALL_PREFIX $ESMF_DIR/../esmf_install |
---|
374 | setenv ESMFLIB $ESMF_INSTALL_PREFIX/lib/libg/AIX.default.64.mpi.default |
---|
375 | setenv ESMFINC $ESMF_INSTALL_PREFIX/mod/modg/AIX.default.64.mpi.default |
---|
376 | else |
---|
377 | source ~michalak/sourceme_esmf |
---|
378 | endif |
---|
379 | set ESMFLIBSAVE = $ESMFLIB |
---|
380 | set ESMFINCSAVE = $ESMFINC |
---|
381 | echo "Using ESMFLIB = ${ESMFLIBSAVE}" |
---|
382 | echo "Using ESMFINC = ${ESMFINCSAVE}" |
---|
383 | else |
---|
384 | echo "Only the ESMF library included in the WRF tarfile is" |
---|
385 | echo "tested on this machine" |
---|
386 | exit ( 3 ) |
---|
387 | endif |
---|
388 | if ( $NESTED == TRUE ) then |
---|
389 | echo "The ESMF library does not work with nesting." |
---|
390 | exit ( 3 ) |
---|
391 | endif |
---|
392 | endif |
---|
393 | |
---|
394 | # A single WRF output "quilt" server can be tested by setting "QUILT" to |
---|
395 | # "TRUE" below. At the moment, testing of I/O quilt servers is not supported |
---|
396 | # on all machines. |
---|
397 | |
---|
398 | set QUILT = TRUE |
---|
399 | set QUILT = FALSE |
---|
400 | |
---|
401 | if ( $QUILT == TRUE ) then |
---|
402 | echo "One WRF output quilt server will be used for some tests" |
---|
403 | endif |
---|
404 | |
---|
405 | # Baseline data sets can be generated and archived or compared against. |
---|
406 | # - To generate and archive, set GENERATE_BASELINE to a pathname that can |
---|
407 | # be created by this script via "mkdir -p $GENERATE_BASELINE". This |
---|
408 | # directory must not already exist. |
---|
409 | # Set GENERATE_BASELINE = FALSE to avoid baseline generation. |
---|
410 | # - To compare with a previously archived baseline, set COMPARE_BASELINE |
---|
411 | # to an existing directory that contains an archived baseline. |
---|
412 | # Set COMPARE_BASELINE = FALSE to avoid baseline comparison. |
---|
413 | set GENERATE_BASELINE = FALSE |
---|
414 | set COMPARE_BASELINE = FALSE |
---|
415 | |
---|
416 | # Baseline generation and comparison are only done when BIT4BIT is set. |
---|
417 | if ( $GENERATE_BASELINE != FALSE ) then |
---|
418 | if ( $REG_TYPE != BIT4BIT ) then |
---|
419 | echo "ERROR: Baseline generation can only be done during BIT4BIT tests." |
---|
420 | exit ( 3 ) |
---|
421 | endif |
---|
422 | if ( -d $GENERATE_BASELINE ) then |
---|
423 | echo "ERROR: Baseline directory ${GENERATE_BASELINE} already exists." |
---|
424 | exit ( 3 ) |
---|
425 | else |
---|
426 | # Archive serial output file to baseline |
---|
427 | mkdir -p $GENERATE_BASELINE || ( echo "ERROR: cannot mkdir ${GENERATE_BASELINE}"; exit 3 ) |
---|
428 | endif |
---|
429 | endif |
---|
430 | if ( $COMPARE_BASELINE != FALSE ) then |
---|
431 | if ( $REG_TYPE != BIT4BIT ) then |
---|
432 | echo "Baseline comparison can only be done during BIT4BIT tests." |
---|
433 | exit ( 3 ) |
---|
434 | endif |
---|
435 | if ( ! -d $COMPARE_BASELINE ) then |
---|
436 | echo "${0}: ERROR: Baseline directory ${COMPARE_BASELINE} does not exist" |
---|
437 | exit ( 3 ) |
---|
438 | endif |
---|
439 | endif |
---|
440 | |
---|
441 | # Set the input/output format type (currently 1, 2 or 5 OK). |
---|
442 | # Binary NetCDF PHDF, IBM GriB, history only |
---|
443 | # 1 2 3 4 5 |
---|
444 | |
---|
445 | set IO_FORM = 2 |
---|
446 | set IO_FORM_NAME = ( io_bin io_netcdf io_dummy io_phdf5 io_grib1 ) |
---|
447 | set IO_FORM_WHICH =( IO IO IO IO O ) |
---|
448 | |
---|
449 | # There is a breakdown of cores to test depending on the various |
---|
450 | # options that the user is testing. |
---|
451 | # nested: cannot test NMM |
---|
452 | # rsl_lite: cannot test anything with y periodic bc |
---|
453 | # chem: em_real only |
---|
454 | # esmf_lib: cannot test NMM |
---|
455 | # grib output: cannot test NMM |
---|
456 | |
---|
457 | if ( $NESTED1 == TRUE ) then |
---|
458 | set CORES = ( em_real ) |
---|
459 | else if ( $NESTED2 == TRUE ) then |
---|
460 | set CORES = ( em_b_wave em_quarter_ss ) |
---|
461 | else if ( $NESTED != TRUE ) then |
---|
462 | set CORES = ( em_real em_b_wave em_quarter_ss nmm_real ) |
---|
463 | if ( $CHEM == TRUE ) then |
---|
464 | set CORES = ( em_real em_real ) |
---|
465 | endif |
---|
466 | if ( $GLOBAL == TRUE ) then |
---|
467 | set CORES = ( em_real ) |
---|
468 | endif |
---|
469 | if ( $ADAPTIVE == TRUE ) then |
---|
470 | set CORES = ( em_real ) |
---|
471 | endif |
---|
472 | if ( $ESMF_LIB == TRUE ) then |
---|
473 | set CORES = ( em_real em_b_wave em_quarter_ss ) |
---|
474 | endif |
---|
475 | if ( $IO_FORM_NAME[$IO_FORM] == io_grib1 ) then |
---|
476 | set CORES = ( em_real em_b_wave em_quarter_ss ) |
---|
477 | endif |
---|
478 | if ( $FDDA == TRUE ) then |
---|
479 | set CORES = ( em_real ) |
---|
480 | endif |
---|
481 | endif |
---|
482 | |
---|
483 | # The b_wave case has binary input (4-byte only), the nmm |
---|
484 | # core has raw MPI calls, skip them if we are doing real*8 floats. |
---|
485 | |
---|
486 | if ( $REAL8 == TRUE ) then |
---|
487 | set CORES = ( em_real em_quarter_ss ) |
---|
488 | endif |
---|
489 | |
---|
490 | if ( ( $CHEM != TRUE ) && ( $FDDA != TRUE ) && ( $REAL8 != TRUE ) && ( $GLOBAL != TRUE ) && ( $ADAPTIVE != TRUE ) ) then |
---|
491 | set PHYSOPTS = ( 1 2 3 4 5 6 7 8 10 11 13 14 15 ) |
---|
492 | else if ( $ADAPTIVE == TRUE ) then |
---|
493 | set PHYSOPTS = ( 1 2 3 5 7 8 9 10 12 13 15 ) |
---|
494 | else if ( ( $CHEM != TRUE ) && ( $FDDA != TRUE ) && ( ( $REAL8 == TRUE ) || ( $GLOBAL == TRUE ) ) ) then |
---|
495 | set PHYSOPTS = ( 1 2 3 4 5 6 ) |
---|
496 | else if ( ( $CHEM != TRUE ) && ( $FDDA == TRUE ) ) then |
---|
497 | if ( $FDDA2 == TRUE ) then |
---|
498 | set PHYSOPTS_FDDA = BOTH |
---|
499 | else |
---|
500 | set PHYSOPTS_FDDA = GRID |
---|
501 | endif |
---|
502 | if ( $PHYSOPTS_FDDA == GRID ) then |
---|
503 | set PHYSOPTS = ( 1 ) |
---|
504 | else |
---|
505 | set PHYSOPTS = ( 1 2 3 4 5 ) |
---|
506 | endif |
---|
507 | else if ( $CHEM == TRUE ) then |
---|
508 | set PHYSOPTS = ( 1 2 3 4 5 6 ) |
---|
509 | endif |
---|
510 | |
---|
511 | # This is selecting the ideal physics options - mostly selecting BC options. |
---|
512 | # With no nesting, run all three ideal physics options. |
---|
513 | |
---|
514 | if ( $NESTED == TRUE ) then |
---|
515 | set Max_Ideal_Physics_Options = 5 |
---|
516 | else if ( $NESTED != TRUE ) then |
---|
517 | set Max_Ideal_Physics_Options = 5 |
---|
518 | endif |
---|
519 | |
---|
520 | set CUR_DIR = `pwd` |
---|
521 | |
---|
522 | # How many domains to run (nest tests). Only em_real and ideals use this. |
---|
523 | # The max is 3 due to the number of columns in the namelist that are |
---|
524 | # currently filled in. |
---|
525 | |
---|
526 | if ( $NESTED == TRUE ) then |
---|
527 | if ( $dataset == jan00 ) then |
---|
528 | cat >! dom_real << EOF |
---|
529 | time_step = 180, |
---|
530 | time_step_fract_num = 0, |
---|
531 | time_step_fract_den = 1, |
---|
532 | max_dom = 2, |
---|
533 | s_we = 1, 1, 1, |
---|
534 | e_we = 74, 31, 31, |
---|
535 | s_sn = 1, 1, 1, |
---|
536 | e_sn = 61, 31, 31, |
---|
537 | s_vert = 1, 1, 1, |
---|
538 | e_vert = 28, 28, 28, |
---|
539 | p_top_requested = 5000, |
---|
540 | num_metgrid_levels = 27, |
---|
541 | num_metgrid_soil_levels = 4, |
---|
542 | dx = 30000, 10000, 3333.333333, |
---|
543 | dy = 30000, 10000, 3333.333333, |
---|
544 | grid_id = 1, 2, 3, |
---|
545 | parent_id = 0, 1, 2, |
---|
546 | i_parent_start = 0, 31, 11, |
---|
547 | j_parent_start = 0, 17, 11, |
---|
548 | parent_grid_ratio = 1, 3, 3, |
---|
549 | parent_time_step_ratio = 1, 3, 3, |
---|
550 | feedback = 1, |
---|
551 | smooth_option = 0 |
---|
552 | num_moves = 3 |
---|
553 | move_id = 2 , 2 , 2 |
---|
554 | move_interval = 3 , 6 , 9 |
---|
555 | move_cd_x = 1 , 1 , 1 |
---|
556 | move_cd_y = 1 , 1 , 1 |
---|
557 | use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP |
---|
558 | step_to_output_time = $STEP_TO_OUTPUT_TIME |
---|
559 | EOF |
---|
560 | else if ( $dataset == jun01 ) then |
---|
561 | cat >! dom_real << EOF |
---|
562 | time_step = 60, |
---|
563 | time_step_fract_num = 0, |
---|
564 | time_step_fract_den = 1, |
---|
565 | max_dom = 2, |
---|
566 | s_we = 1, 1, 1, |
---|
567 | e_we = 91, 31, 31, |
---|
568 | s_sn = 1, 1, 1, |
---|
569 | e_sn = 82, 31, 31, |
---|
570 | s_vert = 1, 1, 1, |
---|
571 | e_vert = 28, 28, 28, |
---|
572 | p_top_requested = 5000, |
---|
573 | num_metgrid_levels = 27, |
---|
574 | num_metgrid_soil_levels = 4, |
---|
575 | dx = 10000, 3333.333333, 1111.111111, |
---|
576 | dy = 10000, 3333.333333, 1111.111111, |
---|
577 | grid_id = 1, 2, 3, |
---|
578 | parent_id = 0, 1, 2, |
---|
579 | i_parent_start = 0, 30, 11, |
---|
580 | j_parent_start = 0, 20, 11, |
---|
581 | parent_grid_ratio = 1, 3, 3, |
---|
582 | parent_time_step_ratio = 1, 3, 3, |
---|
583 | feedback = 1, |
---|
584 | smooth_option = 0 |
---|
585 | num_moves = 3 |
---|
586 | move_id = 2 , 2 , 2 |
---|
587 | move_interval = 1 , 2 , 3 |
---|
588 | move_cd_x = 1 , 1 , 1 |
---|
589 | move_cd_y = 1 , 1 , 1 |
---|
590 | use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP |
---|
591 | step_to_output_time = $STEP_TO_OUTPUT_TIME |
---|
592 | EOF |
---|
593 | endif |
---|
594 | cat >! dom_ideal << EOF |
---|
595 | max_dom = 2, |
---|
596 | EOF |
---|
597 | else if ( $NESTED != TRUE ) then |
---|
598 | if ( $dataset == jan00 ) then |
---|
599 | cat >! dom_real << EOF |
---|
600 | time_step = 180, |
---|
601 | time_step_fract_num = 0, |
---|
602 | time_step_fract_den = 1, |
---|
603 | max_dom = 1, |
---|
604 | s_we = 1, 1, 1, |
---|
605 | e_we = 74, 31, 31, |
---|
606 | s_sn = 1, 1, 1, |
---|
607 | e_sn = 61, 31, 31, |
---|
608 | s_vert = 1, 1, 1, |
---|
609 | e_vert = 28, 28, 28, |
---|
610 | p_top_requested = 5000, |
---|
611 | num_metgrid_levels = 27, |
---|
612 | num_metgrid_soil_levels = 4, |
---|
613 | dx = 30000, 10000, 3333, |
---|
614 | dy = 30000, 10000, 3333, |
---|
615 | grid_id = 1, 2, 3, |
---|
616 | parent_id = 0, 1, 2, |
---|
617 | i_parent_start = 0, 31, 30, |
---|
618 | j_parent_start = 0, 17, 30, |
---|
619 | parent_grid_ratio = 1, 3, 3, |
---|
620 | parent_time_step_ratio = 1, 3, 3, |
---|
621 | feedback = 1, |
---|
622 | smooth_option = 0 |
---|
623 | use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP |
---|
624 | step_to_output_time = $STEP_TO_OUTPUT_TIME |
---|
625 | EOF |
---|
626 | else if ( $dataset == jun01 ) then |
---|
627 | cat >! dom_real << EOF |
---|
628 | time_step = 60, |
---|
629 | time_step_fract_num = 0, |
---|
630 | time_step_fract_den = 1, |
---|
631 | max_dom = 1, |
---|
632 | s_we = 1, 1, 1, |
---|
633 | e_we = 91, 31, 31, |
---|
634 | s_sn = 1, 1, 1, |
---|
635 | e_sn = 82, 31, 31, |
---|
636 | s_vert = 1, 1, 1, |
---|
637 | e_vert = 28, 28, 28, |
---|
638 | p_top_requested = 5000, |
---|
639 | num_metgrid_levels = 27, |
---|
640 | num_metgrid_soil_levels = 4, |
---|
641 | dx = 10000, 3333.333333, 1111.111111, |
---|
642 | dy = 10000, 3333.333333, 1111.111111, |
---|
643 | grid_id = 1, 2, 3, |
---|
644 | parent_id = 0, 1, 2, |
---|
645 | i_parent_start = 0, 30, 11, |
---|
646 | j_parent_start = 0, 20, 11, |
---|
647 | parent_grid_ratio = 1, 3, 3, |
---|
648 | parent_time_step_ratio = 1, 3, 3, |
---|
649 | feedback = 1, |
---|
650 | smooth_option = 0 |
---|
651 | use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP |
---|
652 | step_to_output_time = $STEP_TO_OUTPUT_TIME |
---|
653 | EOF |
---|
654 | else if ( $dataset == global ) then |
---|
655 | cat >! dom_real << EOF |
---|
656 | time_step = 600 |
---|
657 | time_step_fract_num = 00 |
---|
658 | time_step_fract_den = 112 |
---|
659 | max_dom = 1, |
---|
660 | s_we = 1, 1, 1, |
---|
661 | e_we = 65, 41, 41, |
---|
662 | s_sn = 1, 1, 1, |
---|
663 | e_sn = 33, 81, 81, |
---|
664 | s_vert = 1, 1, 1, |
---|
665 | e_vert = 41, 41, 41, |
---|
666 | p_top_requested = 5000, |
---|
667 | num_metgrid_levels = 27, |
---|
668 | num_metgrid_soil_levels = 4, |
---|
669 | dx = 625373.288,20000, 4000, |
---|
670 | dy = 625373.288,20000, 4000, |
---|
671 | p_top_requested = 5000 |
---|
672 | grid_id = 1, 2, 3, |
---|
673 | parent_id = 0, 1, 2, |
---|
674 | i_parent_start = 0, 17, 17, |
---|
675 | j_parent_start = 0, 33, 33, |
---|
676 | parent_grid_ratio = 1, 5, 5, |
---|
677 | parent_time_step_ratio = 1, 5, 5, |
---|
678 | feedback = 1, |
---|
679 | smooth_option = 00 |
---|
680 | EOF |
---|
681 | endif |
---|
682 | cat >! dom_ideal << EOF |
---|
683 | max_dom = 1, |
---|
684 | EOF |
---|
685 | endif |
---|
686 | |
---|
687 | # The em_real entire physics namelist. Change what you want. |
---|
688 | |
---|
689 | cat >! phys_real_1 << EOF |
---|
690 | mp_physics = 1, 1, 1, |
---|
691 | ra_lw_physics = 1, 1, 1, |
---|
692 | ra_sw_physics = 1, 1, 1, |
---|
693 | radt = 21, 21, 21, |
---|
694 | sf_sfclay_physics = 1, 1, 1, |
---|
695 | sf_surface_physics = 1, 1, 1, |
---|
696 | bl_pbl_physics = 1, 1, 1, |
---|
697 | bldt = 0, 0, 0, |
---|
698 | cu_physics = 1, 1, 0, |
---|
699 | cudt = 5, 5, 5, |
---|
700 | omlcall = 1, |
---|
701 | oml_hml0 = 50, |
---|
702 | oml_gamma = 0.14 |
---|
703 | slope_rad = 1, 1, 1, |
---|
704 | topo_shading = 0, 0, 0, |
---|
705 | isfflx = 1, |
---|
706 | ifsnow = 0, |
---|
707 | icloud = 1, |
---|
708 | surface_input_source = 1, |
---|
709 | num_soil_layers = 5, |
---|
710 | mp_zero_out = 0, |
---|
711 | EOF |
---|
712 | |
---|
713 | cat >! dyn_real_SAFE << EOF |
---|
714 | moist_adv_opt = 0, 0, 0, |
---|
715 | scalar_adv_opt = 0, 0, 0, |
---|
716 | chem_adv_opt = 0, 0, 0, |
---|
717 | tke_adv_opt = 0, 0, 0, |
---|
718 | EOF |
---|
719 | |
---|
720 | cat >! dyn_real_1 << EOF |
---|
721 | moist_adv_opt = 1, 1, 1, |
---|
722 | scalar_adv_opt = 1, 1, 1, |
---|
723 | chem_adv_opt = 0, 0, 0, |
---|
724 | tke_adv_opt = 0, 0, 0, |
---|
725 | EOF |
---|
726 | |
---|
727 | cat >! time_real_1 << EOF |
---|
728 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
729 | EOF |
---|
730 | |
---|
731 | cat >! nest_real_1 << EOF |
---|
732 | input_from_file = .true.,.false.,.false. |
---|
733 | EOF |
---|
734 | |
---|
735 | cat >! damp_real_1 << EOF |
---|
736 | damp_opt = 0, |
---|
737 | zdamp = 5000., 5000., 5000., |
---|
738 | dampcoef = 0.05, 0.05, 0.05 |
---|
739 | EOF |
---|
740 | |
---|
741 | cat >! phys_real_2 << EOF |
---|
742 | mp_physics = 2, 2, 2, |
---|
743 | ra_lw_physics = 3, 3, 3, |
---|
744 | ra_sw_physics = 3, 3, 3, |
---|
745 | radt = 21, 21, 21, |
---|
746 | sf_sfclay_physics = 2, 2, 2, |
---|
747 | sf_surface_physics = 2, 2, 2, |
---|
748 | bl_pbl_physics = 2, 2, 2, |
---|
749 | bldt = 0, 0, 0, |
---|
750 | cu_physics = 2, 2, 0, |
---|
751 | cudt = 5, 5, 5, |
---|
752 | omlcall = 1, |
---|
753 | oml_hml0 = 50, |
---|
754 | oml_gamma = 0.14 |
---|
755 | isfflx = 1, |
---|
756 | ifsnow = 0, |
---|
757 | icloud = 1, |
---|
758 | surface_input_source = 1, |
---|
759 | num_soil_layers = 4, |
---|
760 | sf_urban_physics = 2, 2, 2, |
---|
761 | mp_zero_out = 0, |
---|
762 | levsiz = 59 |
---|
763 | paerlev = 29 |
---|
764 | cam_abs_freq_s = 21600 |
---|
765 | cam_abs_dim1 = 4 |
---|
766 | cam_abs_dim2 = 28 |
---|
767 | EOF |
---|
768 | |
---|
769 | cat >! dyn_real_2 << EOF |
---|
770 | moist_adv_opt = 1, 1, 1, |
---|
771 | scalar_adv_opt = 1, 1, 1, |
---|
772 | chem_adv_opt = 0, 0, 0, |
---|
773 | tke_adv_opt = 0, 0, 0, |
---|
774 | EOF |
---|
775 | |
---|
776 | if ( $GLOBAL == TRUE ) then |
---|
777 | cp dyn_real_SAFE dyn_real_2 |
---|
778 | endif |
---|
779 | |
---|
780 | cat >! time_real_2 << EOF |
---|
781 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
782 | EOF |
---|
783 | |
---|
784 | cat >! nest_real_2 << EOF |
---|
785 | input_from_file = .true.,.false.,.false. |
---|
786 | EOF |
---|
787 | |
---|
788 | cat >! damp_real_2 << EOF |
---|
789 | damp_opt = 1, |
---|
790 | zdamp = 5000., 5000., 5000., |
---|
791 | dampcoef = 0.05, 0.05, 0.05 |
---|
792 | EOF |
---|
793 | |
---|
794 | cat >! phys_real_3 << EOF |
---|
795 | mp_physics = 3, 3, 3, |
---|
796 | ra_lw_physics = 4, 4, 4, |
---|
797 | ra_sw_physics = 4, 4, 4, |
---|
798 | radt = 21, 21, 21, |
---|
799 | sf_sfclay_physics = 4, 4, 4, |
---|
800 | sf_surface_physics = 1, 1, 1, |
---|
801 | bl_pbl_physics = 4, 4, 4, |
---|
802 | bldt = 0, 0, 0, |
---|
803 | cu_physics = 3, 3, 0, |
---|
804 | cudt = 5, 5, 5, |
---|
805 | isfflx = 1, |
---|
806 | ifsnow = 0, |
---|
807 | icloud = 1, |
---|
808 | surface_input_source = 1, |
---|
809 | num_soil_layers = 5, |
---|
810 | mp_zero_out = 0, |
---|
811 | maxiens = 1, |
---|
812 | maxens = 3, |
---|
813 | maxens2 = 3, |
---|
814 | maxens3 = 16, |
---|
815 | ensdim = 144, |
---|
816 | EOF |
---|
817 | |
---|
818 | cat >! dyn_real_3 << EOF |
---|
819 | moist_adv_opt = 2, 2, 2, |
---|
820 | scalar_adv_opt = 2, 2, 2, |
---|
821 | chem_adv_opt = 0, 0, 0, |
---|
822 | tke_adv_opt = 0, 0, 0, |
---|
823 | EOF |
---|
824 | |
---|
825 | cat >! time_real_3 << EOF |
---|
826 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
827 | EOF |
---|
828 | |
---|
829 | cat >! nest_real_3 << EOF |
---|
830 | input_from_file = .true.,.false.,.false. |
---|
831 | EOF |
---|
832 | |
---|
833 | cat >! damp_real_3 << EOF |
---|
834 | damp_opt = 3, |
---|
835 | zdamp = 5000., 5000., 5000., |
---|
836 | dampcoef = 0.05, 0.05, 0.05 |
---|
837 | EOF |
---|
838 | |
---|
839 | cat >! phys_real_4 << EOF |
---|
840 | mp_physics = 4, 4, 4, |
---|
841 | ra_lw_physics = 1, 1, 1, |
---|
842 | ra_sw_physics = 2, 2, 2, |
---|
843 | radt = 21, 21, 21, |
---|
844 | sf_sfclay_physics = 5, 5, 5, |
---|
845 | sf_surface_physics = 2, 2, 2, |
---|
846 | bl_pbl_physics = 5, 5, 5, |
---|
847 | bldt = 0, 0, 0, |
---|
848 | cu_physics = 4, 4, 0, |
---|
849 | cudt = 0, 0, 0, |
---|
850 | isfflx = 1, |
---|
851 | ifsnow = 0, |
---|
852 | icloud = 1, |
---|
853 | surface_input_source = 1, |
---|
854 | num_soil_layers = 4, |
---|
855 | sf_urban_physics = 1, 1, 1, |
---|
856 | mp_zero_out = 0, |
---|
857 | EOF |
---|
858 | |
---|
859 | cat >! dyn_real_4 << EOF |
---|
860 | moist_adv_opt = 2, 2, 2, |
---|
861 | scalar_adv_opt = 2, 2, 2, |
---|
862 | chem_adv_opt = 0, 0, 0, |
---|
863 | tke_adv_opt = 0, 0, 0, |
---|
864 | EOF |
---|
865 | |
---|
866 | cat >! time_real_4 << EOF |
---|
867 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
868 | EOF |
---|
869 | |
---|
870 | cat >! nest_real_4 << EOF |
---|
871 | input_from_file = .true.,.false.,.false. |
---|
872 | EOF |
---|
873 | |
---|
874 | cat >! damp_real_4 << EOF |
---|
875 | damp_opt = 1, |
---|
876 | zdamp = 5000., 5000., 5000., |
---|
877 | dampcoef = 0.05, 0.05, 0.05 |
---|
878 | EOF |
---|
879 | |
---|
880 | cat >! phys_real_5 << EOF |
---|
881 | mp_physics = 5, 5, 5, |
---|
882 | ra_lw_physics = 5, 5, 5, |
---|
883 | ra_sw_physics = 5, 5, 5, |
---|
884 | radt = 21, 21, 21, |
---|
885 | sf_sfclay_physics = 7, 7, 7, |
---|
886 | sf_surface_physics = 7, 7, 7, |
---|
887 | bl_pbl_physics = 7, 7, 7, |
---|
888 | bldt = 0, 0, 0, |
---|
889 | cu_physics = 5, 5, 0, |
---|
890 | cudt = 0, 0, 0, |
---|
891 | isfflx = 1, |
---|
892 | ifsnow = 0, |
---|
893 | icloud = 1, |
---|
894 | surface_input_source = 1, |
---|
895 | num_soil_layers = 2, |
---|
896 | mp_zero_out = 0, |
---|
897 | ishallow = 0, |
---|
898 | EOF |
---|
899 | |
---|
900 | cat >! dyn_real_5 << EOF |
---|
901 | moist_adv_opt = 1, 1, 1, |
---|
902 | scalar_adv_opt = 1, 1, 1, |
---|
903 | chem_adv_opt = 0, 0, 0, |
---|
904 | tke_adv_opt = 0, 0, 0, |
---|
905 | EOF |
---|
906 | |
---|
907 | cat >! time_real_5 << EOF |
---|
908 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
909 | EOF |
---|
910 | |
---|
911 | cat >! nest_real_5 << EOF |
---|
912 | input_from_file = .true.,.true.,.false. |
---|
913 | EOF |
---|
914 | |
---|
915 | cat >! damp_real_5 << EOF |
---|
916 | damp_opt = 0, |
---|
917 | zdamp = 5000., 5000., 5000., |
---|
918 | dampcoef = 0.05, 0.05, 0.05 |
---|
919 | EOF |
---|
920 | |
---|
921 | cat >! phys_real_6 << EOF |
---|
922 | mp_physics = 6, 6, 6, |
---|
923 | ra_lw_physics = 4, 4, 4, |
---|
924 | ra_sw_physics = 4, 4, 4, |
---|
925 | radt = 21, 21, 21, |
---|
926 | sf_sfclay_physics = 2, 2, 2, |
---|
927 | sf_surface_physics = 1, 1, 1, |
---|
928 | bl_pbl_physics = 8, 8, 8, |
---|
929 | bldt = 0, 0, 0, |
---|
930 | cu_physics = 6, 6, 0, |
---|
931 | cudt = 0, 0, 0, |
---|
932 | omlcall = 1, |
---|
933 | oml_hml0 = 50, |
---|
934 | oml_gamma = 0.14 |
---|
935 | isfflx = 1, |
---|
936 | ifsnow = 0, |
---|
937 | icloud = 1, |
---|
938 | surface_input_source = 1, |
---|
939 | num_soil_layers = 5, |
---|
940 | mp_zero_out = 0, |
---|
941 | EOF |
---|
942 | |
---|
943 | cat >! dyn_real_6 << EOF |
---|
944 | moist_adv_opt = 1, 1, 1, |
---|
945 | scalar_adv_opt = 1, 1, 1, |
---|
946 | chem_adv_opt = 0, 0, 0, |
---|
947 | tke_adv_opt = 0, 0, 0, |
---|
948 | EOF |
---|
949 | |
---|
950 | cat >! time_real_6 << EOF |
---|
951 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
952 | EOF |
---|
953 | |
---|
954 | cat >! nest_real_6 << EOF |
---|
955 | input_from_file = .true.,.false.,.false. |
---|
956 | EOF |
---|
957 | |
---|
958 | cat >! damp_real_6 << EOF |
---|
959 | damp_opt = 3, |
---|
960 | zdamp = 5000., 5000., 5000., |
---|
961 | dampcoef = 0.05, 0.05, 0.05 |
---|
962 | EOF |
---|
963 | |
---|
964 | cat >! phys_real_7 << EOF |
---|
965 | mp_physics = 7, 7, 7, |
---|
966 | ra_lw_physics = 1, 1, 1, |
---|
967 | ra_sw_physics = 1, 1, 1, |
---|
968 | radt = 21, 21, 21, |
---|
969 | sf_sfclay_physics =10, 10, 10, |
---|
970 | sf_surface_physics = 2, 2, 2, |
---|
971 | bl_pbl_physics =10, 10, 10, |
---|
972 | bldt = 0, 0, 0, |
---|
973 | cu_physics =14, 14, 0, |
---|
974 | cudt = 5, 5, 5, |
---|
975 | omlcall = 1, |
---|
976 | oml_hml0 = 50, |
---|
977 | oml_gamma = 0.14 |
---|
978 | slope_rad = 0, 0, 0, |
---|
979 | topo_shading = 0, 0, 0, |
---|
980 | isfflx = 1, |
---|
981 | ifsnow = 0, |
---|
982 | icloud = 1, |
---|
983 | surface_input_source = 1, |
---|
984 | num_soil_layers = 4, |
---|
985 | mp_zero_out = 0, |
---|
986 | EOF |
---|
987 | |
---|
988 | cat >! dyn_real_7 << EOF |
---|
989 | moist_adv_opt = 2, 2, 2, |
---|
990 | scalar_adv_opt = 2, 2, 2, |
---|
991 | chem_adv_opt = 0, 0, 0, |
---|
992 | tke_adv_opt = 0, 0, 0, |
---|
993 | EOF |
---|
994 | |
---|
995 | cat >! time_real_7 << EOF |
---|
996 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
997 | EOF |
---|
998 | |
---|
999 | cat >! nest_real_7 << EOF |
---|
1000 | input_from_file = .true.,.false.,.false. |
---|
1001 | EOF |
---|
1002 | |
---|
1003 | cat >! damp_real_7 << EOF |
---|
1004 | damp_opt = 1, |
---|
1005 | zdamp = 5000., 5000., 5000., |
---|
1006 | dampcoef = 0.05, 0.05, 0.05 |
---|
1007 | EOF |
---|
1008 | |
---|
1009 | cat >! phys_real_8 << EOF |
---|
1010 | mp_physics = 8, 8, 8, |
---|
1011 | ra_lw_physics = 5, 5, 5, |
---|
1012 | ra_sw_physics = 5, 5, 5, |
---|
1013 | radt = 21, 21, 21, |
---|
1014 | sf_sfclay_physics = 2, 2, 2, |
---|
1015 | sf_surface_physics = 3, 3, 3, |
---|
1016 | bl_pbl_physics = 9, 9, 9, |
---|
1017 | bldt = 0, 0, 0, |
---|
1018 | cu_physics = 7, 7, 0, |
---|
1019 | cudt = 0, 0, 0, |
---|
1020 | isfflx = 1, |
---|
1021 | ifsnow = 0, |
---|
1022 | icloud = 1, |
---|
1023 | surface_input_source = 1, |
---|
1024 | num_soil_layers = 6, |
---|
1025 | mp_zero_out = 0, |
---|
1026 | EOF |
---|
1027 | |
---|
1028 | cat >! dyn_real_8 << EOF |
---|
1029 | moist_adv_opt = 2, 2, 2, |
---|
1030 | scalar_adv_opt = 2, 2, 2, |
---|
1031 | chem_adv_opt = 0, 0, 0, |
---|
1032 | tke_adv_opt = 0, 0, 0, |
---|
1033 | EOF |
---|
1034 | |
---|
1035 | cat >! time_real_8 << EOF |
---|
1036 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
1037 | EOF |
---|
1038 | |
---|
1039 | cat >! nest_real_8 << EOF |
---|
1040 | input_from_file = .true.,.false.,.false. |
---|
1041 | EOF |
---|
1042 | |
---|
1043 | cat >! damp_real_8 << EOF |
---|
1044 | damp_opt = 3, |
---|
1045 | zdamp = 5000., 5000., 5000., |
---|
1046 | dampcoef = 0.05, 0.05, 0.05 |
---|
1047 | EOF |
---|
1048 | |
---|
1049 | cat >! phys_real_9 << EOF |
---|
1050 | mp_physics = 9, 9, 9, |
---|
1051 | ra_lw_physics = 3, 3, 3, |
---|
1052 | ra_sw_physics = 3, 3, 3, |
---|
1053 | radt = 21, 21, 21, |
---|
1054 | sf_sfclay_physics = 5, 5, 5, |
---|
1055 | sf_surface_physics = 3, 3, 3, |
---|
1056 | bl_pbl_physics = 6, 6, 6, |
---|
1057 | bldt = 0, 0, 0, |
---|
1058 | cu_physics = 1, 1, 0, |
---|
1059 | cudt = 0, 0, 0, |
---|
1060 | isfflx = 1, |
---|
1061 | ifsnow = 0, |
---|
1062 | icloud = 1, |
---|
1063 | surface_input_source = 1, |
---|
1064 | num_soil_layers = 6, |
---|
1065 | mp_zero_out = 0, |
---|
1066 | levsiz = 59 |
---|
1067 | paerlev = 29 |
---|
1068 | cam_abs_freq_s = 21600 |
---|
1069 | cam_abs_dim1 = 4 |
---|
1070 | cam_abs_dim2 = 28 |
---|
1071 | EOF |
---|
1072 | |
---|
1073 | cat >! dyn_real_9 << EOF |
---|
1074 | moist_adv_opt = 1, 1, 1, |
---|
1075 | scalar_adv_opt = 1, 1, 1, |
---|
1076 | chem_adv_opt = 0, 0, 0, |
---|
1077 | tke_adv_opt = 0, 0, 0, |
---|
1078 | EOF |
---|
1079 | |
---|
1080 | cat >! time_real_9 << EOF |
---|
1081 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
1082 | EOF |
---|
1083 | |
---|
1084 | cat >! nest_real_9 << EOF |
---|
1085 | input_from_file = .true.,.false.,.false. |
---|
1086 | EOF |
---|
1087 | |
---|
1088 | cat >! damp_real_9 << EOF |
---|
1089 | damp_opt = 0, |
---|
1090 | zdamp = 5000., 5000., 5000., |
---|
1091 | dampcoef = 0.05, 0.05, 0.05 |
---|
1092 | EOF |
---|
1093 | |
---|
1094 | cat >! phys_real_10 << EOF |
---|
1095 | mp_physics = 10, 10, 10, |
---|
1096 | ra_lw_physics = 1, 1, 1, |
---|
1097 | ra_sw_physics = 2, 2, 2, |
---|
1098 | radt = 21, 21, 21, |
---|
1099 | sf_sfclay_physics = 4, 4, 4, |
---|
1100 | sf_surface_physics = 7, 7, 7, |
---|
1101 | bl_pbl_physics = 4, 4, 4, |
---|
1102 | bldt = 0, 0, 0, |
---|
1103 | cu_physics = 2, 2, 0, |
---|
1104 | cudt = 0, 0, 0, |
---|
1105 | isfflx = 1, |
---|
1106 | ifsnow = 0, |
---|
1107 | icloud = 1, |
---|
1108 | surface_input_source = 1, |
---|
1109 | num_soil_layers = 2, |
---|
1110 | mp_zero_out = 0, |
---|
1111 | EOF |
---|
1112 | |
---|
1113 | cat >! dyn_real_10 << EOF |
---|
1114 | moist_adv_opt = 1, 1, 1, |
---|
1115 | scalar_adv_opt = 1, 1, 1, |
---|
1116 | chem_adv_opt = 0, 0, 0, |
---|
1117 | tke_adv_opt = 0, 0, 0, |
---|
1118 | EOF |
---|
1119 | |
---|
1120 | cat >! time_real_10 << EOF |
---|
1121 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
1122 | EOF |
---|
1123 | |
---|
1124 | cat >! nest_real_10 << EOF |
---|
1125 | input_from_file = .true.,.true.,.false. |
---|
1126 | EOF |
---|
1127 | |
---|
1128 | cat >! damp_real_10 << EOF |
---|
1129 | damp_opt = 3, |
---|
1130 | zdamp = 5000., 5000., 5000., |
---|
1131 | dampcoef = 0.05, 0.05, 0.05 |
---|
1132 | EOF |
---|
1133 | |
---|
1134 | cat >! phys_real_11 << EOF |
---|
1135 | mp_physics = 14, 14, 14, |
---|
1136 | ra_lw_physics = 3, 3, 3, |
---|
1137 | ra_sw_physics = 3, 3, 3, |
---|
1138 | radt = 21, 21, 21, |
---|
1139 | sf_sfclay_physics = 7, 7, 7, |
---|
1140 | sf_surface_physics = 1, 1, 1, |
---|
1141 | bl_pbl_physics = 7, 7, 7, |
---|
1142 | bldt = 0, 0, 0, |
---|
1143 | cu_physics = 4, 4, 0, |
---|
1144 | cudt = 0, 0, 0, |
---|
1145 | isfflx = 1, |
---|
1146 | ifsnow = 0, |
---|
1147 | icloud = 1, |
---|
1148 | surface_input_source = 1, |
---|
1149 | num_soil_layers = 5, |
---|
1150 | mp_zero_out = 0, |
---|
1151 | levsiz = 59 |
---|
1152 | paerlev = 29 |
---|
1153 | cam_abs_freq_s = 21600 |
---|
1154 | cam_abs_dim1 = 4 |
---|
1155 | cam_abs_dim2 = 28 |
---|
1156 | EOF |
---|
1157 | |
---|
1158 | cat >! dyn_real_11 << EOF |
---|
1159 | moist_adv_opt = 2, 2, 2, |
---|
1160 | scalar_adv_opt = 2, 2, 2, |
---|
1161 | chem_adv_opt = 0, 0, 0, |
---|
1162 | tke_adv_opt = 0, 0, 0, |
---|
1163 | EOF |
---|
1164 | |
---|
1165 | cat >! time_real_11 << EOF |
---|
1166 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
1167 | EOF |
---|
1168 | |
---|
1169 | cat >! nest_real_11 << EOF |
---|
1170 | input_from_file = .true.,.false.,.false. |
---|
1171 | EOF |
---|
1172 | |
---|
1173 | cat >! damp_real_11 << EOF |
---|
1174 | damp_opt = 0, |
---|
1175 | zdamp = 5000., 5000., 5000., |
---|
1176 | dampcoef = 0.05, 0.05, 0.05 |
---|
1177 | EOF |
---|
1178 | |
---|
1179 | cat >! phys_real_12 << EOF |
---|
1180 | mp_physics = 16, 16, 16, |
---|
1181 | ra_lw_physics = 4, 4, 4, |
---|
1182 | ra_sw_physics = 4, 4, 4, |
---|
1183 | radt = 21, 21, 21, |
---|
1184 | sf_sfclay_physics = 1, 1, 1, |
---|
1185 | sf_surface_physics = 2, 2, 2, |
---|
1186 | bl_pbl_physics = 8, 8, 8, |
---|
1187 | bldt = 0, 0, 0, |
---|
1188 | cu_physics = 3, 3, 0, |
---|
1189 | cudt = 0, 0, 0, |
---|
1190 | isfflx = 1, |
---|
1191 | ifsnow = 0, |
---|
1192 | icloud = 1, |
---|
1193 | sf_urban_physics = 3, 3, 3, |
---|
1194 | num_urban_layers = 1040 |
---|
1195 | surface_input_source = 1, |
---|
1196 | num_soil_layers = 4, |
---|
1197 | mp_zero_out = 0, |
---|
1198 | maxiens = 1, |
---|
1199 | maxens = 3, |
---|
1200 | maxens2 = 3, |
---|
1201 | maxens3 = 16, |
---|
1202 | ensdim = 144, |
---|
1203 | EOF |
---|
1204 | |
---|
1205 | cat >! dyn_real_12 << EOF |
---|
1206 | moist_adv_opt = 2, 2, 2, |
---|
1207 | scalar_adv_opt = 2, 2, 2, |
---|
1208 | chem_adv_opt = 0, 0, 0, |
---|
1209 | tke_adv_opt = 0, 0, 0, |
---|
1210 | EOF |
---|
1211 | |
---|
1212 | cat >! time_real_12 << EOF |
---|
1213 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
1214 | EOF |
---|
1215 | |
---|
1216 | cat >! nest_real_12 << EOF |
---|
1217 | input_from_file = .true.,.false.,.false. |
---|
1218 | EOF |
---|
1219 | |
---|
1220 | cat >! damp_real_12 << EOF |
---|
1221 | damp_opt = 1, |
---|
1222 | zdamp = 5000., 5000., 5000., |
---|
1223 | dampcoef = 0.05, 0.05, 0.05 |
---|
1224 | EOF |
---|
1225 | |
---|
1226 | cat >! phys_real_13 << EOF |
---|
1227 | mp_physics =13, 13, 13, |
---|
1228 | ra_lw_physics = 1, 1, 1, |
---|
1229 | ra_sw_physics = 1, 1, 1, |
---|
1230 | radt = 21, 21, 21, |
---|
1231 | sf_sfclay_physics = 2, 2, 2, |
---|
1232 | sf_surface_physics = 3, 3, 3, |
---|
1233 | bl_pbl_physics = 9, 9, 9, |
---|
1234 | bldt = 0, 0, 0, |
---|
1235 | cu_physics = 7, 7, 0, |
---|
1236 | cudt = 0, 0, 0, |
---|
1237 | slope_rad = 1, 1, 1, |
---|
1238 | topo_shading = 0, 0, 0, |
---|
1239 | isfflx = 1, |
---|
1240 | ifsnow = 0, |
---|
1241 | icloud = 1, |
---|
1242 | surface_input_source = 1, |
---|
1243 | num_soil_layers = 6, |
---|
1244 | mp_zero_out = 0, |
---|
1245 | EOF |
---|
1246 | |
---|
1247 | cat >! dyn_real_13 << EOF |
---|
1248 | moist_adv_opt = 2, 2, 2, |
---|
1249 | scalar_adv_opt = 2, 2, 2, |
---|
1250 | chem_adv_opt = 0, 0, 0, |
---|
1251 | tke_adv_opt = 0, 0, 0, |
---|
1252 | EOF |
---|
1253 | |
---|
1254 | cat >! time_real_13 << EOF |
---|
1255 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
1256 | EOF |
---|
1257 | |
---|
1258 | cat >! nest_real_13 << EOF |
---|
1259 | input_from_file = .true.,.false.,.false. |
---|
1260 | EOF |
---|
1261 | |
---|
1262 | cat >! damp_real_13 << EOF |
---|
1263 | gwd_opt = 0, |
---|
1264 | damp_opt = 3, |
---|
1265 | zdamp = 5000., 5000., 5000., |
---|
1266 | dampcoef = 0.05, 0.05, 0.05 |
---|
1267 | EOF |
---|
1268 | |
---|
1269 | cat >! phys_real_14 << EOF |
---|
1270 | mp_physics = 3, 3, 3, |
---|
1271 | ra_lw_physics = 3, 3, 3, |
---|
1272 | ra_sw_physics = 3, 3, 3, |
---|
1273 | radt = 21, 21, 21, |
---|
1274 | sf_sfclay_physics = 4, 4, 4, |
---|
1275 | sf_surface_physics = 3, 3, 3, |
---|
1276 | bl_pbl_physics = 4, 4, 4, |
---|
1277 | bldt = 0, 0, 0, |
---|
1278 | cu_physics = 6, 6, 0, |
---|
1279 | cudt = 0, 0, 0, |
---|
1280 | isfflx = 1, |
---|
1281 | ifsnow = 0, |
---|
1282 | icloud = 1, |
---|
1283 | surface_input_source = 1, |
---|
1284 | num_soil_layers = 6, |
---|
1285 | mp_zero_out = 0, |
---|
1286 | levsiz = 59 |
---|
1287 | paerlev = 29 |
---|
1288 | cam_abs_freq_s = 21600 |
---|
1289 | cam_abs_dim1 = 4 |
---|
1290 | cam_abs_dim2 = 28 |
---|
1291 | EOF |
---|
1292 | |
---|
1293 | cat >! dyn_real_14 << EOF |
---|
1294 | moist_adv_opt = 2, 2, 2, |
---|
1295 | scalar_adv_opt = 2, 2, 2, |
---|
1296 | chem_adv_opt = 0, 0, 0, |
---|
1297 | tke_adv_opt = 0, 0, 0, |
---|
1298 | EOF |
---|
1299 | |
---|
1300 | cat >! time_real_14 << EOF |
---|
1301 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
1302 | EOF |
---|
1303 | |
---|
1304 | cat >! nest_real_14 << EOF |
---|
1305 | input_from_file = .true.,.false.,.false. |
---|
1306 | EOF |
---|
1307 | |
---|
1308 | cat >! damp_real_14 << EOF |
---|
1309 | damp_opt = 1, |
---|
1310 | zdamp = 5000., 5000., 5000., |
---|
1311 | dampcoef = 0.05, 0.05, 0.05 |
---|
1312 | EOF |
---|
1313 | |
---|
1314 | cat >! phys_real_15 << EOF |
---|
1315 | mp_physics = 4, 4, 4, |
---|
1316 | ra_lw_physics = 5, 5, 5, |
---|
1317 | ra_sw_physics = 5, 5, 5, |
---|
1318 | radt = 21, 21, 21, |
---|
1319 | sf_sfclay_physics =10, 10, 10, |
---|
1320 | sf_surface_physics = 7, 7, 7, |
---|
1321 | bl_pbl_physics =10, 10, 10, |
---|
1322 | bldt = 0, 0, 0, |
---|
1323 | cu_physics =14, 14, 0, |
---|
1324 | cudt = 0, 0, 0, |
---|
1325 | isfflx = 1, |
---|
1326 | ifsnow = 0, |
---|
1327 | icloud = 1, |
---|
1328 | surface_input_source = 1, |
---|
1329 | num_soil_layers = 2, |
---|
1330 | mp_zero_out = 0, |
---|
1331 | EOF |
---|
1332 | |
---|
1333 | cat >! dyn_real_15 << EOF |
---|
1334 | moist_adv_opt = 2, 2, 2, |
---|
1335 | scalar_adv_opt = 2, 2, 2, |
---|
1336 | chem_adv_opt = 0, 0, 0, |
---|
1337 | tke_adv_opt = 0, 0, 0, |
---|
1338 | EOF |
---|
1339 | |
---|
1340 | cat >! time_real_15 << EOF |
---|
1341 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
1342 | EOF |
---|
1343 | |
---|
1344 | cat >! nest_real_15 << EOF |
---|
1345 | input_from_file = .true.,.true.,.false. |
---|
1346 | EOF |
---|
1347 | |
---|
1348 | cat >! damp_real_15 << EOF |
---|
1349 | damp_opt = 1, |
---|
1350 | zdamp = 5000., 5000., 5000., |
---|
1351 | dampcoef = 0.05, 0.05, 0.05 |
---|
1352 | EOF |
---|
1353 | |
---|
1354 | if ( $GLOBAL == TRUE ) then |
---|
1355 | foreach exp ( 2 9 11 14 ) |
---|
1356 | sed -e 's/ cam_abs_dim2 *= [0-9][0-9]/ cam_abs_dim2 = 41/g' phys_real_$exp >! phys_foo ; mv phys_foo phys_real_$exp |
---|
1357 | end |
---|
1358 | cp dyn_real_SAFE dyn_real_1 |
---|
1359 | cp dyn_real_SAFE dyn_real_2 |
---|
1360 | cp dyn_real_SAFE dyn_real_3 |
---|
1361 | cp dyn_real_SAFE dyn_real_4 |
---|
1362 | cp dyn_real_SAFE dyn_real_5 |
---|
1363 | cp dyn_real_SAFE dyn_real_6 |
---|
1364 | cp dyn_real_SAFE dyn_real_7 |
---|
1365 | cp dyn_real_SAFE dyn_real_8 |
---|
1366 | cp dyn_real_SAFE dyn_real_9 |
---|
1367 | cp dyn_real_SAFE dyn_real_10 |
---|
1368 | cp dyn_real_SAFE dyn_real_11 |
---|
1369 | cp dyn_real_SAFE dyn_real_12 |
---|
1370 | cp dyn_real_SAFE dyn_real_13 |
---|
1371 | cp dyn_real_SAFE dyn_real_14 |
---|
1372 | endif |
---|
1373 | |
---|
1374 | cat >! fdda_real_1 << EOF |
---|
1375 | grid_sfdda = 1, 1, 1, |
---|
1376 | sgfdda_inname = "wrfsfdda_d<domain>", |
---|
1377 | sgfdda_end_h = 24, 24, 24, |
---|
1378 | sgfdda_interval_m = 360, 360, 360, |
---|
1379 | io_form_sgfdda = 2, |
---|
1380 | guv_sfc = 0.0003, 0.0003, 0.0003, |
---|
1381 | gt_sfc = 0.0003, 0.0003, 0.0003, |
---|
1382 | gq_sfc = 0.0003, 0.0003, 0.0003, |
---|
1383 | rinblw = 250., |
---|
1384 | grid_fdda = 1, 1, 1, |
---|
1385 | gfdda_inname = "wrffdda_d<domain>", |
---|
1386 | gfdda_end_h = 24, 24, 24, |
---|
1387 | gfdda_interval_m = 360, 360, 360, |
---|
1388 | fgdt = 0, 0, 0, |
---|
1389 | if_no_pbl_nudging_uv = 0, 0, 1, |
---|
1390 | if_no_pbl_nudging_t = 0, 0, 1, |
---|
1391 | if_no_pbl_nudging_q = 0, 0, 1, |
---|
1392 | if_zfac_uv = 0, 0, 1, |
---|
1393 | k_zfac_uv = 10, 10, 1, |
---|
1394 | if_zfac_t = 0, 0, 1, |
---|
1395 | k_zfac_t = 10, 10, 1, |
---|
1396 | if_zfac_q = 0, 0, 1, |
---|
1397 | k_zfac_q = 10, 10, 1, |
---|
1398 | guv = 0.0003, 0.0003, 0.0003, |
---|
1399 | gt = 0.0003, 0.0003, 0.0003, |
---|
1400 | gq = 0.0003, 0.0003, 0.0003, |
---|
1401 | if_ramping = 1, |
---|
1402 | dtramp_min = 360.0, |
---|
1403 | io_form_gfdda = 2, |
---|
1404 | EOF |
---|
1405 | |
---|
1406 | cat >! fdda_real_time_1 << EOF |
---|
1407 | EOF |
---|
1408 | |
---|
1409 | cat >! fdda_real_2 << EOF |
---|
1410 | obs_nudge_opt = 1,1,1,1,1 |
---|
1411 | max_obs = 150000, |
---|
1412 | obs_nudge_wind = 1,1,1,1,1 |
---|
1413 | obs_coef_wind = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
1414 | obs_nudge_temp = 1,1,1,1,1 |
---|
1415 | obs_coef_temp = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
1416 | obs_nudge_mois = 1,1,1,1,1 |
---|
1417 | obs_coef_mois = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
1418 | obs_rinxy = 240.,240.,180.,180,180 |
---|
1419 | obs_rinsig = 0.1, |
---|
1420 | obs_twindo = 40. |
---|
1421 | obs_npfi = 10, |
---|
1422 | obs_ionf = 2, |
---|
1423 | obs_idynin = 0, |
---|
1424 | obs_dtramp = 40., |
---|
1425 | obs_ipf_errob = .true. |
---|
1426 | obs_ipf_nudob = .true. |
---|
1427 | obs_ipf_in4dob = .true. |
---|
1428 | EOF |
---|
1429 | |
---|
1430 | cat >! fdda_real_time_2 << EOF |
---|
1431 | auxinput11_interval_s = 180 |
---|
1432 | auxinput11_end_h = 6 |
---|
1433 | EOF |
---|
1434 | |
---|
1435 | cat >! fdda_real_3 << EOF |
---|
1436 | grid_sfdda = 1, 1, 1, |
---|
1437 | sgfdda_inname = "wrfsfdda_d<domain>", |
---|
1438 | sgfdda_end_h = 24, 24, 24, |
---|
1439 | sgfdda_interval_m = 360, 360, 360, |
---|
1440 | io_form_sgfdda = 2, |
---|
1441 | guv_sfc = 0.0003, 0.0003, 0.0003, |
---|
1442 | gt_sfc = 0.0003, 0.0003, 0.0003, |
---|
1443 | gq_sfc = 0.0003, 0.0003, 0.0003, |
---|
1444 | rinblw = 250., |
---|
1445 | grid_fdda = 1, 1, 1, |
---|
1446 | gfdda_inname = "wrffdda_d<domain>", |
---|
1447 | gfdda_end_h = 24, 24, 24, |
---|
1448 | gfdda_interval_m = 360, 360, 360, |
---|
1449 | fgdt = 0, 0, 0, |
---|
1450 | if_no_pbl_nudging_uv = 0, 0, 1, |
---|
1451 | if_no_pbl_nudging_t = 0, 0, 1, |
---|
1452 | if_no_pbl_nudging_q = 0, 0, 1, |
---|
1453 | if_zfac_uv = 0, 0, 1, |
---|
1454 | k_zfac_uv = 10, 10, 1, |
---|
1455 | if_zfac_t = 0, 0, 1, |
---|
1456 | k_zfac_t = 10, 10, 1, |
---|
1457 | if_zfac_q = 0, 0, 1, |
---|
1458 | k_zfac_q = 10, 10, 1, |
---|
1459 | guv = 0.0003, 0.0003, 0.0003, |
---|
1460 | gt = 0.0003, 0.0003, 0.0003, |
---|
1461 | gq = 0.0003, 0.0003, 0.0003, |
---|
1462 | if_ramping = 1, |
---|
1463 | dtramp_min = 360.0, |
---|
1464 | io_form_gfdda = 2, |
---|
1465 | obs_nudge_opt = 0,0,0,0,0 |
---|
1466 | max_obs = 150000, |
---|
1467 | obs_nudge_wind = 1,1,1,1,1 |
---|
1468 | obs_coef_wind = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
1469 | obs_nudge_temp = 1,1,1,1,1 |
---|
1470 | obs_coef_temp = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
1471 | obs_nudge_mois = 1,1,1,1,1 |
---|
1472 | obs_coef_mois = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
1473 | obs_rinxy = 240.,240.,180.,180,180 |
---|
1474 | obs_rinsig = 0.1, |
---|
1475 | obs_twindo = 40. |
---|
1476 | obs_npfi = 10, |
---|
1477 | obs_ionf = 2, |
---|
1478 | obs_idynin = 0, |
---|
1479 | obs_dtramp = 40., |
---|
1480 | obs_ipf_errob = .true. |
---|
1481 | obs_ipf_nudob = .true. |
---|
1482 | obs_ipf_in4dob = .true. |
---|
1483 | EOF |
---|
1484 | |
---|
1485 | cat >! fdda_real_time_3 << EOF |
---|
1486 | auxinput11_interval_s = 180 |
---|
1487 | auxinput11_end_h = 6 |
---|
1488 | EOF |
---|
1489 | |
---|
1490 | cat >! fdda_real_4 << EOF |
---|
1491 | grid_sfdda = 1, 1, 1, |
---|
1492 | sgfdda_inname = "wrfsfdda_d<domain>", |
---|
1493 | sgfdda_end_h = 24, 24, 24, |
---|
1494 | sgfdda_interval_m = 360, 360, 360, |
---|
1495 | io_form_sgfdda = 2, |
---|
1496 | guv_sfc = 0.0003, 0.0003, 0.0003, |
---|
1497 | gt_sfc = 0.0003, 0.0003, 0.0003, |
---|
1498 | gq_sfc = 0.0003, 0.0003, 0.0003, |
---|
1499 | rinblw = 250., |
---|
1500 | grid_fdda = 1, 1, 1, |
---|
1501 | gfdda_inname = "wrffdda_d<domain>", |
---|
1502 | gfdda_end_h = 24, 24, 24, |
---|
1503 | gfdda_interval_m = 360, 360, 360, |
---|
1504 | fgdt = 0, 0, 0, |
---|
1505 | if_no_pbl_nudging_uv = 0, 0, 1, |
---|
1506 | if_no_pbl_nudging_t = 0, 0, 1, |
---|
1507 | if_no_pbl_nudging_q = 0, 0, 1, |
---|
1508 | if_zfac_uv = 0, 0, 1, |
---|
1509 | k_zfac_uv = 10, 10, 1, |
---|
1510 | if_zfac_t = 0, 0, 1, |
---|
1511 | k_zfac_t = 10, 10, 1, |
---|
1512 | if_zfac_q = 0, 0, 1, |
---|
1513 | k_zfac_q = 10, 10, 1, |
---|
1514 | guv = 0.0003, 0.0003, 0.0003, |
---|
1515 | gt = 0.0003, 0.0003, 0.0003, |
---|
1516 | gq = 0.0003, 0.0003, 0.0003, |
---|
1517 | if_ramping = 1, |
---|
1518 | dtramp_min = 360.0, |
---|
1519 | io_form_gfdda = 2, |
---|
1520 | obs_nudge_opt = 1,1,1,1,1 |
---|
1521 | max_obs = 150000, |
---|
1522 | obs_nudge_wind = 1,1,1,1,1 |
---|
1523 | obs_coef_wind = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
1524 | obs_nudge_temp = 1,1,1,1,1 |
---|
1525 | obs_coef_temp = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
1526 | obs_nudge_mois = 1,1,1,1,1 |
---|
1527 | obs_coef_mois = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
1528 | obs_rinxy = 240.,240.,180.,180,180 |
---|
1529 | obs_rinsig = 0.1, |
---|
1530 | obs_twindo = 40. |
---|
1531 | obs_npfi = 10, |
---|
1532 | obs_ionf = 2, |
---|
1533 | obs_idynin = 0, |
---|
1534 | obs_dtramp = 40., |
---|
1535 | obs_ipf_errob = .true. |
---|
1536 | obs_ipf_nudob = .true. |
---|
1537 | obs_ipf_in4dob = .true. |
---|
1538 | EOF |
---|
1539 | |
---|
1540 | cat >! fdda_real_time_4 << EOF |
---|
1541 | auxinput11_interval_s = 180 |
---|
1542 | auxinput11_end_h = 6 |
---|
1543 | EOF |
---|
1544 | |
---|
1545 | cat >! fdda_real_5 << EOF |
---|
1546 | grid_fdda = 2, 2, 2, |
---|
1547 | gfdda_inname = "wrffdda_d<domain>", |
---|
1548 | gfdda_end_h = 24, 24, 24, |
---|
1549 | gfdda_interval_m = 360, 360, 360, |
---|
1550 | fgdt = 0, 0, 0, |
---|
1551 | fgdtzero = 0, 0, 0, |
---|
1552 | if_no_pbl_nudging_uv = 0, 0, 0, |
---|
1553 | if_no_pbl_nudging_t = 0, 0, 0, |
---|
1554 | if_no_pbl_nudging_ph = 0, 0, 0, |
---|
1555 | if_no_pbl_nudging_q = 0, 0, 0, |
---|
1556 | if_zfac_uv = 0, 0, 0, |
---|
1557 | k_zfac_uv = 10, 10, 10, |
---|
1558 | if_zfac_t = 0, 0, 0, |
---|
1559 | k_zfac_t = 10, 10, 10, |
---|
1560 | if_zfac_ph = 0, 0, 0, |
---|
1561 | k_zfac_ph = 10, 10, 10, |
---|
1562 | if_zfac_q = 0, 0, 0, |
---|
1563 | k_zfac_q = 10, 10, 10, |
---|
1564 | dk_zfac_uv = 1, 1, 1, |
---|
1565 | dk_zfac_t = 1, 1, 1, |
---|
1566 | dk_zfac_ph = 1, 1, 1, |
---|
1567 | guv = 0.0003, 0.0003, 0.0003, |
---|
1568 | gt = 0.0003, 0.0003, 0.0003, |
---|
1569 | gph = 0.0003, 0.0003, 0.0003, |
---|
1570 | gq = 0.0003, 0.0003, 0.0003, |
---|
1571 | xwavenum = 3 |
---|
1572 | ywavenum = 3 |
---|
1573 | if_ramping = 1, |
---|
1574 | dtramp_min = 60.0, |
---|
1575 | io_form_gfdda = 2, |
---|
1576 | EOF |
---|
1577 | |
---|
1578 | cat >! fdda_real_time_5 << EOF |
---|
1579 | EOF |
---|
1580 | |
---|
1581 | # Tested options for ideal case em_b_wave. Modifying these |
---|
1582 | # parameters is acceptable. Adding to these requires changes |
---|
1583 | # to the ideal namelist build below. |
---|
1584 | |
---|
1585 | cat >! phys_b_wave_1a << EOF |
---|
1586 | diff_opt = 1, |
---|
1587 | km_opt = 1, |
---|
1588 | damp_opt = 0, |
---|
1589 | EOF |
---|
1590 | cat >! phys_b_wave_1b << EOF |
---|
1591 | mp_physics = 1, 1, 1, |
---|
1592 | EOF |
---|
1593 | cat >! phys_b_wave_1c << EOF |
---|
1594 | non_hydrostatic = .true., .true., .true., |
---|
1595 | EOF |
---|
1596 | cat >! phys_b_wave_1d << EOF |
---|
1597 | input_from_file = .true.,.false.,.false. |
---|
1598 | EOF |
---|
1599 | |
---|
1600 | cat >! phys_b_wave_2a << EOF |
---|
1601 | diff_opt = 1, |
---|
1602 | km_opt = 1, |
---|
1603 | damp_opt = 0, |
---|
1604 | EOF |
---|
1605 | cat >! phys_b_wave_2b << EOF |
---|
1606 | mp_physics = 1, 1, 1, |
---|
1607 | EOF |
---|
1608 | cat >! phys_b_wave_2c << EOF |
---|
1609 | non_hydrostatic = .false., .false., .false., |
---|
1610 | EOF |
---|
1611 | cat >! phys_b_wave_2d << EOF |
---|
1612 | input_from_file = .true.,.false.,.false. |
---|
1613 | EOF |
---|
1614 | |
---|
1615 | cat >! phys_b_wave_3a << EOF |
---|
1616 | diff_opt = 1, |
---|
1617 | km_opt = 1, |
---|
1618 | damp_opt = 0, |
---|
1619 | EOF |
---|
1620 | cat >! phys_b_wave_3b << EOF |
---|
1621 | mp_physics = 2, 2, 2, |
---|
1622 | EOF |
---|
1623 | cat >! phys_b_wave_3c << EOF |
---|
1624 | non_hydrostatic = .false., .false., .false., |
---|
1625 | EOF |
---|
1626 | cat >! phys_b_wave_3d << EOF |
---|
1627 | input_from_file = .true.,.false.,.false. |
---|
1628 | EOF |
---|
1629 | |
---|
1630 | cat >! phys_b_wave_4a << EOF |
---|
1631 | diff_opt = 1, |
---|
1632 | km_opt = 1, |
---|
1633 | damp_opt = 0, |
---|
1634 | EOF |
---|
1635 | cat >! phys_b_wave_4b << EOF |
---|
1636 | mp_physics = 2, 2, 2, |
---|
1637 | EOF |
---|
1638 | cat >! phys_b_wave_4c << EOF |
---|
1639 | non_hydrostatic = .true., .true., .true., |
---|
1640 | EOF |
---|
1641 | cat >! phys_b_wave_4d << EOF |
---|
1642 | input_from_file = .true.,.false.,.false. |
---|
1643 | EOF |
---|
1644 | |
---|
1645 | cat >! phys_b_wave_5a << EOF |
---|
1646 | diff_opt = 1, |
---|
1647 | km_opt = 1, |
---|
1648 | damp_opt = 0, |
---|
1649 | EOF |
---|
1650 | cat >! phys_b_wave_5b << EOF |
---|
1651 | mp_physics = 0, 0, 0, |
---|
1652 | EOF |
---|
1653 | cat >! phys_b_wave_5c << EOF |
---|
1654 | non_hydrostatic = .false., .false., .false., |
---|
1655 | EOF |
---|
1656 | cat >! phys_b_wave_5d << EOF |
---|
1657 | input_from_file = .true.,.false.,.false. |
---|
1658 | EOF |
---|
1659 | |
---|
1660 | # Tested options for ideal case em_quarter_ss. Modifying these |
---|
1661 | # parameters is acceptable. Adding to these requires changes |
---|
1662 | # to the ideal namelist build below. |
---|
1663 | |
---|
1664 | cat >! phys_quarter_ss_1a << EOF |
---|
1665 | diff_opt = 1, |
---|
1666 | km_opt = 1, |
---|
1667 | damp_opt = 0, |
---|
1668 | EOF |
---|
1669 | cat >! phys_quarter_ss_1b << EOF |
---|
1670 | mp_physics = 1, 1, 1, |
---|
1671 | EOF |
---|
1672 | cat >! phys_quarter_ss_1c << EOF |
---|
1673 | moist_adv_opt = 1, 1, 1, |
---|
1674 | scalar_adv_opt = 1, 1, 1, |
---|
1675 | chem_adv_opt = 1, 1, 1, |
---|
1676 | tke_adv_opt = 1, 1, 1, |
---|
1677 | non_hydrostatic = .true., .true., .true., |
---|
1678 | EOF |
---|
1679 | cat >! phys_quarter_ss_1d << EOF |
---|
1680 | input_from_file = .true.,.false.,.false. |
---|
1681 | EOF |
---|
1682 | cat >! phys_quarter_ss_1e << EOF |
---|
1683 | periodic_x = .false.,.false.,.false., |
---|
1684 | open_xs = .true., .false.,.false., |
---|
1685 | open_xe = .true., .false.,.false., |
---|
1686 | periodic_y = .false.,.false.,.false., |
---|
1687 | open_ys = .true., .false.,.false., |
---|
1688 | open_ye = .true., .false.,.false., |
---|
1689 | EOF |
---|
1690 | cat >! phys_quarter_ss_1f << EOF |
---|
1691 | sf_sfclay_physics = 0, 0, 0, |
---|
1692 | EOF |
---|
1693 | |
---|
1694 | cat >! phys_quarter_ss_2a << EOF |
---|
1695 | diff_opt = 2, |
---|
1696 | km_opt = 2, |
---|
1697 | damp_opt = 1, |
---|
1698 | EOF |
---|
1699 | cat >! phys_quarter_ss_2b << EOF |
---|
1700 | mp_physics = 1, 1, 1, |
---|
1701 | EOF |
---|
1702 | cat >! phys_quarter_ss_2c << EOF |
---|
1703 | moist_adv_opt = 2, 2, 2, |
---|
1704 | scalar_adv_opt = 2, 2, 2, |
---|
1705 | chem_adv_opt = 2, 2, 2, |
---|
1706 | tke_adv_opt = 2, 2, 2, |
---|
1707 | sfs_opt = 0, 0, 0, |
---|
1708 | non_hydrostatic = .true., .true., .true., |
---|
1709 | EOF |
---|
1710 | cat >! phys_quarter_ss_2d << EOF |
---|
1711 | input_from_file = .true.,.false.,.false. |
---|
1712 | EOF |
---|
1713 | cat >! phys_quarter_ss_2e << EOF |
---|
1714 | periodic_x = .false.,.false.,.false., |
---|
1715 | open_xs = .true., .false.,.false., |
---|
1716 | open_xe = .true., .false.,.false., |
---|
1717 | periodic_y = .false.,.false.,.false., |
---|
1718 | open_ys = .true., .false.,.false., |
---|
1719 | open_ye = .true., .false.,.false., |
---|
1720 | EOF |
---|
1721 | cat >! phys_quarter_ss_2f << EOF |
---|
1722 | sf_sfclay_physics = 1, 1, 1, |
---|
1723 | EOF |
---|
1724 | |
---|
1725 | cat >! phys_quarter_ss_3a << EOF |
---|
1726 | diff_opt = 2, |
---|
1727 | km_opt = 2, |
---|
1728 | damp_opt = 1, |
---|
1729 | EOF |
---|
1730 | cat >! phys_quarter_ss_3b << EOF |
---|
1731 | mp_physics = 1, 1, 1, |
---|
1732 | EOF |
---|
1733 | cat >! phys_quarter_ss_3c << EOF |
---|
1734 | moist_adv_opt = 2, 2, 2, |
---|
1735 | scalar_adv_opt = 2, 2, 2, |
---|
1736 | chem_adv_opt = 2, 2, 2, |
---|
1737 | tke_adv_opt = 2, 2, 2, |
---|
1738 | sfs_opt = 1, 1, 1, |
---|
1739 | non_hydrostatic = .true., .true., .true., |
---|
1740 | EOF |
---|
1741 | cat >! phys_quarter_ss_3d << EOF |
---|
1742 | input_from_file = .true.,.false.,.false. |
---|
1743 | EOF |
---|
1744 | cat >! phys_quarter_ss_3e << EOF |
---|
1745 | periodic_x = .false.,.false.,.false., |
---|
1746 | open_xs = .true., .false.,.false., |
---|
1747 | open_xe = .true., .false.,.false., |
---|
1748 | periodic_y = .false.,.false.,.false., |
---|
1749 | open_ys = .true., .false.,.false., |
---|
1750 | open_ye = .true., .false.,.false., |
---|
1751 | EOF |
---|
1752 | cat >! phys_quarter_ss_3f << EOF |
---|
1753 | sf_sfclay_physics = 1, 1, 1, |
---|
1754 | EOF |
---|
1755 | |
---|
1756 | cat >! phys_quarter_ss_4a << EOF |
---|
1757 | diff_opt = 2, |
---|
1758 | km_opt = 3, |
---|
1759 | damp_opt = 2, |
---|
1760 | EOF |
---|
1761 | cat >! phys_quarter_ss_4b << EOF |
---|
1762 | mp_physics = 2, 2, 2, |
---|
1763 | EOF |
---|
1764 | cat >! phys_quarter_ss_4c << EOF |
---|
1765 | moist_adv_opt = 1, 1, 1, |
---|
1766 | scalar_adv_opt = 1, 1, 1, |
---|
1767 | chem_adv_opt = 1, 1, 1, |
---|
1768 | tke_adv_opt = 1, 1, 1, |
---|
1769 | sfs_opt = 1, 1, 1, |
---|
1770 | non_hydrostatic = .false., .false., .false., |
---|
1771 | EOF |
---|
1772 | cat >! phys_quarter_ss_4d << EOF |
---|
1773 | input_from_file = .true.,.false.,.false. |
---|
1774 | EOF |
---|
1775 | cat >! phys_quarter_ss_4e << EOF |
---|
1776 | periodic_x = .true., .false.,.false., |
---|
1777 | open_xs = .false.,.false.,.false., |
---|
1778 | open_xe = .false.,.false.,.false., |
---|
1779 | periodic_y = .true., .false.,.false., |
---|
1780 | open_ys = .false.,.false.,.false., |
---|
1781 | open_ye = .false.,.false.,.false., |
---|
1782 | EOF |
---|
1783 | cat >! phys_quarter_ss_4f << EOF |
---|
1784 | sf_sfclay_physics = 1, 1, 1, |
---|
1785 | EOF |
---|
1786 | |
---|
1787 | cat >! phys_quarter_ss_5a << EOF |
---|
1788 | diff_opt = 2, |
---|
1789 | km_opt = 2, |
---|
1790 | damp_opt = 2, |
---|
1791 | EOF |
---|
1792 | cat >! phys_quarter_ss_5b << EOF |
---|
1793 | mp_physics = 2, 2, 2, |
---|
1794 | EOF |
---|
1795 | cat >! phys_quarter_ss_5c << EOF |
---|
1796 | moist_adv_opt = 2, 2, 2, |
---|
1797 | scalar_adv_opt = 2, 2, 2, |
---|
1798 | chem_adv_opt = 2, 2, 2, |
---|
1799 | tke_adv_opt = 2, 2, 2, |
---|
1800 | sfs_opt = 2, 2, 2, |
---|
1801 | non_hydrostatic = .false., .false., .false., |
---|
1802 | EOF |
---|
1803 | cat >! phys_quarter_ss_5d << EOF |
---|
1804 | input_from_file = .true.,.false.,.false. |
---|
1805 | EOF |
---|
1806 | cat >! phys_quarter_ss_5e << EOF |
---|
1807 | periodic_x = .true., .false.,.false., |
---|
1808 | open_xs = .false.,.false.,.false., |
---|
1809 | open_xe = .false.,.false.,.false., |
---|
1810 | periodic_y = .true., .false.,.false., |
---|
1811 | open_ys = .false.,.false.,.false., |
---|
1812 | open_ye = .false.,.false.,.false., |
---|
1813 | EOF |
---|
1814 | cat >! phys_quarter_ss_5f << EOF |
---|
1815 | sf_sfclay_physics = 1, 1, 1, |
---|
1816 | EOF |
---|
1817 | |
---|
1818 | if ( $IO_FORM_WHICH[$IO_FORM] == IO ) then |
---|
1819 | cat >! io_format << EOF |
---|
1820 | io_form_history = $IO_FORM |
---|
1821 | io_form_restart = $IO_FORM |
---|
1822 | io_form_input = $IO_FORM |
---|
1823 | io_form_boundary = $IO_FORM |
---|
1824 | EOF |
---|
1825 | else if ( $IO_FORM_WHICH[$IO_FORM] == I ) then |
---|
1826 | cat >! io_format << EOF |
---|
1827 | io_form_history = 2 |
---|
1828 | io_form_restart = 2 |
---|
1829 | io_form_input = $IO_FORM |
---|
1830 | io_form_boundary = $IO_FORM |
---|
1831 | EOF |
---|
1832 | else if ( $IO_FORM_WHICH[$IO_FORM] == O ) then |
---|
1833 | cat >! io_format << EOF |
---|
1834 | io_form_history = $IO_FORM |
---|
1835 | io_form_restart = 2 |
---|
1836 | io_form_input = 2 |
---|
1837 | io_form_boundary = 2 |
---|
1838 | EOF |
---|
1839 | endif |
---|
1840 | |
---|
1841 | |
---|
1842 | if ( $dataset == jun01 ) then |
---|
1843 | set filetag_real=2001-06-11_12:00:00 |
---|
1844 | else if ( $dataset == jan00 ) then |
---|
1845 | set filetag_real=2000-01-24_12:00:00 |
---|
1846 | else if ( $dataset == chem ) then |
---|
1847 | set filetag_real = ( 2006-04-06_00:00:00 2006-04-06_12:00:00 ) |
---|
1848 | else if ( $dataset == global ) then |
---|
1849 | set filetag_real=2008-01-02_12:00:00 |
---|
1850 | endif |
---|
1851 | |
---|
1852 | set filetag_ideal=0001-01-01_00:00:00 |
---|
1853 | #DAVE################################################### |
---|
1854 | echo did phys, set date to $filetag_real |
---|
1855 | banner 2 |
---|
1856 | #set ans = "$<" |
---|
1857 | #DAVE################################################### |
---|
1858 | |
---|
1859 | ##################################################################### |
---|
1860 | |
---|
1861 | # Set up info for particular architectures |
---|
1862 | |
---|
1863 | set ARCH = ( `uname` ) |
---|
1864 | |
---|
1865 | set ZAP_SERIAL = FALSE |
---|
1866 | set ZAP_OPENMP = FALSE |
---|
1867 | set SERIALRUNCOMMAND = |
---|
1868 | set OMPRUNCOMMAND = |
---|
1869 | set MPIRUNCOMMANDPOST = |
---|
1870 | |
---|
1871 | touch version_info |
---|
1872 | if ( $ARCH[1] == AIX ) then |
---|
1873 | set DEF_DIR = $home |
---|
1874 | set TMPDIR = /ptmp/$user |
---|
1875 | # keep stuff out of $HOME and /ptmp/$USER |
---|
1876 | # this allows multiple regressions tests to run simultaneously |
---|
1877 | # extend this to other machines later |
---|
1878 | if ( ( `hostname | cut -c 1-2` == bs ) && ( ! $?LOADL_JOB_NAME ) ) then |
---|
1879 | echo "${0}: ERROR:: This batch script must be submitted via" |
---|
1880 | echo "${0}: LoadLeveler on an AIX machine\!" |
---|
1881 | exit |
---|
1882 | else if ( `hostname | cut -c 1-2` == bs ) then |
---|
1883 | set job_id = `echo ${LOADL_JOB_NAME} | cut -f2 -d'.'` |
---|
1884 | set DEF_DIR = /ptmp/$user/wrf_regression.${job_id} |
---|
1885 | set TMPDIR = $DEF_DIR |
---|
1886 | if ( -d $DEF_DIR ) then |
---|
1887 | echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it" |
---|
1888 | exit ( 1 ) |
---|
1889 | else |
---|
1890 | mkdir -p $DEF_DIR |
---|
1891 | echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results" |
---|
1892 | endif |
---|
1893 | set CUR_DIR = ${LOADL_STEP_INITDIR} |
---|
1894 | else if ( ( `hostname | cut -c 1-2` == bv ) || ( `hostname | cut -c 1-2` == be ) ) then |
---|
1895 | set job_id = $LSB_JOBID |
---|
1896 | set DEF_DIR = /ptmp/$user/${tdir}/wrf_regression.${job_id} |
---|
1897 | set TMPDIR = $DEF_DIR |
---|
1898 | if ( -d $DEF_DIR ) then |
---|
1899 | echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it" |
---|
1900 | exit ( 1 ) |
---|
1901 | else |
---|
1902 | mkdir -p $DEF_DIR |
---|
1903 | echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results" |
---|
1904 | endif |
---|
1905 | else if ( ( ( `hostname | cut -c 1-2` != be ) && ( `hostname | cut -c 1-2` != bv ) ) && ( ! $?LOADL_JOB_NAME ) ) then |
---|
1906 | echo "${0}: ERROR:: This batch script must be submitted via" |
---|
1907 | echo "${0}: LoadLeveler on an AIX machine\!" |
---|
1908 | exit |
---|
1909 | else if ( ( `hostname | cut -c 1-2` != be ) && ( `hostname | cut -c 1-2` != bv ) ) then |
---|
1910 | set job_id = `echo ${LOADL_JOB_NAME} | cut -f2 -d'.'` |
---|
1911 | set DEF_DIR = /ptmp/$user/wrf_regression.${job_id} |
---|
1912 | set TMPDIR = $DEF_DIR |
---|
1913 | if ( -d $DEF_DIR ) then |
---|
1914 | echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it" |
---|
1915 | exit ( 1 ) |
---|
1916 | else |
---|
1917 | mkdir -p $DEF_DIR |
---|
1918 | echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results" |
---|
1919 | endif |
---|
1920 | set CUR_DIR = ${LOADL_STEP_INITDIR} |
---|
1921 | endif |
---|
1922 | if ( ! -d $TMPDIR ) mkdir $TMPDIR |
---|
1923 | set MAIL = /usr/bin/mailx |
---|
1924 | set COMPOPTS = ( 1 2 3 ) |
---|
1925 | set COMPOPTS_NO_NEST = 0 |
---|
1926 | set COMPOPTS_NEST_STATIC = 1 |
---|
1927 | set COMPOPTS_NEST_PRESCRIBED = 2 |
---|
1928 | set Num_Procs = 4 |
---|
1929 | set OPENMP = $Num_Procs |
---|
1930 | setenv MP_PROCS $Num_Procs |
---|
1931 | setenv MP_RMPOOL 1 |
---|
1932 | if ( `hostname | cut -c 1-2` == bs ) then |
---|
1933 | set MPIRUNCOMMAND = poe |
---|
1934 | else if ( `hostname | cut -c 1-2` == bv ) then |
---|
1935 | set MPIRUNCOMMAND = mpirun.lsf |
---|
1936 | else if ( `hostname | cut -c 1-2` == be ) then |
---|
1937 | set MPIRUNCOMMAND = /contrib/mpiruns/be/mpirun.lsf |
---|
1938 | else if ( ( `hostname | cut -c 1-2` != bs ) && \ |
---|
1939 | ( `hostname | cut -c 1-2` != bv ) && ( `hostname | cut -c 1-2` != be ) ) then |
---|
1940 | set MPIRUNCOMMAND = poe |
---|
1941 | endif |
---|
1942 | if ( $CHEM == TRUE ) then |
---|
1943 | set ZAP_OPENMP = TRUE |
---|
1944 | else if ( $CHEM == FALSE ) then |
---|
1945 | set ZAP_OPENMP = FALSE |
---|
1946 | endif |
---|
1947 | # check compiler version, JM |
---|
1948 | lslpp -i | grep xlf | grep ' xlfcmp ' | head -1 |
---|
1949 | set xlfvers=`lslpp -i | grep xlf | grep ' xlfcmp ' | head -1 | awk '{print $2}' | sed 's/\...*$//'` |
---|
1950 | if ( ( $xlfvers > 9 ) && ( $NESTED == TRUE ) ) then |
---|
1951 | # set ZAP_OPENMP = TRUE |
---|
1952 | endif |
---|
1953 | # end of compiler check, JM |
---|
1954 | echo "Compiler version info: " >! version_info |
---|
1955 | echo "FORTRAN: " `lslpp -l | grep xlfrte | head -1 | awk '{print $1 " " $2}'` >>! version_info |
---|
1956 | echo " " >>! version_info |
---|
1957 | echo "OS version info: " >>! version_info |
---|
1958 | echo "AIX: " `lslpp -l | grep bos.mp | head -1 | awk '{print $1 " " $2}'` >>! version_info |
---|
1959 | echo " " >>! version_info |
---|
1960 | setenv MP_SHARED_MEMORY yes |
---|
1961 | else if ( $ARCH[1] == Darwin ) then |
---|
1962 | if ( ( `hostname` == stink ) && ( -d /stink/gill/Regression_Tests ) ) then |
---|
1963 | set DEF_DIR = /stink/gill/Regression_Tests/wrf_regression |
---|
1964 | mkdir $DEF_DIR |
---|
1965 | else |
---|
1966 | echo "We at least need a directory from which to do stuff" |
---|
1967 | exit ( 2 ) |
---|
1968 | endif |
---|
1969 | set TMPDIR = . |
---|
1970 | set MAIL = /usr/bin/mailx |
---|
1971 | if ( $LINUX_COMP == PGI ) then |
---|
1972 | set COMPOPTS = ( 1 2 3 ) |
---|
1973 | set ZAP_OPENMP = FALSE |
---|
1974 | else if ( $LINUX_COMP == G95 ) then |
---|
1975 | set COMPOPTS = ( 13 0 14 ) |
---|
1976 | set ZAP_OPENMP = TRUE |
---|
1977 | endif |
---|
1978 | set COMPOPTS_NO_NEST = 0 |
---|
1979 | set COMPOPTS_NEST_STATIC = 1 |
---|
1980 | set COMPOPTS_NEST_PRESCRIBED = 2 |
---|
1981 | set Num_Procs = 4 |
---|
1982 | set OPENMP = 2 |
---|
1983 | cat >! `pwd`/machfile << EOF |
---|
1984 | `hostname` |
---|
1985 | `hostname` |
---|
1986 | `hostname` |
---|
1987 | `hostname` |
---|
1988 | EOF |
---|
1989 | set Mach = `pwd`/machfile |
---|
1990 | set SERIALRUNCOMMAND = |
---|
1991 | set OMPRUNCOMMAND = |
---|
1992 | echo "Compiler version info: " >! version_info |
---|
1993 | if ( $LINUX_COMP == PGI ) then |
---|
1994 | set MPIRUNCOMMAND = ( /usr/local/mpich2-1.0.6p1-pgi/bin/mpirun -np $Num_Procs -machinefile $Mach ) |
---|
1995 | pgf90 -V | head -2 | tail -1 >>&! version_info |
---|
1996 | else if ( $LINUX_COMP == G95 ) then |
---|
1997 | set MPIRUNCOMMAND = ( /usr/local/mpich/bin/mpirun -np $Num_Procs -machinefile $Mach ) |
---|
1998 | g95 -v |& grep gcc >>&! version_info |
---|
1999 | endif |
---|
2000 | echo " " >>! version_info |
---|
2001 | echo "OS version info: " >>! version_info |
---|
2002 | uname -a >>&! version_info |
---|
2003 | echo " " >>! version_info |
---|
2004 | ps -A | grep mpd | grep -v grep >& /dev/null |
---|
2005 | set ok = $status |
---|
2006 | if ( $ok != 0 ) then |
---|
2007 | echo starting an mpd process |
---|
2008 | mpd & |
---|
2009 | endif |
---|
2010 | else if ( $ARCH[1] == OSF1 && $clrm == 1 ) then |
---|
2011 | set DEF_DIR = /`hostname | cut -d. -f1`/$user |
---|
2012 | set TMPDIR = /mmmtmp/$user |
---|
2013 | set MAIL = /usr/bin/mailx |
---|
2014 | if ( ( $NESTED == TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
2015 | set COMPOPTS = ( 2 4 6 ) |
---|
2016 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
2017 | set COMPOPTS = ( 1 3 6 ) |
---|
2018 | else if ( ( $NESTED == TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
2019 | set COMPOPTS = ( 2 4 5 ) |
---|
2020 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
2021 | set COMPOPTS = ( 1 3 5 ) |
---|
2022 | endif |
---|
2023 | set Num_Procs = 4 |
---|
2024 | set OPENMP = 0 |
---|
2025 | set ZAP_OPENMP = TRUE |
---|
2026 | cat >! $TMPDIR/machfile << EOF |
---|
2027 | service03 |
---|
2028 | service04 |
---|
2029 | service05 |
---|
2030 | service06 |
---|
2031 | EOF |
---|
2032 | set Mach = $TMPDIR/machfile |
---|
2033 | set MPIRUNCOMMAND = ( mpirun -np $Num_Procs -machinefile $Mach ) |
---|
2034 | echo "Compiler version info: " >! version_info |
---|
2035 | f90 -version >>&! version_info |
---|
2036 | echo " " >>! version_info |
---|
2037 | echo "OS version info: " >>! version_info |
---|
2038 | uname -a >>&! version_info |
---|
2039 | echo " " >>! version_info |
---|
2040 | else if ( ( $ARCH[1] == Linux ) && ( `hostname` == bay-mmm ) ) then |
---|
2041 | set DEF_DIR = /data3/mp/${user}/`hostname` |
---|
2042 | if ( ! -d $DEF_DIR ) mkdir $DEF_DIR |
---|
2043 | set TMPDIR = . |
---|
2044 | set MAIL = /bin/mail |
---|
2045 | if ( $LINUX_COMP == PGI ) then |
---|
2046 | if ( ( $NESTED == TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
2047 | set COMPOPTS = ( 2 4 5 ) |
---|
2048 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
2049 | set COMPOPTS = ( 1 3 5 ) |
---|
2050 | else if ( ( $NESTED == TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
2051 | set COMPOPTS = ( 2 4 6 ) |
---|
2052 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
2053 | set COMPOPTS = ( 1 3 6 ) |
---|
2054 | endif |
---|
2055 | else if ( $LINUX_COMP == INTEL ) then |
---|
2056 | if ( $NESTED == TRUE ) then |
---|
2057 | set COMPOPTS = ( 8 10 11 ) |
---|
2058 | else if ( $NESTED != TRUE ) then |
---|
2059 | set COMPOPTS = ( 7 9 11 ) |
---|
2060 | endif |
---|
2061 | endif |
---|
2062 | set Num_Procs = 2 |
---|
2063 | set OPENMP = $Num_Procs |
---|
2064 | cat >! machfile << EOF |
---|
2065 | `hostname` |
---|
2066 | `hostname` |
---|
2067 | `hostname` |
---|
2068 | `hostname` |
---|
2069 | EOF |
---|
2070 | set Mach = `pwd`/machfile |
---|
2071 | if ( $CHEM == TRUE ) then |
---|
2072 | set ZAP_OPENMP = TRUE |
---|
2073 | else if ( $CHEM == FALSE ) then |
---|
2074 | set ZAP_OPENMP = FALSE |
---|
2075 | endif |
---|
2076 | if ( $LINUX_COMP == INTEL ) then |
---|
2077 | set ZAP_OPENMP = TRUE |
---|
2078 | endif |
---|
2079 | set MPIRUNCOMMAND = ( mpirun -np $Num_Procs -machinefile $Mach ) |
---|
2080 | echo "Compiler version info: " >! version_info |
---|
2081 | if ( $LINUX_COMP == PGI ) then |
---|
2082 | pgf90 -V >>&! version_info |
---|
2083 | else if ( $LINUX_COMP == INTEL ) then |
---|
2084 | ifort -v >>&! version_info |
---|
2085 | endif |
---|
2086 | echo " " >>! version_info |
---|
2087 | echo "OS version info: " >>! version_info |
---|
2088 | uname -a >>&! version_info |
---|
2089 | echo " " >>! version_info |
---|
2090 | else if ( ( $ARCH[1] == Linux ) && ( `hostname | cut -c 1-2` == ln ) ) then |
---|
2091 | set DEF_DIR = /ptmp/${user}/wrf_regtest |
---|
2092 | if ( ! -d $DEF_DIR ) mkdir $DEF_DIR |
---|
2093 | set TMPDIR = . |
---|
2094 | set MAIL = /bin/mail |
---|
2095 | if ( $LINUX_COMP == PGI ) then |
---|
2096 | if ( ( $NESTED == TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
2097 | set COMPOPTS = ( 4 2 3 ) |
---|
2098 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
2099 | set COMPOPTS = ( 1 2 3 ) |
---|
2100 | endif |
---|
2101 | endif |
---|
2102 | set Num_Procs = 4 |
---|
2103 | set OPENMP = 2 |
---|
2104 | cat >! machfile << EOF |
---|
2105 | `hostname` |
---|
2106 | `hostname` |
---|
2107 | `hostname` |
---|
2108 | `hostname` |
---|
2109 | EOF |
---|
2110 | set Mach = `pwd`/machfile |
---|
2111 | set ZAP_OPENMP = TRUE |
---|
2112 | set MPIRUNCOMMAND = mpirun.lsf |
---|
2113 | echo "Compiler version info: " >! version_info |
---|
2114 | if ( $LINUX_COMP == PGI ) then |
---|
2115 | pgf90 -V >>&! version_info |
---|
2116 | else if ( $LINUX_COMP == INTEL ) then |
---|
2117 | ifort -v >>&! version_info |
---|
2118 | endif |
---|
2119 | echo " " >>! version_info |
---|
2120 | echo "OS version info: " >>! version_info |
---|
2121 | uname -a >>&! version_info |
---|
2122 | echo " " >>! version_info |
---|
2123 | else if ( ( $ARCH[1] == Linux ) && ( `hostname` == basswood ) ) then |
---|
2124 | set job_id = $$ |
---|
2125 | set DEF_DIR = /basswood/$user/Regression_Tests/wrf_regression |
---|
2126 | set TMPDIR = $DEF_DIR |
---|
2127 | if ( -d $DEF_DIR ) then |
---|
2128 | echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it" |
---|
2129 | exit ( 1 ) |
---|
2130 | else |
---|
2131 | mkdir -p $DEF_DIR |
---|
2132 | echo "See directory ${DEF_DIR}/ for wrftest.output and other test results" |
---|
2133 | endif |
---|
2134 | set MAIL = /bin/mail |
---|
2135 | set COMPOPTS_NO_NEST = 0 |
---|
2136 | set COMPOPTS_NEST_STATIC = 1 |
---|
2137 | set COMPOPTS_NEST_PRESCRIBED = 2 |
---|
2138 | if ( $LINUX_COMP == PGI ) then |
---|
2139 | set COMPOPTS = ( 7 8 9 ) |
---|
2140 | else if ( $LINUX_COMP == G95 ) then |
---|
2141 | set COMPOPTS = ( 5 5 6 ) |
---|
2142 | endif |
---|
2143 | set Num_Procs = 4 |
---|
2144 | set OPENMP = $Num_Procs |
---|
2145 | cat >! machfile << EOF |
---|
2146 | `hostname` |
---|
2147 | `hostname` |
---|
2148 | `hostname` |
---|
2149 | `hostname` |
---|
2150 | EOF |
---|
2151 | set Mach = `pwd`/machfile |
---|
2152 | if ( $CHEM == TRUE ) then |
---|
2153 | set ZAP_OPENMP = TRUE |
---|
2154 | else if ( $CHEM == FALSE ) then |
---|
2155 | set ZAP_OPENMP = FALSE |
---|
2156 | endif |
---|
2157 | if ( $LINUX_COMP == G95 ) then |
---|
2158 | set ZAP_OPENMP = TRUE |
---|
2159 | endif |
---|
2160 | set ZAP_OPENMP = TRUE |
---|
2161 | set MPIRUNCOMMAND = ( mpirun -np $Num_Procs -machinefile $Mach ) |
---|
2162 | echo "Compiler version info: " >! version_info |
---|
2163 | if ( $LINUX_COMP == PGI ) then |
---|
2164 | pgf90 -V >>&! version_info |
---|
2165 | else if ( $LINUX_COMP == G95 ) then |
---|
2166 | g95 -v |& grep gcc >>&! version_info |
---|
2167 | endif |
---|
2168 | echo " " >>! version_info |
---|
2169 | echo "OS version info: " >>! version_info |
---|
2170 | uname -a >>&! version_info |
---|
2171 | echo " " >>! version_info |
---|
2172 | else if ( `hostname` == tempest ) then |
---|
2173 | set DEF_DIR = /ptmp/${user}/wrf_regtest.${QSUB_REQID} |
---|
2174 | if ( ! -d $DEF_DIR ) mkdir $DEF_DIR |
---|
2175 | set TMPDIR = . |
---|
2176 | set MAIL = /usr/sbin/Mail |
---|
2177 | set COMPOPTS = ( 1 2 3 ) |
---|
2178 | set Num_Procs = 2 |
---|
2179 | set OPENMP = $Num_Procs |
---|
2180 | set Mach = `pwd`/machfile |
---|
2181 | set ZAP_OPENMP = TRUE |
---|
2182 | set MPIRUNCOMMAND = ( mpirun -np $Num_Procs ) |
---|
2183 | echo "Compiler version info: " >! version_info |
---|
2184 | f90 -version >>&! version_info |
---|
2185 | echo " " >>! version_info |
---|
2186 | echo "OS version info: " >>! version_info |
---|
2187 | uname -a >>&! version_info |
---|
2188 | echo " " >>! version_info |
---|
2189 | else if ( ( $ARCH[1] == Linux ) && ( `hostname` == master ) ) then |
---|
2190 | set DEF_DIR = /big6/gill/DO_NOT_REMOVE_DIR |
---|
2191 | set TMPDIR = . |
---|
2192 | set MAIL = /bin/mail |
---|
2193 | if ( $LINUX_COMP == PGI ) then |
---|
2194 | if ( $NESTED == TRUE ) then |
---|
2195 | set COMPOPTS = ( 2 4 5 ) |
---|
2196 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
2197 | set COMPOPTS = ( 1 3 6 ) |
---|
2198 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
2199 | set COMPOPTS = ( 1 3 5 ) |
---|
2200 | endif |
---|
2201 | else if ( $LINUX_COMP == INTEL ) then |
---|
2202 | if ( $NESTED == TRUE ) then |
---|
2203 | set COMPOPTS = ( 8 10 11 ) |
---|
2204 | else if ( $NESTED != TRUE ) then |
---|
2205 | set COMPOPTS = ( 7 9 11 ) |
---|
2206 | endif |
---|
2207 | endif |
---|
2208 | set Num_Procs = 4 |
---|
2209 | set OPENMP = 2 |
---|
2210 | cat >! machfile << EOF |
---|
2211 | node3 |
---|
2212 | node3 |
---|
2213 | node4 |
---|
2214 | node4 |
---|
2215 | EOF |
---|
2216 | set Mach = `pwd`/machfile |
---|
2217 | if ( $CHEM == TRUE ) then |
---|
2218 | set ZAP_OPENMP = TRUE |
---|
2219 | else if ( $CHEM == FALSE ) then |
---|
2220 | set ZAP_OPENMP = FALSE |
---|
2221 | endif |
---|
2222 | if ( $LINUX_COMP == INTEL ) then |
---|
2223 | set ZAP_OPENMP = TRUE |
---|
2224 | endif |
---|
2225 | set MPIRUNCOMMAND = ( mpirun -v -np $Num_Procs -machinefile $Mach -nolocal ) |
---|
2226 | set MPIRUNCOMMANDPOST = "< /dev/null" |
---|
2227 | echo "Compiler version info: " >! version_info |
---|
2228 | if ( $LINUX_COMP == PGI ) then |
---|
2229 | pgf90 -V >>&! version_info |
---|
2230 | else if ( $LINUX_COMP == INTEL ) then |
---|
2231 | ifort -v >>&! version_info |
---|
2232 | endif |
---|
2233 | echo " " >>! version_info |
---|
2234 | echo "OS version info: " >>! version_info |
---|
2235 | uname -a >>&! version_info |
---|
2236 | echo " " >>! version_info |
---|
2237 | else |
---|
2238 | echo "Unrecognized architecture for regression test" >! error_message |
---|
2239 | echo `uname` >> error_message |
---|
2240 | echo `hostname` >> error_message |
---|
2241 | $MAIL -s "Unknown architecture $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < error_message |
---|
2242 | exit ( 1 ) |
---|
2243 | endif |
---|
2244 | |
---|
2245 | ##################################################################### |
---|
2246 | #DAVE################################################### |
---|
2247 | echo did the arch specific stuff |
---|
2248 | banner 3 |
---|
2249 | #set ans = "$<" |
---|
2250 | #DAVE################################################### |
---|
2251 | |
---|
2252 | if ( $FDDA == TRUE ) then |
---|
2253 | if ( ( $PHYSOPTS_FDDA == GRID ) && ( $ZAP_OPENMP == FALSE ) ) then |
---|
2254 | set ZAP_OPENMP = FALSE |
---|
2255 | else if ( $PHYSOPTS_FDDA == BOTH ) then |
---|
2256 | set ZAP_OPENMP = TRUE |
---|
2257 | endif |
---|
2258 | endif |
---|
2259 | |
---|
2260 | # First of all, in which particular directory do we start. |
---|
2261 | |
---|
2262 | cd $DEF_DIR |
---|
2263 | |
---|
2264 | # We want to keep the old regression stuff around |
---|
2265 | |
---|
2266 | if ( -d regression_test ) then |
---|
2267 | if ( -d regression_test.old ) then |
---|
2268 | /bin/rm -fr regression_test.old |
---|
2269 | endif |
---|
2270 | /bin/mv regression_test regression_test.old |
---|
2271 | endif |
---|
2272 | |
---|
2273 | # Go to the regression test directory |
---|
2274 | |
---|
2275 | mkdir regression_test |
---|
2276 | set ok = $status |
---|
2277 | if ( $ok != 0 ) then |
---|
2278 | echo "Gee, I cannot make a directory in $DEF_DIR" >! error_message |
---|
2279 | echo `pwd` >> error_message |
---|
2280 | echo `\ls -ls` >> error_message |
---|
2281 | $MAIL -s "$DEF_DIR not writable $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < error_message |
---|
2282 | exit ( 1 ) |
---|
2283 | else |
---|
2284 | pushd regression_test |
---|
2285 | endif |
---|
2286 | |
---|
2287 | if ( $acquire_from == "cvs" ) then |
---|
2288 | |
---|
2289 | # Checkout the most recent version of WRF from the NCAR cvs repository, |
---|
2290 | # and pick up the required input data from the anonymous ftp site. |
---|
2291 | |
---|
2292 | cvs checkout -D $thedate WRFV3 |
---|
2293 | find ./WRFV3 -exec touch \{\} \; |
---|
2294 | ftp -n ftp.ucar.edu < ftp_script_data |
---|
2295 | |
---|
2296 | |
---|
2297 | else if ( $acquire_from == "filearg" ) then |
---|
2298 | |
---|
2299 | # A tar file of the WRF source was provided, so that is used, along with |
---|
2300 | # the required input data files from the ftp site. |
---|
2301 | |
---|
2302 | tar xvf $thefile |
---|
2303 | cd WRFV3 |
---|
2304 | clean -a |
---|
2305 | cd .. |
---|
2306 | ftp -n ftp.ucar.edu < ftp_script_data |
---|
2307 | |
---|
2308 | else if ( $acquire_from == "environment" ) then |
---|
2309 | |
---|
2310 | # A tar file of WRF is assumed to be available. |
---|
2311 | |
---|
2312 | tar xvf $thefile |
---|
2313 | |
---|
2314 | endif |
---|
2315 | |
---|
2316 | # And we can stick the input data where we want, the WRFV3 directory has been created. |
---|
2317 | |
---|
2318 | ( cd WRFV3/test/em_real ; ln -sf $thedataem/* . ) |
---|
2319 | ( cd WRFV3/test/nmm_real ; ln -s $thedatanmm/met_nmm* . ; \ |
---|
2320 | cp $thedatanmm/namelist.input.regtest . ) |
---|
2321 | #DAVE################################################### |
---|
2322 | ( cd WRFV3/test/em_real ; ls -ls ) |
---|
2323 | ( cd WRFV3/test/nmm_real ; ls -ls ) |
---|
2324 | banner 4 |
---|
2325 | #set ans = "$<" |
---|
2326 | #DAVE################################################### |
---|
2327 | |
---|
2328 | # John-specific stuff for maple is the else; part of the "using service machines". |
---|
2329 | |
---|
2330 | if ( ! $clrm ) then |
---|
2331 | pushd WRFV3 |
---|
2332 | else |
---|
2333 | if ( ! -d $TMPDIR ) then |
---|
2334 | echo something wrong 1 |
---|
2335 | endif |
---|
2336 | if ( ! -d $TMPDIR/RUN ) then |
---|
2337 | mkdir $TMPDIR/RUN |
---|
2338 | /bin/rm -fr $TMPDIR/RUN/* |
---|
2339 | endif |
---|
2340 | if ( -d $TMPDIR/RUN ) then |
---|
2341 | tar cf - ./WRFV3/test ./WRFV3/main | ( cd $TMPDIR/RUN ; tar xvf - ) |
---|
2342 | pushd WRFV3 |
---|
2343 | else |
---|
2344 | echo something wrong 2 |
---|
2345 | exit |
---|
2346 | endif |
---|
2347 | endif |
---|
2348 | |
---|
2349 | # Here we initialize our output message. |
---|
2350 | |
---|
2351 | if ( -e ${DEF_DIR}/wrftest.output ) rm ${DEF_DIR}/wrftest.output |
---|
2352 | echo "Architecture $ARCH[1] machine: `hostname`" >>! ${DEF_DIR}/wrftest.output |
---|
2353 | echo "Test run from directory: ${WHERE_AM_I}" >>! ${DEF_DIR}/wrftest.output |
---|
2354 | echo "WRFV3 source from: $acquire_from " >>! ${DEF_DIR}/wrftest.output |
---|
2355 | echo "Number of OpenMP processes to use: $OPENMP" >>! ${DEF_DIR}/wrftest.output |
---|
2356 | echo "Number of MPI processes to use: $Num_Procs" >>! ${DEF_DIR}/wrftest.output |
---|
2357 | if ( $ARCH[1] == Darwin ) then |
---|
2358 | set name = `finger $user | grep "Name:" | awk '{print $4 " " $5}'` |
---|
2359 | else |
---|
2360 | set name = ( `grep ^${user}: /etc/passwd | cut -d: -f5` ) |
---|
2361 | endif |
---|
2362 | echo "Test conducted by $name" >>! ${DEF_DIR}/wrftest.output |
---|
2363 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2364 | echo "Test run from directory ${CUR_DIR}" >>! ${DEF_DIR}/wrftest.output |
---|
2365 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2366 | if ( $?LOADL_JOB_NAME ) then |
---|
2367 | echo "Loadlever job name = ${LOADL_JOB_NAME}" >>! ${DEF_DIR}/wrftest.output |
---|
2368 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2369 | endif |
---|
2370 | echo "Real data case for EM is from $dataset " >>! ${DEF_DIR}/wrftest.output |
---|
2371 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2372 | echo "The em real and ideal forecasts will be nested: $NESTED " >>! ${DEF_DIR}/wrftest.output |
---|
2373 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2374 | if ( $REG_TYPE == BIT4BIT ) then |
---|
2375 | echo "This is a bit-wise (traditional) regression test. " >>! ${DEF_DIR}/wrftest.output |
---|
2376 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2377 | else if ( $REG_TYPE == OPTIMIZED ) then |
---|
2378 | echo "This is a fully optimized regression test. " >>! ${DEF_DIR}/wrftest.output |
---|
2379 | echo "No inter-comparisons are made. " >>! ${DEF_DIR}/wrftest.output |
---|
2380 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2381 | endif |
---|
2382 | if ( $REAL8 == TRUE ) then |
---|
2383 | echo "Floating point precision is 8-bytes" >>! ${DEF_DIR}/wrftest.output |
---|
2384 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2385 | endif |
---|
2386 | if ( ( $CHEM == TRUE ) && ( $KPP != TRUE ) ) then |
---|
2387 | echo "WRF_CHEM tests run for em_real core only" >>! ${DEF_DIR}/wrftest.output |
---|
2388 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2389 | else if ( ( $CHEM == TRUE ) && ( $KPP == TRUE ) ) then |
---|
2390 | echo "WRF_CHEM KPP tests run for em_real core only" >>! ${DEF_DIR}/wrftest.output |
---|
2391 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2392 | endif |
---|
2393 | if ( $ADAPTIVE == TRUE ) then |
---|
2394 | echo "Adaptive time step for em_real core only" >>! ${DEF_DIR}/wrftest.output |
---|
2395 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2396 | endif |
---|
2397 | if ( $GLOBAL == TRUE ) then |
---|
2398 | echo "Global tests run for em_real core only" >>! ${DEF_DIR}/wrftest.output |
---|
2399 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2400 | endif |
---|
2401 | if ( $ESMF_LIB == TRUE ) then |
---|
2402 | echo "A separately installed version of the latest ESMF library" >>! ${DEF_DIR}/wrftest.output |
---|
2403 | echo "(NOT the ESMF library included in the WRF tarfile) will" >>! ${DEF_DIR}/wrftest.output |
---|
2404 | echo "be used for MPI tests" >>! ${DEF_DIR}/wrftest.output |
---|
2405 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2406 | endif |
---|
2407 | if ( $QUILT == TRUE ) then |
---|
2408 | echo "One WRF output quilt server will be used for some tests" >>! ${DEF_DIR}/wrftest.output |
---|
2409 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2410 | endif |
---|
2411 | if ( $FDDA == TRUE ) then |
---|
2412 | if ( $PHYSOPTS_FDDA == GRID ) then |
---|
2413 | echo "Running FDDA tests (3D & SFC grid nudging only)" >>! ${DEF_DIR}/wrftest.output |
---|
2414 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2415 | else if ( $PHYSOPTS_FDDA == BOTH ) then |
---|
2416 | echo "Running FDDA tests (3D&SFC=1, obs=2, 3D&SFC=3, 3D&SFC+obs=4, Spectral=5)" >>! ${DEF_DIR}/wrftest.output |
---|
2417 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2418 | endif |
---|
2419 | endif |
---|
2420 | if ( $GENERATE_BASELINE != FALSE ) then |
---|
2421 | echo "WRF output will be archived in baseline directory ${GENERATE_BASELINE} for some tests" >>! \ |
---|
2422 | ${DEF_DIR}/wrftest.output |
---|
2423 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2424 | endif |
---|
2425 | if ( $COMPARE_BASELINE != FALSE ) then |
---|
2426 | echo "WRF output will be compared with files in baseline directory ${COMPARE_BASELINE} for some tests" >>! \ |
---|
2427 | ${DEF_DIR}/wrftest.output |
---|
2428 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2429 | endif |
---|
2430 | echo "The selected I/O option is $IO_FORM ($IO_FORM_NAME[$IO_FORM])" >>! ${DEF_DIR}/wrftest.output |
---|
2431 | if ( $IO_FORM_WHICH[$IO_FORM] == IO ) then |
---|
2432 | echo "This option is for both input and history files" >>! ${DEF_DIR}/wrftest.output |
---|
2433 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2434 | else if ( $IO_FORM_WHICH[$IO_FORM] == I ) then |
---|
2435 | echo "This option is for input files only" >>! ${DEF_DIR}/wrftest.output |
---|
2436 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2437 | else if ( $IO_FORM_WHICH[$IO_FORM] == O ) then |
---|
2438 | echo "This option is for history files only" >>! ${DEF_DIR}/wrftest.output |
---|
2439 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
2440 | endif |
---|
2441 | |
---|
2442 | cat ${CUR_DIR}/version_info >>! ${DEF_DIR}/wrftest.output |
---|
2443 | |
---|
2444 | # There are three WRF em executables to be considered that can run in threaded and |
---|
2445 | # distributed memory. The 2d hills and 2d squall lines cannot be parallelized with |
---|
2446 | # MPI, and are therefore not considered in this shell. The nmm is only run with |
---|
2447 | # distributed memory (1 vs 4 procs). |
---|
2448 | |
---|
2449 | set first_time_in = TRUE |
---|
2450 | foreach core ( $CORES ) |
---|
2451 | #DAVE################################################### |
---|
2452 | echo doing core $core |
---|
2453 | banner 5 |
---|
2454 | #set ans = "$<" |
---|
2455 | #DAVE################################################### |
---|
2456 | |
---|
2457 | # Some sleight of hand is required for the chemistry tests because we need to |
---|
2458 | # build it twice. But normally, we only build with different real vs ideal, or em vs nmm. |
---|
2459 | # What to do, what to do? Well, we ask for em_real TWICE. The first time we build without chemistry |
---|
2460 | # activated, the second time with it activated. The first time, we do a single |
---|
2461 | # test, the second time through, we do the other 5 tests. |
---|
2462 | |
---|
2463 | if ( ( $CHEM == TRUE ) && ( ${#CORES} == 2 ) && ( $first_time_in == TRUE ) ) then |
---|
2464 | setenv WRF_CHEM 0 |
---|
2465 | set PHYSOPTS = ( 1 ) |
---|
2466 | set first_time_in = FALSE |
---|
2467 | else if ( ( $CHEM == TRUE ) && ( $KPP != TRUE ) && ( ${#CORES} == 2 ) && ( $first_time_in != TRUE ) ) then |
---|
2468 | setenv WRF_CHEM 1 |
---|
2469 | set PHYSOPTS = ( 2 3 4 5 6 ) |
---|
2470 | else if ( ( $CHEM == TRUE ) && ( $KPP == TRUE ) && ( ${#CORES} == 2 ) && ( $first_time_in != TRUE ) ) then |
---|
2471 | setenv WRF_CHEM 1 |
---|
2472 | set PHYSOPTS = ( 2 3 ) |
---|
2473 | endif |
---|
2474 | |
---|
2475 | # Cores to test. |
---|
2476 | |
---|
2477 | set ZAP_SERIAL_FOR_THIS_CORE = FALSE |
---|
2478 | set ZAP_OPENMP_FOR_THIS_CORE = FALSE |
---|
2479 | if ( `echo $core | cut -c 1-2` == em ) then |
---|
2480 | setenv WRF_EM_CORE 1 |
---|
2481 | setenv WRF_NMM_CORE 0 |
---|
2482 | setenv WRF_COAMPS_CORE 0 |
---|
2483 | setenv WRF_EXP_CORE 0 |
---|
2484 | set ZAP_SERIAL_FOR_THIS_CORE = FALSE |
---|
2485 | set ZAP_OPENMP_FOR_THIS_CORE = FALSE |
---|
2486 | else if ( `echo $core | cut -c 1-3` == nmm ) then |
---|
2487 | setenv WRF_EM_CORE 0 |
---|
2488 | setenv WRF_NMM_CORE 1 |
---|
2489 | setenv WRF_COAMPS_CORE 0 |
---|
2490 | setenv WRF_EXP_CORE 0 |
---|
2491 | set ZAP_SERIAL_FOR_THIS_CORE = TRUE |
---|
2492 | set ZAP_OPENMP_FOR_THIS_CORE = TRUE |
---|
2493 | endif |
---|
2494 | |
---|
2495 | # Here we are looping over all of the various compilation configurations, |
---|
2496 | # such as serial only, OpenMP only, MPI only, etc. Each architecture |
---|
2497 | # has its own list of these options. We build each of the executables for |
---|
2498 | # this particular ${core}. |
---|
2499 | |
---|
2500 | foreach compopt ( $COMPOPTS ) |
---|
2501 | #DAVE################################################### |
---|
2502 | echo doing compile option $compopt |
---|
2503 | banner 6 |
---|
2504 | #set ans = "$<" |
---|
2505 | #DAVE################################################### |
---|
2506 | |
---|
2507 | # We sometimes are interested in bypassing the OpenMP option. |
---|
2508 | |
---|
2509 | if ( $compopt == $COMPOPTS[2] ) then |
---|
2510 | if ( $ZAP_OPENMP == TRUE || $ZAP_OPENMP_FOR_THIS_CORE == TRUE ) then |
---|
2511 | goto GOT_THIS_EXEC |
---|
2512 | endif |
---|
2513 | endif |
---|
2514 | |
---|
2515 | # NMM only runs parallel |
---|
2516 | if ( $compopt == $COMPOPTS[1] ) then |
---|
2517 | if ( $ZAP_SERIAL == TRUE || $ZAP_SERIAL_FOR_THIS_CORE == TRUE ) then |
---|
2518 | goto GOT_THIS_EXEC |
---|
2519 | endif |
---|
2520 | endif |
---|
2521 | |
---|
2522 | if ( `uname` == AIX ) goto BUILD_REGARDLESS |
---|
2523 | |
---|
2524 | # Did we already build this one? |
---|
2525 | |
---|
2526 | if ( $core == em_real ) then |
---|
2527 | if ( ( $compopt == $COMPOPTS[1] ) && \ |
---|
2528 | ( -e main/wrf_${core}.exe.$compopt ) && \ |
---|
2529 | ( -e main/real_${core}.exe.1 ) && \ |
---|
2530 | ( -e ${DEF_DIR}/regression_test/WRFV3/external/$IO_FORM_NAME[$IO_FORM]/diffwrf ) ) then |
---|
2531 | goto GOT_THIS_EXEC |
---|
2532 | else if ( ( $compopt != $COMPOPTS[1] ) && \ |
---|
2533 | ( -e main/wrf_${core}.exe.$compopt ) && \ |
---|
2534 | ( -e ${DEF_DIR}/regression_test/WRFV3/external/$IO_FORM_NAME[$IO_FORM]/diffwrf ) ) then |
---|
2535 | goto GOT_THIS_EXEC |
---|
2536 | endif |
---|
2537 | else |
---|
2538 | if ( ( $compopt == $COMPOPTS[1] ) && \ |
---|
2539 | ( -e main/wrf_${core}.exe.$compopt ) && \ |
---|
2540 | ( -e main/ideal_${core}.exe.1 ) && \ |
---|
2541 | ( -e ${DEF_DIR}/regression_test/WRFV3/external/$IO_FORM_NAME[$IO_FORM]/diffwrf ) ) then |
---|
2542 | goto GOT_THIS_EXEC |
---|
2543 | else if ( ( $compopt != $COMPOPTS[1] ) && \ |
---|
2544 | ( -e main/wrf_${core}.exe.$compopt ) && \ |
---|
2545 | ( -e ${DEF_DIR}/regression_test/WRFV3/external/$IO_FORM_NAME[$IO_FORM]/diffwrf ) ) then |
---|
2546 | goto GOT_THIS_EXEC |
---|
2547 | endif |
---|
2548 | endif |
---|
2549 | |
---|
2550 | BUILD_REGARDLESS: |
---|
2551 | |
---|
2552 | # The WRF configuration file works with a single integer |
---|
2553 | # input, which is the compiler option. By convention, option $COMPOPTS[1] is |
---|
2554 | # serial, $COMPOPTS[2] is OMP, and $COMPOPTS[3] is MPI. |
---|
2555 | |
---|
2556 | # Print info about use of separately installed ESMF library. |
---|
2557 | set esmf_lib_str = " - - - - - - - - - - - - - " |
---|
2558 | if ( $ESMF_LIB == TRUE ) then |
---|
2559 | # only test ESMF with MPI |
---|
2560 | if ( $compopt == $COMPOPTS[3] ) then |
---|
2561 | echo "A separately installed version of the latest ESMF library" >>! ${DEF_DIR}/wrftest.output |
---|
2562 | echo "(NOT the ESMF library included in the WRF tarfile) is" >>! ${DEF_DIR}/wrftest.output |
---|
2563 | echo "being used for this test of $core parallel $compopt..." >>! ${DEF_DIR}/wrftest.output |
---|
2564 | set esmf_lib_str = "using separate ESMF library" |
---|
2565 | echo "Setting ESMFLIB = ${ESMFLIBSAVE}" >>! ${DEF_DIR}/wrftest.output |
---|
2566 | echo "Setting ESMFINC = ${ESMFINCSAVE}" >>! ${DEF_DIR}/wrftest.output |
---|
2567 | setenv ESMFLIB $ESMFLIBSAVE |
---|
2568 | setenv ESMFINC $ESMFINCSAVE |
---|
2569 | else |
---|
2570 | unsetenv ESMFLIB |
---|
2571 | unsetenv ESMFINC |
---|
2572 | endif |
---|
2573 | endif |
---|
2574 | |
---|
2575 | #DAVE################################################### |
---|
2576 | echo start build mechanism |
---|
2577 | banner 7 |
---|
2578 | #set ans = "$<" |
---|
2579 | #DAVE################################################### |
---|
2580 | ./clean -a |
---|
2581 | |
---|
2582 | # Edit build command for either bit-wise comparison or full optimization. |
---|
2583 | |
---|
2584 | if ( $REG_TYPE == BIT4BIT ) then |
---|
2585 | set DEBUG_FLAG = -d |
---|
2586 | else |
---|
2587 | set DEBUG_FLAG = |
---|
2588 | endif |
---|
2589 | |
---|
2590 | # Edit build command. If this is a nested run, then either static nest |
---|
2591 | # (idealized) or prescribed move (em_real). If not nested, then shut off |
---|
2592 | # the nesting build option. |
---|
2593 | |
---|
2594 | if ( $NESTED == TRUE ) then |
---|
2595 | if ( $core == em_real ) then |
---|
2596 | set compopts_nest = $COMPOPTS_NEST_PRESCRIBED |
---|
2597 | else |
---|
2598 | set compopts_nest = $COMPOPTS_NEST_STATIC |
---|
2599 | endif |
---|
2600 | else |
---|
2601 | set compopts_nest = $COMPOPTS_NO_NEST |
---|
2602 | endif |
---|
2603 | |
---|
2604 | ./configure $DEBUG_FLAG << EOF |
---|
2605 | $compopt |
---|
2606 | $compopts_nest |
---|
2607 | EOF |
---|
2608 | cp configure.wrf configure.wrf.core=${core}_build=${compopt} |
---|
2609 | |
---|
2610 | # The configure.wrf file needs to be adjusted as to whether we are requesting real*4 or real*8 |
---|
2611 | # as the default floating precision. |
---|
2612 | |
---|
2613 | if ( $REAL8 == TRUE ) then |
---|
2614 | sed -e '/^RWORDSIZE/s/\$(NATIVE_RWORDSIZE)/8/' configure.wrf > ! foo ; /bin/mv foo configure.wrf |
---|
2615 | endif |
---|
2616 | |
---|
2617 | # For AIX, remove the MASSV libs for bit-wise comparisons. |
---|
2618 | |
---|
2619 | if ( ( `uname` == AIX ) && ( $REG_TYPE == BIT4BIT ) ) then |
---|
2620 | sed -e '/^LDFLAGS_LOCAL/s/-lmass -lmassv/ /' \ |
---|
2621 | -e '/^ARCH_LOCAL/s/-DNATIVE_MASSV/ /' \ |
---|
2622 | configure.wrf > ! foo ; /bin/mv foo configure.wrf |
---|
2623 | endif |
---|
2624 | |
---|
2625 | # Fix the OpenMP default for IBM regression testing - noopt required for bit-wise comparison. |
---|
2626 | |
---|
2627 | # this should not be needed any more, with changes to have only OMP modules compiled with -qsmp=noauto. JM 20090217 |
---|
2628 | # if ( ( $compopt == $COMPOPTS[2] ) && ( `uname` == AIX ) ) then |
---|
2629 | # sed -e '/^OMP/s/-qsmp=noauto/-qsmp=noauto:noopt/' configure.wrf > ! foo ; /bin/mv foo configure.wrf |
---|
2630 | # endif |
---|
2631 | |
---|
2632 | # A special flag to insure the same results from a random number used in the SAS CU scheme. |
---|
2633 | |
---|
2634 | sed -e '/^ARCH_LOCAL/s/=/= -DREGTEST /' configure.wrf > ! foo ; /bin/mv foo configure.wrf |
---|
2635 | |
---|
2636 | # Save the configure file. |
---|
2637 | |
---|
2638 | cp configure.wrf configure.wrf.core=${core}_build=${compopt} |
---|
2639 | |
---|
2640 | #DAVE################################################### |
---|
2641 | echo configure built with optim mods removed, ready to compile |
---|
2642 | banner 8 |
---|
2643 | #set ans = "$<" |
---|
2644 | #DAVE################################################### |
---|
2645 | |
---|
2646 | # The WRF_SRC_ROOT_DIR hack is only used by the OSF1 build. |
---|
2647 | # It works around the annoying fact that in OSF1 $(PWD) does |
---|
2648 | # not change during execution of regtest.csh, despite the "cd" |
---|
2649 | # and "pushd" commands. |
---|
2650 | setenv WRF_SRC_ROOT_DIR "${DEF_DIR}/regression_test/WRFV3" |
---|
2651 | # Build this executable |
---|
2652 | |
---|
2653 | ./compile $core >&! compile_${core}_build=${compopt}.log |
---|
2654 | #DAVE################################################### |
---|
2655 | echo compile done |
---|
2656 | banner 9 |
---|
2657 | #set ans = "$<" |
---|
2658 | #DAVE################################################### |
---|
2659 | |
---|
2660 | # Did the compile work? Check the expected executable names and locations. |
---|
2661 | |
---|
2662 | set ok = $status |
---|
2663 | if ( ! -x main/wrf.exe ) set ok = 1 |
---|
2664 | |
---|
2665 | if ( ( $core == em_real ) && ( $compopt == $COMPOPTS[1] ) ) then |
---|
2666 | if ( ! -e main/real.exe ) set ok = 1 |
---|
2667 | else if ( ( $core == nmm_real ) && ( $compopt == $COMPOPTS[3] ) ) then |
---|
2668 | if ( ! -e main/real_nmm.exe ) set ok = 1 |
---|
2669 | else if ( $compopt == $COMPOPTS[1] ) then |
---|
2670 | if ( ! -e main/ideal.exe ) set ok = 1 |
---|
2671 | endif |
---|
2672 | |
---|
2673 | if ( ! -x external/io_netcdf/diffwrf ) set ok = 1 |
---|
2674 | # if ( ! -x external/io_int/diffwrf ) set ok = 1 |
---|
2675 | |
---|
2676 | if ( $ok != 0 ) then |
---|
2677 | echo "SUMMARY compilation for $core parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2678 | $MAIL -s "REGRESSION FAILURE $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2679 | exit ( 3 ) |
---|
2680 | else |
---|
2681 | echo "SUMMARY compilation for $core parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2682 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2683 | mv main/wrf.exe main/wrf_${core}.exe.$compopt |
---|
2684 | if ( ( $core == em_real ) && ( $compopt == $COMPOPTS[1] ) ) then |
---|
2685 | mv main/real.exe main/real_${core}.exe.1 |
---|
2686 | else if ( ( $core == nmm_real ) && ( $compopt == $COMPOPTS[3] ) ) then |
---|
2687 | mv main/real_nmm.exe main/real_${core}.exe.$COMPOPTS[3] |
---|
2688 | else if ( $compopt == $COMPOPTS[1] ) then |
---|
2689 | mv main/ideal.exe main/ideal_${core}.exe.1 |
---|
2690 | endif |
---|
2691 | #DAVE################################################### |
---|
2692 | echo exec exists |
---|
2693 | ls -ls main/*.exe* |
---|
2694 | banner 10 |
---|
2695 | #set ans = "$<" |
---|
2696 | #DAVE################################################### |
---|
2697 | endif |
---|
2698 | |
---|
2699 | GOT_THIS_EXEC: |
---|
2700 | |
---|
2701 | if ( $clrm ) then |
---|
2702 | cp main/*exe* $TMPDIR/RUN/WRFV3/main |
---|
2703 | endif |
---|
2704 | |
---|
2705 | end |
---|
2706 | |
---|
2707 | if ( $clrm ) then |
---|
2708 | pushd $TMPDIR/RUN/WRFV3 |
---|
2709 | endif |
---|
2710 | |
---|
2711 | # We have all of the executables built, now we run'em. This is a loop |
---|
2712 | # over all of the various physics options for this particular |
---|
2713 | # ${core}. Inside the physics loop, we loop over the parallel options. |
---|
2714 | # This allows us to use the same WRF input files for each of the parallel |
---|
2715 | # choices for a single physics loop index. |
---|
2716 | |
---|
2717 | foreach phys_option ( $PHYSOPTS ) |
---|
2718 | #DAVE################################################### |
---|
2719 | echo which phys option $phys_option |
---|
2720 | banner 11 |
---|
2721 | #set ans = "$<" |
---|
2722 | #DAVE################################################### |
---|
2723 | |
---|
2724 | # For each of the executables, we need to run several physics |
---|
2725 | # options. |
---|
2726 | |
---|
2727 | if ( $core == em_real ) then |
---|
2728 | |
---|
2729 | if ( $CHEM != TRUE ) then |
---|
2730 | set filetag=$filetag_real |
---|
2731 | else if ( $CHEM == TRUE ) then |
---|
2732 | if ( $phys_option <= 3 ) then |
---|
2733 | set filetag=$filetag_real[1] |
---|
2734 | else |
---|
2735 | set filetag=$filetag_real[2] |
---|
2736 | endif |
---|
2737 | endif |
---|
2738 | |
---|
2739 | foreach compopt ( $COMPOPTS ) |
---|
2740 | #DAVE################################################### |
---|
2741 | echo real if filetag is $filetag |
---|
2742 | echo compopt = $compopt |
---|
2743 | banner 12 |
---|
2744 | #set ans = "$<" |
---|
2745 | #DAVE################################################### |
---|
2746 | |
---|
2747 | # We sometimes are interested in bypassing the OpenMP option. |
---|
2748 | |
---|
2749 | if ( $compopt == $COMPOPTS[2] ) then |
---|
2750 | if ( $ZAP_OPENMP == TRUE || $ZAP_OPENMP_FOR_THIS_CORE == TRUE ) then |
---|
2751 | goto BYPASS_COMP_LOOP_REAL |
---|
2752 | endif |
---|
2753 | endif |
---|
2754 | |
---|
2755 | if ( $compopt == $COMPOPTS[1] ) then |
---|
2756 | if ( $ZAP_SERIAL == TRUE || $ZAP_SERIAL_FOR_THIS_CORE == TRUE ) then |
---|
2757 | goto BYPASS_COMP_LOOP_REAL |
---|
2758 | endif |
---|
2759 | endif |
---|
2760 | |
---|
2761 | pushd test/$core |
---|
2762 | |
---|
2763 | # |
---|
2764 | # Create the correct namelist.input file for real data cases. |
---|
2765 | # |
---|
2766 | |
---|
2767 | if ( $CHEM != TRUE ) then |
---|
2768 | cp ${CUR_DIR}/phys_real_${phys_option} phys_opt |
---|
2769 | if ( $NESTED != TRUE ) then |
---|
2770 | cp ${CUR_DIR}/dyn_real_${phys_option} dyn_opt |
---|
2771 | else |
---|
2772 | cp ${CUR_DIR}/dyn_real_SAFE dyn_opt |
---|
2773 | endif |
---|
2774 | cp ${CUR_DIR}/time_real_${phys_option} time_opt |
---|
2775 | cp ${CUR_DIR}/dom_real dom_real |
---|
2776 | cp ${CUR_DIR}/nest_real_${phys_option} nest_input_opt |
---|
2777 | cp ${CUR_DIR}/damp_real_${phys_option} damp_real |
---|
2778 | if ( -e fdda_opt ) rm fdda_opt |
---|
2779 | cat " grid_fdda=0" > fdda_opt |
---|
2780 | if ( -e fdda_time ) rm fdda_time |
---|
2781 | |
---|
2782 | if ( $FDDA == TRUE ) then |
---|
2783 | cp ${CUR_DIR}/fdda_real_${phys_option} fdda_opt |
---|
2784 | cp ${CUR_DIR}/fdda_real_time_${phys_option} fdda_time |
---|
2785 | endif |
---|
2786 | |
---|
2787 | set time_step = `awk ' /^ time_step /{ print $3 } ' namelist.input.$dataset | cut -d, -f1` |
---|
2788 | |
---|
2789 | # Wanna do more/less time steps on the real cases? Easy. Those last two numbers |
---|
2790 | # in the eqns are all you need. Their product must be 60. So, instead of 3 and 20, |
---|
2791 | # (3 coarse grid timesteps), you could use 20 and 3 (20 coarse grid time steps). |
---|
2792 | |
---|
2793 | if ( $NESTED == TRUE ) then |
---|
2794 | @ run_seconds = $time_step * 3 |
---|
2795 | @ history_interval = $time_step / 20 |
---|
2796 | else if ( $NESTED != TRUE ) then |
---|
2797 | @ run_seconds = $time_step * 10 |
---|
2798 | @ history_interval = $time_step / 6 |
---|
2799 | endif |
---|
2800 | rm ed_in namelist.input.temp |
---|
2801 | cat >! ed_in << EOF |
---|
2802 | g/run_seconds/s/[0-9]/$run_seconds |
---|
2803 | g/history_interval/s/[0-9][0-9][0-9]/$history_interval |
---|
2804 | w namelist.input.temp |
---|
2805 | q |
---|
2806 | EOF |
---|
2807 | ed namelist.input.$dataset < ed_in |
---|
2808 | |
---|
2809 | cp ${CUR_DIR}/io_format io_format |
---|
2810 | sed -e '/^ mp_physics/,/ensdim/d' -e '/^ &physics/r ./phys_opt' \ |
---|
2811 | -e '/^ moist_adv_opt/,/scalar_adv_opt/d' -e '/^ non_hydrostatic/r ./dyn_opt' \ |
---|
2812 | -e '/^ auxinput1_inname/d' -e '/^ debug_level/r ./time_opt' \ |
---|
2813 | -e '/^ input_from_file/d' -e '/^ interval_seconds/r ./nest_input_opt' \ |
---|
2814 | -e '/^ time_step /,/^ smooth_option/d' -e '/^ &domains/r ./dom_real' \ |
---|
2815 | -e '/^ damp_opt /,/^ dampcoef/d' -e '/^ base_temp/r ./damp_real' \ |
---|
2816 | -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
2817 | -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 200/g' \ |
---|
2818 | -e 's/ run_days *= [0-9][0-9]*/ run_days = 0/g' \ |
---|
2819 | -e 's/ run_hours *= [0-9][0-9]*/ run_hours = 0/g' \ |
---|
2820 | -e 's/ run_minutes *= [0-9][0-9]*/ run_minutes = 0/g' \ |
---|
2821 | -e '/^ &fdda/r fdda_opt' \ |
---|
2822 | -e '/^ debug_level/r fdda_time' \ |
---|
2823 | -e '/dyn_opt/d' \ |
---|
2824 | namelist.input.temp >! namelist.input |
---|
2825 | |
---|
2826 | # The chem run has its own namelist, due to special input files (io_form not tested for chem) |
---|
2827 | |
---|
2828 | else if ( $CHEM == TRUE ) then |
---|
2829 | if ( ( $KPP == TRUE ) && ( $phys_option >= 3 ) ) then |
---|
2830 | sed -e '/dyn_opt/d' \ |
---|
2831 | -e 's/^ chem_opt *= [0-9][0-9]*/ chem_opt = '${CHEM_OPT}'/' \ |
---|
2832 | namelist.input.chem_test_${phys_option} >! namelist.input |
---|
2833 | else |
---|
2834 | sed -e '/dyn_opt/d' \ |
---|
2835 | namelist.input.chem_test_${phys_option} >! namelist.input |
---|
2836 | endif |
---|
2837 | |
---|
2838 | if ( -e met_em.d01.${filetag} ) then |
---|
2839 | \rm met_em.d01.* |
---|
2840 | endif |
---|
2841 | if ( ${phys_option} <= 3 ) then |
---|
2842 | ln -s 00z/met_em* . |
---|
2843 | else |
---|
2844 | ln -s 12z/met_em* . |
---|
2845 | endif |
---|
2846 | |
---|
2847 | endif |
---|
2848 | |
---|
2849 | # WRF output quilt servers are only tested for MPI configuration. |
---|
2850 | # Currently, only one WRF output quilt server is used. |
---|
2851 | |
---|
2852 | if ( $QUILT == TRUE ) then |
---|
2853 | if ( $compopt == $COMPOPTS[3] ) then |
---|
2854 | # For now, test only one group of one output quilt servers. |
---|
2855 | sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \ |
---|
2856 | -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \ |
---|
2857 | namelist.input >! namelist.input.temp |
---|
2858 | mv -f namelist.input.temp namelist.input |
---|
2859 | echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled." |
---|
2860 | echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output |
---|
2861 | endif |
---|
2862 | endif |
---|
2863 | |
---|
2864 | /bin/cp namelist.input $TMPDIR/namelist.input.$core.${phys_option}.$compopt |
---|
2865 | #DAVE################################################### |
---|
2866 | echo built namelist $TMPDIR/namelist.input.$core.${phys_option}.$compopt |
---|
2867 | cat $TMPDIR/namelist.input.$core.${phys_option}.$compopt |
---|
2868 | echo need history interval to be 30 |
---|
2869 | banner 13 |
---|
2870 | #set ans = "$<" |
---|
2871 | #DAVE################################################### |
---|
2872 | #DAVE################################################### |
---|
2873 | echo skipped link of data files, we push them elsewhere |
---|
2874 | ls -ls met_em* |
---|
2875 | banner 14 |
---|
2876 | #set ans = "$<" |
---|
2877 | #DAVE################################################### |
---|
2878 | |
---|
2879 | # If this is the serial code, generate the IC and BC. The real.exe program is not |
---|
2880 | # parallelized, so the data is generated and saved for the rest of the parallel tests. |
---|
2881 | # This data is necessarily updated for each of the physics tests. |
---|
2882 | |
---|
2883 | if ( $compopt == $COMPOPTS[1] ) then |
---|
2884 | |
---|
2885 | # Zap any old input data laying around. |
---|
2886 | |
---|
2887 | rm wrfinput_d01 >& /dev/null |
---|
2888 | rm wrfbdy_d01 >& /dev/null |
---|
2889 | |
---|
2890 | if ( $NESTED == TRUE ) then |
---|
2891 | setenv OMP_NUM_THREADS 1 |
---|
2892 | $SERIALRUNCOMMAND ../../main/real_${core}.exe.1 >! print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
2893 | else if ( $NESTED != TRUE ) then |
---|
2894 | ../../main/real_${core}.exe.1 >! print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
2895 | endif |
---|
2896 | #DAVE################################################### |
---|
2897 | echo finished real |
---|
2898 | banner 15 |
---|
2899 | #set ans = "$<" |
---|
2900 | #DAVE################################################### |
---|
2901 | |
---|
2902 | grep "SUCCESS COMPLETE" print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt} >& /dev/null |
---|
2903 | set success = $status |
---|
2904 | |
---|
2905 | # Did making the IC BC files work? |
---|
2906 | |
---|
2907 | if ( $GLOBAL == FALSE ) then |
---|
2908 | if ( ( -e wrfinput_d01 ) && ( -e wrfbdy_d01 ) && ( $success == 0 ) ) then |
---|
2909 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2910 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2911 | else |
---|
2912 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2913 | $MAIL -s "WRF FAIL making IC/BC $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2914 | if ( $KEEP_ON_RUNNING == FALSE ) exit ( 4 ) |
---|
2915 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2916 | endif |
---|
2917 | else if ( $GLOBAL == TRUE ) then |
---|
2918 | if ( ( -e wrfinput_d01 ) && ( $success == 0 ) ) then |
---|
2919 | echo "SUMMARY generate IC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2920 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2921 | else |
---|
2922 | echo "SUMMARY generate IC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2923 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2924 | $MAIL -s "WRF FAIL making IC $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2925 | if ( $KEEP_ON_RUNNING == FALSE ) exit ( 41 ) |
---|
2926 | endif |
---|
2927 | endif |
---|
2928 | #DAVE################################################### |
---|
2929 | echo IC BC must be OK |
---|
2930 | ls -ls wrfi* wrfb* |
---|
2931 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
2932 | ncdump -v Times wrfb* | tail -20 |
---|
2933 | endif |
---|
2934 | banner 16 |
---|
2935 | #set ans = "$<" |
---|
2936 | #DAVE################################################### |
---|
2937 | endif |
---|
2938 | |
---|
2939 | # Run the forecast for this core, physics package and parallel option |
---|
2940 | |
---|
2941 | rm $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt >& /dev/null |
---|
2942 | |
---|
2943 | # The chem run has its own set of namelists, due to special input files. |
---|
2944 | |
---|
2945 | if ( $CHEM == TRUE ) then |
---|
2946 | |
---|
2947 | # WRF output quilt servers are only tested for MPI configuration. |
---|
2948 | # Currently, only one WRF output quilt server is used. |
---|
2949 | |
---|
2950 | if ( $QUILT == TRUE ) then |
---|
2951 | if ( $compopt == $COMPOPTS[3] ) then |
---|
2952 | # For now, test only one group of one output quilt servers. |
---|
2953 | sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \ |
---|
2954 | -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \ |
---|
2955 | namelist.input >! namelist.input.temp |
---|
2956 | mv -f namelist.input.temp namelist.input |
---|
2957 | echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled." |
---|
2958 | echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output |
---|
2959 | endif |
---|
2960 | endif |
---|
2961 | endif |
---|
2962 | |
---|
2963 | if ( $compopt == $COMPOPTS[1] ) then |
---|
2964 | setenv OMP_NUM_THREADS 1 |
---|
2965 | if ( $NESTED == TRUE ) then |
---|
2966 | $SERIALRUNCOMMAND ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
2967 | else if ( $NESTED != TRUE ) then |
---|
2968 | ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
2969 | endif |
---|
2970 | else if ( $compopt == $COMPOPTS[2] ) then |
---|
2971 | setenv OMP_NUM_THREADS $OPENMP |
---|
2972 | if ( $NESTED == TRUE ) then |
---|
2973 | $OMPRUNCOMMAND ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
2974 | else if ( $NESTED != TRUE ) then |
---|
2975 | ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
2976 | endif |
---|
2977 | else if ( $compopt == $COMPOPTS[3] ) then |
---|
2978 | setenv OMP_NUM_THREADS 1 |
---|
2979 | $MPIRUNCOMMAND ../../main/wrf_${core}.exe.$compopt $MPIRUNCOMMANDPOST |
---|
2980 | mv rsl.error.0000 print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
2981 | endif |
---|
2982 | #DAVE################################################### |
---|
2983 | echo ran wrf fcst compopt = $compopt |
---|
2984 | banner 17 |
---|
2985 | #set ans = "$<" |
---|
2986 | #DAVE################################################### |
---|
2987 | |
---|
2988 | grep "SUCCESS COMPLETE" print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
2989 | set success = $status |
---|
2990 | |
---|
2991 | # Did making the forecast work, by that, we mean "is there an output file created", and "are there 2 times periods". |
---|
2992 | |
---|
2993 | if ( ( -e wrfout_d01_${filetag} ) && ( $success == 0 ) ) then |
---|
2994 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
2995 | ncdump -h wrfout_d01_${filetag} | grep Time | grep UNLIMITED | grep currently | grep -q 2 |
---|
2996 | set ok = $status |
---|
2997 | set found_nans = 1 |
---|
2998 | if ( `uname` == AIX ) then |
---|
2999 | ncdump wrfout_d01_${filetag} | grep NaN >& /dev/null |
---|
3000 | set found_nans = $status |
---|
3001 | else if ( `uname` == OSF1 ) then |
---|
3002 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
3003 | # set found_nans = $status |
---|
3004 | else if ( `uname` == Linux ) then |
---|
3005 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
3006 | set found_nans = $status |
---|
3007 | endif |
---|
3008 | if ( $found_nans == 0 ) then |
---|
3009 | echo found nans |
---|
3010 | set ok = 1 |
---|
3011 | endif |
---|
3012 | |
---|
3013 | else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1 ) then |
---|
3014 | # set joe_times = `../../external/io_grib1/wgrib.exe -s -4yr wrfout_d01_${filetag} | grep -v ":anl:" | wc -l` |
---|
3015 | # if ( $joe_times >= 100 ) then |
---|
3016 | set joe_times = `../../external/io_grib1/wgrib.exe -s -4yr wrfout_d01_${filetag} | grep "UGRD:10 m" | wc -l` |
---|
3017 | if ( $joe_times == 2 ) then |
---|
3018 | set ok = 0 |
---|
3019 | else |
---|
3020 | set ok = 1 |
---|
3021 | endif |
---|
3022 | endif |
---|
3023 | if ( $ok == 0 ) then |
---|
3024 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
3025 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3026 | else |
---|
3027 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
3028 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3029 | $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
3030 | if ( $KEEP_ON_RUNNING == FALSE ) exit ( 5 ) |
---|
3031 | endif |
---|
3032 | else |
---|
3033 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
3034 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3035 | $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
3036 | if ( $KEEP_ON_RUNNING == FALSE ) exit ( 6 ) |
---|
3037 | endif |
---|
3038 | #DAVE################################################### |
---|
3039 | echo success or failure of fcst |
---|
3040 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
3041 | ncdump -v Times wrfout_d01_${filetag} | tail -20 |
---|
3042 | endif |
---|
3043 | banner 18 |
---|
3044 | #set ans = "$<" |
---|
3045 | #DAVE################################################### |
---|
3046 | |
---|
3047 | # We have to save this output file for our biggy comparison after all of the |
---|
3048 | # parallel options have been considered. |
---|
3049 | |
---|
3050 | mv wrfout_d01_${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt |
---|
3051 | |
---|
3052 | # To save space, we move the executables after we are finished with them. |
---|
3053 | |
---|
3054 | if ( $phys_option == $PHYSOPTS[${#PHYSOPTS}] ) then |
---|
3055 | mv ../../main/wrf_${core}.exe.$compopt $TMPDIR/wrf_${core}.exe.$compopt |
---|
3056 | endif |
---|
3057 | |
---|
3058 | popd |
---|
3059 | |
---|
3060 | BYPASS_COMP_LOOP_REAL: |
---|
3061 | |
---|
3062 | end |
---|
3063 | |
---|
3064 | else if ( $core == nmm_real ) then |
---|
3065 | #DAVE################################################### |
---|
3066 | echo doing nmm pre |
---|
3067 | banner 19 |
---|
3068 | #set ans = "$<" |
---|
3069 | #DAVE################################################### |
---|
3070 | |
---|
3071 | set compopt = $COMPOPTS[3] # ! parallel only |
---|
3072 | set filetag = 2008-12-02_12:00:00 |
---|
3073 | set phys_option=1 |
---|
3074 | pushd test/$core |
---|
3075 | |
---|
3076 | #DAVE################################################### |
---|
3077 | echo did rms |
---|
3078 | echo $filetag $phys_option |
---|
3079 | banner 19a |
---|
3080 | #set ans = "$<" |
---|
3081 | #DAVE################################################### |
---|
3082 | |
---|
3083 | # Build NMM namelist |
---|
3084 | |
---|
3085 | cp ${CUR_DIR}/io_format io_format |
---|
3086 | sed -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
3087 | namelist.input.regtest >! namelist.input.temp |
---|
3088 | |
---|
3089 | # A fairly short forecast, 10 time steps |
---|
3090 | |
---|
3091 | sed -e 's/^ run_days *= *[0-9]*/ run_days = 0 /' \ |
---|
3092 | -e 's/^ run_hours *= *[0-9]*/ run_hours = 0 /' \ |
---|
3093 | -e 's/^ run_seconds *= *[0-9]*/ run_seconds = 900 /' \ |
---|
3094 | -e 's/^ history_interval *= *[0-9][0-9]*/ history_interval = 15 /' \ |
---|
3095 | -e 's/^ frames_per_outfile *= [0-9]*/ frames_per_outfile = 200/g' \ |
---|
3096 | namelist.input.temp >! namelist.input |
---|
3097 | |
---|
3098 | #DAVE################################################### |
---|
3099 | echo did cp of namelist |
---|
3100 | ls -ls namelist.input |
---|
3101 | cat namelist.input |
---|
3102 | banner 19b |
---|
3103 | #set ans = "$<" |
---|
3104 | #DAVE################################################### |
---|
3105 | |
---|
3106 | # Generate IC/BC for NMM run |
---|
3107 | |
---|
3108 | set RUNCOMMAND = `echo $MPIRUNCOMMAND | sed "s/$Num_Procs/1/"` |
---|
3109 | |
---|
3110 | # Zap any old input data laying around. |
---|
3111 | |
---|
3112 | rm wrfinput_d01 >& /dev/null |
---|
3113 | rm wrfbdy_d01 >& /dev/null |
---|
3114 | |
---|
3115 | $RUNCOMMAND ../../main/real_${core}.exe.$COMPOPTS[3] >! print.out.real_${core}_Phys=${phys_option}_Parallel=$COMPOPTS[3] |
---|
3116 | #DAVE################################################### |
---|
3117 | echo finished real |
---|
3118 | banner 19c |
---|
3119 | #set ans = "$<" |
---|
3120 | #DAVE################################################### |
---|
3121 | |
---|
3122 | mv rsl.out.0000 print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
3123 | grep "SUCCESS COMPLETE" print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt} >& /dev/null |
---|
3124 | set success = $status |
---|
3125 | |
---|
3126 | # Did making the IC BC files work? |
---|
3127 | |
---|
3128 | if ( ( -e wrfinput_d01 ) && ( -e wrfbdy_d01 ) && ( $success == 0 ) ) then |
---|
3129 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
3130 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3131 | else |
---|
3132 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
3133 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3134 | $MAIL -s "WRF FAIL making IC/BC $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
3135 | if ( $KEEP_ON_RUNNING == FALSE ) exit ( 4 ) |
---|
3136 | endif |
---|
3137 | #DAVE################################################### |
---|
3138 | echo IC BC must be OK |
---|
3139 | ls -lsL wrfinput* wrfb* |
---|
3140 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
3141 | ncdump -v Times wrfb* | tail -20 |
---|
3142 | endif |
---|
3143 | banner 20 |
---|
3144 | #set ans = "$<" |
---|
3145 | #DAVE################################################### |
---|
3146 | |
---|
3147 | # Run on 1 and then on Num_Procs processors |
---|
3148 | |
---|
3149 | foreach n ( 1 $Num_Procs ) |
---|
3150 | #DAVE################################################### |
---|
3151 | echo running nmm on $n procs |
---|
3152 | banner 21 |
---|
3153 | #set ans = "$<" |
---|
3154 | #DAVE################################################### |
---|
3155 | |
---|
3156 | if ( ( $n != 1 ) && ( $QUILT != TRUE ) ) then |
---|
3157 | @ nmm_proc = $Num_Procs |
---|
3158 | cat >! nproc_xy << EOF |
---|
3159 | nproc_x = $nmm_proc |
---|
3160 | nproc_y = 1 |
---|
3161 | EOF |
---|
3162 | sed -e '/^ numtiles/r nproc_xy' namelist.input >! file.foo |
---|
3163 | mv file.foo namelist.input |
---|
3164 | else if ( ( $n != 1 ) && ( $QUILT == TRUE ) ) then |
---|
3165 | @ nmm_proc = $Num_Procs - 1 |
---|
3166 | cat >! nproc_xy << EOF |
---|
3167 | nproc_x = $nmm_proc |
---|
3168 | nproc_y = 1 |
---|
3169 | EOF |
---|
3170 | sed -e '/^ numtiles/r nproc_xy' namelist.input >! file.foo |
---|
3171 | mv file.foo namelist.input |
---|
3172 | endif |
---|
3173 | |
---|
3174 | if ( `uname` == AIX ) then |
---|
3175 | set RUNCOMMAND = $MPIRUNCOMMAND |
---|
3176 | else |
---|
3177 | set RUNCOMMAND = `echo $MPIRUNCOMMAND | sed "s/$Num_Procs/$n/"` |
---|
3178 | endif |
---|
3179 | |
---|
3180 | # WRF output quilt servers are only tested for MPI configuration. |
---|
3181 | # Currently, only one WRF output quilt server is used. |
---|
3182 | |
---|
3183 | if ( ( $QUILT == TRUE ) && ( $n == $Num_Procs ) ) then |
---|
3184 | if ( $compopt == $COMPOPTS[3] ) then |
---|
3185 | # For now, test only one group of one output quilt servers. |
---|
3186 | sed -e 's/ nio_tasks_per_group *= *[0-9]*/ nio_tasks_per_group = 1/g' \ |
---|
3187 | -e 's/ nio_groups *= *[0-9]*/ nio_groups = 1/g' \ |
---|
3188 | namelist.input >! namelist.input.temp |
---|
3189 | mv -f namelist.input.temp namelist.input |
---|
3190 | echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled." |
---|
3191 | echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output |
---|
3192 | endif |
---|
3193 | endif |
---|
3194 | |
---|
3195 | # NMM can fail on spurious fp exceptions that don't affect soln. Retry if necessary. |
---|
3196 | |
---|
3197 | set tries=0 |
---|
3198 | while ( $tries < 2 ) |
---|
3199 | #DAVE################################################### |
---|
3200 | echo try attempt $tries allowed to be less than 2 |
---|
3201 | banner 22 |
---|
3202 | #set ans = "$<" |
---|
3203 | #DAVE################################################### |
---|
3204 | @ tries = $tries + 1 |
---|
3205 | $RUNCOMMAND ../../main/wrf_${core}.exe.$compopt $MPIRUNCOMMANDPOST |
---|
3206 | mv rsl.error.0000 print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}_${n}p |
---|
3207 | grep "SUCCESS COMPLETE" print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}_${n}p |
---|
3208 | set success = $status |
---|
3209 | set ok = $status |
---|
3210 | if ( ( -e wrfout_d01_${filetag} ) && ( $success == 0 ) ) then |
---|
3211 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
3212 | ncdump -h wrfout_d01_${filetag} | grep Time | grep UNLIMITED | grep currently | grep -q 2 |
---|
3213 | set ok = $status |
---|
3214 | set found_nans = 1 |
---|
3215 | if ( `uname` == AIX ) then |
---|
3216 | ncdump wrfout_d01_${filetag} | grep NaN >& /dev/null |
---|
3217 | set found_nans = $status |
---|
3218 | else if ( `uname` == OSF1 ) then |
---|
3219 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
3220 | # set found_nans = $status |
---|
3221 | else if ( `uname` == Linux ) then |
---|
3222 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
3223 | set found_nans = $status |
---|
3224 | endif |
---|
3225 | if ( $found_nans == 0 ) then |
---|
3226 | echo found nans |
---|
3227 | set ok = 1 |
---|
3228 | endif |
---|
3229 | |
---|
3230 | else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1 ) then |
---|
3231 | ../../external/io_grib1/wgrib.exe -s -4yr wrfout_d01_${filetag} | grep "UGRD:10 m above gnd:3600 sec fcst" |
---|
3232 | set ok = $status |
---|
3233 | endif |
---|
3234 | if ( $ok == 0 ) then |
---|
3235 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
3236 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3237 | set tries=2 # success, bail from loop |
---|
3238 | else |
---|
3239 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
3240 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3241 | $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
3242 | if ( if ( $KEEP_ON_RUNNING == FALSE ) && ( $tries == 2 ) )exit ( 5 ) |
---|
3243 | endif |
---|
3244 | else |
---|
3245 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
3246 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3247 | $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
3248 | if ( ( $KEEP_ON_RUNNING == FALSE ) && ( $tries == 2 ) ) exit ( 6 ) |
---|
3249 | endif |
---|
3250 | mv wrfout_d01_${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.${compopt}_${n}p |
---|
3251 | #DAVE################################################### |
---|
3252 | echo did nmm fcst |
---|
3253 | ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.${compopt}_${n}p |
---|
3254 | banner 23 |
---|
3255 | #set ans = "$<" |
---|
3256 | #DAVE################################################### |
---|
3257 | end |
---|
3258 | end |
---|
3259 | |
---|
3260 | popd |
---|
3261 | |
---|
3262 | else |
---|
3263 | |
---|
3264 | #DAVE################################################### |
---|
3265 | echo doing ideal runs |
---|
3266 | banner 24 |
---|
3267 | #set ans = "$<" |
---|
3268 | #DAVE################################################### |
---|
3269 | # The ideal cases have different physics tests than the real cases. If this is |
---|
3270 | # more that the total number of ideal physics experiments that we were led to |
---|
3271 | # believe would exist, jump to the end of the physics loop. |
---|
3272 | |
---|
3273 | if ( $phys_option > $Max_Ideal_Physics_Options ) then |
---|
3274 | goto BOTTOM_OF_PHYSICS_LOOP |
---|
3275 | endif |
---|
3276 | |
---|
3277 | set filetag=$filetag_ideal |
---|
3278 | |
---|
3279 | foreach compopt ( $COMPOPTS ) |
---|
3280 | #DAVE################################################### |
---|
3281 | echo doing compopt = $compopt |
---|
3282 | echo filetag = $filetag |
---|
3283 | banner 25 |
---|
3284 | #set ans = "$<" |
---|
3285 | #DAVE################################################### |
---|
3286 | |
---|
3287 | |
---|
3288 | # We sometimes are interested in bypassing the OpenMP option. |
---|
3289 | |
---|
3290 | if ( $compopt == $COMPOPTS[2] ) then |
---|
3291 | if ( $ZAP_OPENMP == TRUE ) then |
---|
3292 | goto BYPASS_COMP_LOOP_IDEAL |
---|
3293 | endif |
---|
3294 | endif |
---|
3295 | |
---|
3296 | pushd test/$core |
---|
3297 | |
---|
3298 | if ( ! -e namelist.input.template ) cp namelist.input namelist.input.template |
---|
3299 | |
---|
3300 | # Create the correct namelist.input file. |
---|
3301 | |
---|
3302 | cp ${CUR_DIR}/dom_ideal dom_ideal |
---|
3303 | if ( $core == em_quarter_ss ) then |
---|
3304 | cp ${CUR_DIR}/phys_quarter_ss_${phys_option}a phys_tke |
---|
3305 | cp ${CUR_DIR}/phys_quarter_ss_${phys_option}b phys_mp |
---|
3306 | cp ${CUR_DIR}/phys_quarter_ss_${phys_option}c phys_nh |
---|
3307 | cp ${CUR_DIR}/phys_quarter_ss_${phys_option}d phys_nest |
---|
3308 | cp ${CUR_DIR}/phys_quarter_ss_${phys_option}e phys_bc |
---|
3309 | cp ${CUR_DIR}/phys_quarter_ss_${phys_option}f phys_sfclay |
---|
3310 | else if ( $core == em_b_wave ) then |
---|
3311 | cp ${CUR_DIR}/phys_b_wave_${phys_option}a phys_tke |
---|
3312 | cp ${CUR_DIR}/phys_b_wave_${phys_option}b phys_mp |
---|
3313 | cp ${CUR_DIR}/phys_b_wave_${phys_option}c phys_nh |
---|
3314 | cp ${CUR_DIR}/phys_b_wave_${phys_option}d phys_nest |
---|
3315 | endif |
---|
3316 | |
---|
3317 | cp ${CUR_DIR}/io_format io_format |
---|
3318 | if ( $NESTED == TRUE ) then |
---|
3319 | if ( $core == em_quarter_ss ) then |
---|
3320 | sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \ |
---|
3321 | -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 1/g' \ |
---|
3322 | -e 's/ run_seconds *= *[0-9][0-9]*/ run_seconds = 0/g' \ |
---|
3323 | -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 1/g' \ |
---|
3324 | -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \ |
---|
3325 | -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \ |
---|
3326 | -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
3327 | -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \ |
---|
3328 | -e '/^ sf_sfclay_physics/d' -e '/^ radt/r ./phys_sfclay' \ |
---|
3329 | -e '/^ moist_adv_opt/,/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \ |
---|
3330 | -e '/^ periodic_x /,/^ open_ye/d' \ |
---|
3331 | -e '/^ &bdy_control/r ./phys_bc' \ |
---|
3332 | -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \ |
---|
3333 | ./namelist.input.template >! namelist.input |
---|
3334 | else if ( $core == em_b_wave ) then |
---|
3335 | sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \ |
---|
3336 | -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 20/g' \ |
---|
3337 | -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 20/g' \ |
---|
3338 | -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \ |
---|
3339 | -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \ |
---|
3340 | -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
3341 | -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \ |
---|
3342 | -e '/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \ |
---|
3343 | -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \ |
---|
3344 | ./namelist.input.template >! namelist.input |
---|
3345 | endif |
---|
3346 | else if ( $NESTED != TRUE ) then |
---|
3347 | if ( $core == em_quarter_ss ) then |
---|
3348 | sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \ |
---|
3349 | -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 2/g' \ |
---|
3350 | -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 2/g' \ |
---|
3351 | -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \ |
---|
3352 | -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \ |
---|
3353 | -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
3354 | -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \ |
---|
3355 | -e '/^ sf_sfclay_physics/d' -e '/^ radt/r ./phys_sfclay' \ |
---|
3356 | -e '/^ moist_adv_opt/,/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \ |
---|
3357 | -e '/^ periodic_x/d' -e '/^ open_xs/d' -e '/^ open_xe/d' \ |
---|
3358 | -e '/^ periodic_y/d' -e '/^ open_ys/d' -e '/^ open_ye/d' \ |
---|
3359 | -e '/^ &bdy_control/r ./phys_bc' \ |
---|
3360 | -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \ |
---|
3361 | ./namelist.input.template >! namelist.input |
---|
3362 | else if ( $core == em_b_wave ) then |
---|
3363 | sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \ |
---|
3364 | -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 100/g' \ |
---|
3365 | -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 100/g' \ |
---|
3366 | -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \ |
---|
3367 | -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \ |
---|
3368 | -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
3369 | -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \ |
---|
3370 | -e '/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \ |
---|
3371 | -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \ |
---|
3372 | ./namelist.input.template >! namelist.input |
---|
3373 | endif |
---|
3374 | endif |
---|
3375 | |
---|
3376 | # WRF output quilt servers are only tested for MPI configuration. |
---|
3377 | # Currently, only one WRF output quilt server is used. |
---|
3378 | |
---|
3379 | if ( $QUILT == TRUE ) then |
---|
3380 | if ( $compopt == $COMPOPTS[3] ) then |
---|
3381 | # For now, test only one group of one output quilt servers. |
---|
3382 | sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \ |
---|
3383 | -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \ |
---|
3384 | namelist.input >! namelist.input.temp |
---|
3385 | mv -f namelist.input.temp namelist.input |
---|
3386 | echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled." |
---|
3387 | echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output |
---|
3388 | endif |
---|
3389 | endif |
---|
3390 | |
---|
3391 | /bin/cp namelist.input $TMPDIR/namelist.input.$core.${phys_option}.$compopt |
---|
3392 | #DAVE################################################### |
---|
3393 | echo built namelist |
---|
3394 | ls -ls namelist.input |
---|
3395 | banner 26 |
---|
3396 | #set ans = "$<" |
---|
3397 | #DAVE################################################### |
---|
3398 | |
---|
3399 | # If this is the serial code, generate the IC and BC. The ideal.exe program is not |
---|
3400 | # parallelized, so the data is generated and saved for the rest of the parallel tests. |
---|
3401 | |
---|
3402 | if ( $compopt == $COMPOPTS[1] ) then |
---|
3403 | |
---|
3404 | # Zap any old input data laying around. |
---|
3405 | |
---|
3406 | rm wrfinput_d01 >& /dev/null |
---|
3407 | rm wrfbdy_d01 >& /dev/null |
---|
3408 | |
---|
3409 | ../../main/ideal_${core}.exe.1 >! print.out.ideal_${core}_Parallel=${compopt} |
---|
3410 | #DAVE################################################### |
---|
3411 | echo ran ideal |
---|
3412 | ls -ls wrfinput* |
---|
3413 | banner 27 |
---|
3414 | #set ans = "$<" |
---|
3415 | #DAVE################################################### |
---|
3416 | |
---|
3417 | grep "SUCCESS COMPLETE" print.out.ideal_${core}_Parallel=${compopt} >& /dev/null |
---|
3418 | set success = $status |
---|
3419 | |
---|
3420 | # Did making the IC BC files work? |
---|
3421 | |
---|
3422 | if ( ( -e wrfinput_d01 ) && ( $success == 0 ) ) then |
---|
3423 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
3424 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3425 | else |
---|
3426 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
3427 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3428 | $MAIL -s "WRF FAIL making IC/BC $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
3429 | if ( $KEEP_ON_RUNNING == FALSE ) exit ( 7 ) |
---|
3430 | endif |
---|
3431 | endif |
---|
3432 | |
---|
3433 | # Run the forecast for this core and parallel option |
---|
3434 | |
---|
3435 | rm $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt >& /dev/null |
---|
3436 | |
---|
3437 | if ( $compopt == $COMPOPTS[1] ) then |
---|
3438 | setenv OMP_NUM_THREADS 1 |
---|
3439 | if ( $NESTED == TRUE ) then |
---|
3440 | $SERIALRUNCOMMAND ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt} |
---|
3441 | else if ( $NESTED != TRUE ) then |
---|
3442 | ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt} |
---|
3443 | endif |
---|
3444 | else if ( $compopt == $COMPOPTS[2] ) then |
---|
3445 | setenv OMP_NUM_THREADS $OPENMP |
---|
3446 | if ( $NESTED == TRUE ) then |
---|
3447 | $OMPRUNCOMMAND ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt} |
---|
3448 | else if ( $NESTED != TRUE ) then |
---|
3449 | ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt} |
---|
3450 | endif |
---|
3451 | else if ( $compopt == $COMPOPTS[3] ) then |
---|
3452 | setenv OMP_NUM_THREADS 1 |
---|
3453 | $MPIRUNCOMMAND ../../main/wrf_${core}.exe.$compopt $MPIRUNCOMMANDPOST |
---|
3454 | mv rsl.error.0000 print.out.wrf_${core}_Parallel=${compopt} |
---|
3455 | endif |
---|
3456 | #DAVE################################################### |
---|
3457 | echo ran ideal fcst |
---|
3458 | banner 28 |
---|
3459 | #set ans = "$<" |
---|
3460 | #DAVE################################################### |
---|
3461 | |
---|
3462 | grep "SUCCESS COMPLETE" print.out.wrf_${core}_Parallel=${compopt} |
---|
3463 | set success = $status |
---|
3464 | |
---|
3465 | # Did making the forecast work, by that, we mean "is there an output file created?" |
---|
3466 | |
---|
3467 | if ( ( -e wrfout_d01_${filetag} ) && ( $success == 0 ) ) then |
---|
3468 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
3469 | ncdump -h wrfout_d01_${filetag} | grep Time | grep UNLIMITED | grep currently | grep -q 2 |
---|
3470 | set ok = $status |
---|
3471 | set found_nans = 1 |
---|
3472 | if ( `uname` == AIX ) then |
---|
3473 | ncdump wrfout_d01_${filetag} | grep NaN >& /dev/null |
---|
3474 | set found_nans = $status |
---|
3475 | else if ( `uname` == OSF1 ) then |
---|
3476 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
3477 | # set found_nans = $status |
---|
3478 | else if ( `uname` == Linux ) then |
---|
3479 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
3480 | set found_nans = $status |
---|
3481 | endif |
---|
3482 | if ( $found_nans == 0 ) then |
---|
3483 | echo found nans |
---|
3484 | set ok = 1 |
---|
3485 | endif |
---|
3486 | |
---|
3487 | else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1 ) then |
---|
3488 | # set joe_times = `../../external/io_grib1/wgrib.exe -s -4yr wrfout_d01_${filetag} | grep -v ":anl:" | wc -l` |
---|
3489 | # if ( $joe_times >= 100 ) then |
---|
3490 | set joe_times = `../../external/io_grib1/wgrib.exe -s -4yr wrfout_d01_${filetag} | grep "UGRD:10 m" | wc -l` |
---|
3491 | if ( $joe_times == 2 ) then |
---|
3492 | set ok = 0 |
---|
3493 | else |
---|
3494 | set ok = 1 |
---|
3495 | endif |
---|
3496 | endif |
---|
3497 | if ( $ok == 0 ) then |
---|
3498 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
3499 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3500 | else |
---|
3501 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
3502 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3503 | $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
3504 | if ( $KEEP_ON_RUNNING == FALSE ) exit ( 8 ) |
---|
3505 | endif |
---|
3506 | else |
---|
3507 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
3508 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3509 | $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
3510 | if ( $KEEP_ON_RUNNING == FALSE ) exit ( 9 ) |
---|
3511 | endif |
---|
3512 | |
---|
3513 | # We have to save this output file for our biggy comparison after all of the |
---|
3514 | # parallel options have been considered. |
---|
3515 | |
---|
3516 | mv wrfout_d01_${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt |
---|
3517 | |
---|
3518 | # To save space, we move the executables after we are finished with them. |
---|
3519 | |
---|
3520 | if ( $phys_option == $Max_Ideal_Physics_Options ) then |
---|
3521 | mv ../../main/wrf_${core}.exe.$compopt $TMPDIR/wrf_${core}.exe.$compopt |
---|
3522 | endif |
---|
3523 | #DAVE################################################### |
---|
3524 | echo fcst was a success |
---|
3525 | ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt |
---|
3526 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
3527 | ncdump -v Times $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt | tail -20 |
---|
3528 | endif |
---|
3529 | banner 29 |
---|
3530 | #set ans = "$<" |
---|
3531 | #DAVE################################################### |
---|
3532 | |
---|
3533 | popd |
---|
3534 | |
---|
3535 | BYPASS_COMP_LOOP_IDEAL: |
---|
3536 | |
---|
3537 | end |
---|
3538 | |
---|
3539 | endif |
---|
3540 | |
---|
3541 | # OK, once more, we gotta check if this is a BIT4BIT run. If so then there |
---|
3542 | # are a number of comparisons to do. If this is a an OPTIMIZED run, then the |
---|
3543 | # comparisons will fail the bit-wise comparisons. |
---|
3544 | |
---|
3545 | if ( $REG_TYPE == BIT4BIT) then |
---|
3546 | |
---|
3547 | if ( $core == nmm_real ) then |
---|
3548 | |
---|
3549 | pushd ${DEF_DIR}/regression_test/WRFV3/test/$core |
---|
3550 | set DIFFWRF = ${DEF_DIR}/regression_test/WRFV3/external/$IO_FORM_NAME[$IO_FORM]/diffwrf |
---|
3551 | |
---|
3552 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_1p ) && \ |
---|
3553 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p ) ) then |
---|
3554 | set foo1 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_1p `) |
---|
3555 | set foo2 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p `) |
---|
3556 | set size1 = $foo1[6] |
---|
3557 | set size2 = $foo2[6] |
---|
3558 | if ( $size1 == $size2 ) then |
---|
3559 | set RIGHT_SIZE = TRUE |
---|
3560 | else |
---|
3561 | set RIGHT_SIZE = FALSE |
---|
3562 | endif |
---|
3563 | else |
---|
3564 | set RIGHT_SIZE = FALSE |
---|
3565 | endif |
---|
3566 | |
---|
3567 | # 1p vs Num_Procs MPI |
---|
3568 | |
---|
3569 | rm fort.88 fort.98 >& /dev/null |
---|
3570 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_1p ) && \ |
---|
3571 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p ) && \ |
---|
3572 | ( $RIGHT_SIZE == TRUE ) ) then |
---|
3573 | $DIFFWRF $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_1p \ |
---|
3574 | $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p >& /dev/null |
---|
3575 | else |
---|
3576 | touch fort.88 fort.98 |
---|
3577 | endif |
---|
3578 | if ( ! -e fort.88 ) then |
---|
3579 | echo "SUMMARY 1 vs $Num_Procs MPI for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
3580 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3581 | else |
---|
3582 | echo "SUMMARY 1 vs $Num_Procs MPI for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
3583 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3584 | endif |
---|
3585 | |
---|
3586 | popd |
---|
3587 | |
---|
3588 | else if ( ${#COMPOPTS} != 1 ) then |
---|
3589 | |
---|
3590 | # If there is only a single parallel option, then we are just trying to |
---|
3591 | # build the serial code. That implies no comparisons are needed. |
---|
3592 | |
---|
3593 | # All of the forecasts for this set of physics and core have been |
---|
3594 | # generated. We now compare the WRF model output files to see |
---|
3595 | # if they are S^2D^2. |
---|
3596 | |
---|
3597 | pushd ${DEF_DIR}/regression_test/WRFV3/test/$core |
---|
3598 | set DIFFWRF = ${DEF_DIR}/regression_test/WRFV3/external/$IO_FORM_NAME[$IO_FORM]/diffwrf |
---|
3599 | |
---|
3600 | # Are we skipping the OpenMP runs? |
---|
3601 | |
---|
3602 | if ( $ZAP_OPENMP == TRUE ) then |
---|
3603 | goto BYPASS_OPENMP_SUMMARY1 |
---|
3604 | endif |
---|
3605 | |
---|
3606 | # Are the files the same size? If not, then only the initial times |
---|
3607 | # will be compared. That means, on a failure to run a forecast, the |
---|
3608 | # diffwrf will give a pass. We need to root out this evil. |
---|
3609 | |
---|
3610 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] ) && \ |
---|
3611 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[2] ) ) then |
---|
3612 | set foo1 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] `) |
---|
3613 | set foo2 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[2] `) |
---|
3614 | set size1 = $foo1[6] |
---|
3615 | set size2 = $foo2[6] |
---|
3616 | if ( $size1 == $size2 ) then |
---|
3617 | set RIGHT_SIZE_OMP = TRUE |
---|
3618 | else |
---|
3619 | set RIGHT_SIZE_OMP = FALSE |
---|
3620 | endif |
---|
3621 | else |
---|
3622 | set RIGHT_SIZE_OMP = FALSE |
---|
3623 | endif |
---|
3624 | |
---|
3625 | BYPASS_OPENMP_SUMMARY1: |
---|
3626 | |
---|
3627 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] ) && \ |
---|
3628 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] ) ) then |
---|
3629 | set foo1 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] `) |
---|
3630 | set foo3 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] `) |
---|
3631 | set size1 = $foo1[6] |
---|
3632 | set size3 = $foo3[6] |
---|
3633 | if ( $size1 == $size3 ) then |
---|
3634 | set RIGHT_SIZE_MPI = TRUE |
---|
3635 | else |
---|
3636 | set RIGHT_SIZE_MPI = FALSE |
---|
3637 | endif |
---|
3638 | else |
---|
3639 | set RIGHT_SIZE_MPI = FALSE |
---|
3640 | endif |
---|
3641 | |
---|
3642 | ! We just check to see if the files have two times worth of data in them. |
---|
3643 | ! We might be able to get rid of this test later. Dec 2009. |
---|
3644 | |
---|
3645 | set times1 = ( ` ncdump -h $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] | grep Time | grep UNLIMITED | grep currently | cut -d"(" -f 2 | cut -d" " -f1 `) |
---|
3646 | set times3 = ( ` ncdump -h $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] | grep Time | grep UNLIMITED | grep currently | cut -d"(" -f 2 | cut -d" " -f1 `) |
---|
3647 | if ( ( $RIGHT_SIZE_MPI != TRUE ) && ( $times1 == 2 ) && ( $times3 == 2 ) ) then |
---|
3648 | echo "--- RIGHT_SIZE_MPI false ---" >>! ${DEF_DIR}/wrftest.output |
---|
3649 | set RIGHT_SIZE_MPI = TRUE |
---|
3650 | endif |
---|
3651 | |
---|
3652 | # Are we skipping the OpenMP runs? |
---|
3653 | |
---|
3654 | if ( $ZAP_OPENMP == TRUE ) then |
---|
3655 | goto BYPASS_OPENMP_SUMMARY2 |
---|
3656 | endif |
---|
3657 | |
---|
3658 | # Serial vs OpenMP |
---|
3659 | |
---|
3660 | rm fort.88 fort.98 >& /dev/null |
---|
3661 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] ) && \ |
---|
3662 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[2] ) && \ |
---|
3663 | ( $RIGHT_SIZE_OMP == TRUE ) ) then |
---|
3664 | $DIFFWRF $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] \ |
---|
3665 | $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[2] >& /dev/null |
---|
3666 | else |
---|
3667 | touch fort.88 fort.98 |
---|
3668 | endif |
---|
3669 | if ( ! -e fort.88 ) then |
---|
3670 | echo "SUMMARY serial vs OMP for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
3671 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3672 | else |
---|
3673 | echo "SUMMARY serial vs OMP for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
3674 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3675 | endif |
---|
3676 | |
---|
3677 | BYPASS_OPENMP_SUMMARY2: |
---|
3678 | |
---|
3679 | # Serial vs MPI |
---|
3680 | |
---|
3681 | rm fort.88 fort.98 >& /dev/null |
---|
3682 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] ) && \ |
---|
3683 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] ) && \ |
---|
3684 | ( $RIGHT_SIZE_MPI == TRUE ) ) then |
---|
3685 | $DIFFWRF $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] \ |
---|
3686 | $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] >& /dev/null |
---|
3687 | else |
---|
3688 | touch fort.88 fort.98 |
---|
3689 | endif |
---|
3690 | if ( ! -e fort.88 ) then |
---|
3691 | echo "SUMMARY serial vs MPI for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
3692 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3693 | else |
---|
3694 | echo "SUMMARY serial vs MPI for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
3695 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3696 | endif |
---|
3697 | |
---|
3698 | popd |
---|
3699 | |
---|
3700 | endif |
---|
3701 | |
---|
3702 | # Generate and archive baseline or compare against baseline |
---|
3703 | |
---|
3704 | if ( $core != nmm_real ) then |
---|
3705 | if ( $GENERATE_BASELINE != FALSE ) then |
---|
3706 | if ( ! -d $GENERATE_BASELINE ) then |
---|
3707 | echo "ERROR: Baseline directory ${GENERATE_BASELINE} does not exist" >>! \ |
---|
3708 | ${DEF_DIR}/wrftest.output |
---|
3709 | exit ( 10 ) |
---|
3710 | else |
---|
3711 | # Archive serial output file to baseline |
---|
3712 | pushd ${DEF_DIR}/regression_test/WRFV3/test/$core |
---|
3713 | set basefilenm = wrfout_d01_${filetag}.${core}.${phys_option} |
---|
3714 | set basefile = ${GENERATE_BASELINE}/${basefilenm} |
---|
3715 | set outfile = $TMPDIR/${basefilenm}.$COMPOPTS[1] |
---|
3716 | if ( -e $outfile ) then |
---|
3717 | cp $outfile $basefile || \ |
---|
3718 | ( echo "ERROR: cannot copy ${outfile} to ${basefile}" >>! \ |
---|
3719 | ${DEF_DIR}/wrftest.output; exit 10 ) |
---|
3720 | else |
---|
3721 | echo "ERROR: Cannot archive baseline, file $outfile does not exist" >>! \ |
---|
3722 | ${DEF_DIR}/wrftest.output |
---|
3723 | echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option FAIL" >>! \ |
---|
3724 | ${DEF_DIR}/wrftest.output |
---|
3725 | echo "-------------------------------------------------------------" >> \ |
---|
3726 | ${DEF_DIR}/wrftest.output |
---|
3727 | exit ( 10 ) |
---|
3728 | endif |
---|
3729 | echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option PASS" >>! \ |
---|
3730 | ${DEF_DIR}/wrftest.output |
---|
3731 | echo "-------------------------------------------------------------" >> \ |
---|
3732 | ${DEF_DIR}/wrftest.output |
---|
3733 | popd |
---|
3734 | endif |
---|
3735 | endif |
---|
3736 | if ( $COMPARE_BASELINE != FALSE ) then |
---|
3737 | if ( ! -d $COMPARE_BASELINE ) then |
---|
3738 | echo "${0}: ERROR:: Baseline directory ${COMPARE_BASELINE} does not exist" >>! \ |
---|
3739 | ${DEF_DIR}/wrftest.output |
---|
3740 | exit ( 10 ) |
---|
3741 | else |
---|
3742 | # Compare against baseline output file |
---|
3743 | set basefilenm = wrfout_d01_${filetag}.${core}.${phys_option} |
---|
3744 | set basefile = ${COMPARE_BASELINE}/${basefilenm} |
---|
3745 | set DIFFWRF = ${DEF_DIR}/regression_test/WRFV3/external/$IO_FORM_NAME[$IO_FORM]/diffwrf |
---|
3746 | set testdir = ${DEF_DIR}/regression_test/WRFV3/test/$core |
---|
3747 | pushd ${testdir} |
---|
3748 | foreach compopt ( $COMPOPTS ) |
---|
3749 | set cmpfile = $TMPDIR/${basefilenm}.$compopt |
---|
3750 | rm fort.88 fort.98 >& /dev/null |
---|
3751 | if ( ( -e ${basefile} ) && ( -e ${cmpfile} ) ) then |
---|
3752 | # Are the files the same size? If not, then only the initial times |
---|
3753 | # will be compared. That means, on a failure to run a forecast, the |
---|
3754 | # diffwrf will give a pass. We need to root out this evil. |
---|
3755 | set foob = ( ` \ls -ls ${basefile} `) |
---|
3756 | set fooc = ( ` \ls -ls ${cmpfile} `) |
---|
3757 | set sizeb = $foob[6] |
---|
3758 | set sizec = $fooc[6] |
---|
3759 | if ( $sizeb == $sizec ) then |
---|
3760 | $DIFFWRF ${basefile} ${cmpfile} >& /dev/null |
---|
3761 | if ( -e fort.88 ) then |
---|
3762 | echo "FAIL: Baseline comparison, file ${cmpfile} did not match ${basefile} according to diffwrf" >>! \ |
---|
3763 | ${DEF_DIR}/wrftest.output |
---|
3764 | endif |
---|
3765 | else |
---|
3766 | touch fort.88 fort.98 |
---|
3767 | echo "FAIL: Baseline comparison, files ${cmpfile} and ${basefile} have different sizes" >>! \ |
---|
3768 | ${DEF_DIR}/wrftest.output |
---|
3769 | endif |
---|
3770 | else |
---|
3771 | echo "FAIL: Baseline comparison, either ${cmpfile} or ${basefile} does not exist" >>! \ |
---|
3772 | ${DEF_DIR}/wrftest.output |
---|
3773 | touch fort.88 fort.98 |
---|
3774 | endif |
---|
3775 | if ( ! -e fort.88 ) then |
---|
3776 | echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str PASS" >>! \ |
---|
3777 | ${DEF_DIR}/wrftest.output |
---|
3778 | echo "-------------------------------------------------------------" >> \ |
---|
3779 | ${DEF_DIR}/wrftest.output |
---|
3780 | else |
---|
3781 | echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str FAIL" >>! \ |
---|
3782 | ${DEF_DIR}/wrftest.output |
---|
3783 | echo "-------------------------------------------------------------" >> \ |
---|
3784 | ${DEF_DIR}/wrftest.output |
---|
3785 | endif |
---|
3786 | end |
---|
3787 | popd |
---|
3788 | endif |
---|
3789 | endif |
---|
3790 | else if ( $core == nmm_real ) then |
---|
3791 | if ( $GENERATE_BASELINE != FALSE ) then |
---|
3792 | if ( ! -d $GENERATE_BASELINE ) then |
---|
3793 | echo "ERROR: Baseline directory ${GENERATE_BASELINE} does not exist" >>! \ |
---|
3794 | ${DEF_DIR}/wrftest.output |
---|
3795 | exit ( 10 ) |
---|
3796 | else |
---|
3797 | # Archive serial output file to baseline |
---|
3798 | pushd ${DEF_DIR}/regression_test/WRFV3/test/$core |
---|
3799 | set basefilenm = wrfout_d01_${filetag}.${core}.${phys_option} |
---|
3800 | set basefile = ${GENERATE_BASELINE}/${basefilenm} |
---|
3801 | set outfile = $TMPDIR/${basefilenm}.$COMPOPTS[3]_1p |
---|
3802 | if ( -e $outfile ) then |
---|
3803 | cp $outfile $basefile || \ |
---|
3804 | ( echo "ERROR: cannot copy ${outfile} to ${basefile}" >>! \ |
---|
3805 | ${DEF_DIR}/wrftest.output; exit 10 ) |
---|
3806 | else |
---|
3807 | echo "ERROR: Cannot archive baseline, file $outfile does not exist" >>! \ |
---|
3808 | ${DEF_DIR}/wrftest.output |
---|
3809 | echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option FAIL" >>! \ |
---|
3810 | ${DEF_DIR}/wrftest.output |
---|
3811 | echo "-------------------------------------------------------------" >> \ |
---|
3812 | ${DEF_DIR}/wrftest.output |
---|
3813 | exit ( 10 ) |
---|
3814 | endif |
---|
3815 | echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option PASS" >>! \ |
---|
3816 | ${DEF_DIR}/wrftest.output |
---|
3817 | echo "-------------------------------------------------------------" >> \ |
---|
3818 | ${DEF_DIR}/wrftest.output |
---|
3819 | popd |
---|
3820 | endif |
---|
3821 | endif |
---|
3822 | if ( $COMPARE_BASELINE != FALSE ) then |
---|
3823 | if ( ! -d $COMPARE_BASELINE ) then |
---|
3824 | echo "${0}: ERROR:: Baseline directory ${COMPARE_BASELINE} does not exist" >>! \ |
---|
3825 | ${DEF_DIR}/wrftest.output |
---|
3826 | exit ( 10 ) |
---|
3827 | else |
---|
3828 | # Compare against baseline output file |
---|
3829 | set basefilenm = wrfout_d01_${filetag}.${core}.${phys_option} |
---|
3830 | set basefile = ${COMPARE_BASELINE}/${basefilenm} |
---|
3831 | set DIFFWRF = ${DEF_DIR}/regression_test/WRFV3/external/$IO_FORM_NAME[$IO_FORM]/diffwrf |
---|
3832 | set testdir = ${DEF_DIR}/regression_test/WRFV3/test/$core |
---|
3833 | pushd ${testdir} |
---|
3834 | set compopt = $COMPOPTS[3] |
---|
3835 | foreach proc ( 1p 4p ) |
---|
3836 | set cmpfile = $TMPDIR/${basefilenm}.${compopt}_${proc} |
---|
3837 | rm fort.88 fort.98 >& /dev/null |
---|
3838 | if ( ( -e ${basefile} ) && ( -e ${cmpfile} ) ) then |
---|
3839 | # Are the files the same size? If not, then only the initial times |
---|
3840 | # will be compared. That means, on a failure to run a forecast, the |
---|
3841 | # diffwrf will give a pass. We need to root out this evil. |
---|
3842 | set foob = ( ` \ls -ls ${basefile} `) |
---|
3843 | set fooc = ( ` \ls -ls ${cmpfile} `) |
---|
3844 | set sizeb = $foob[6] |
---|
3845 | set sizec = $fooc[6] |
---|
3846 | if ( $sizeb == $sizec ) then |
---|
3847 | $DIFFWRF ${basefile} ${cmpfile} >& /dev/null |
---|
3848 | if ( -e fort.88 ) then |
---|
3849 | echo "FAIL: Baseline comparison, file ${cmpfile} did not match ${basefile} according to diffwrf" >>! \ |
---|
3850 | ${DEF_DIR}/wrftest.output |
---|
3851 | endif |
---|
3852 | else |
---|
3853 | touch fort.88 fort.98 |
---|
3854 | echo "FAIL: Baseline comparison, files ${cmpfile} and ${basefile} have different sizes" >>! \ |
---|
3855 | ${DEF_DIR}/wrftest.output |
---|
3856 | endif |
---|
3857 | else |
---|
3858 | echo "FAIL: Baseline comparison, either ${cmpfile} or ${basefile} does not exist" >>! \ |
---|
3859 | ${DEF_DIR}/wrftest.output |
---|
3860 | touch fort.88 fort.98 |
---|
3861 | endif |
---|
3862 | if ( ! -e fort.88 ) then |
---|
3863 | echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str PASS" >>! \ |
---|
3864 | ${DEF_DIR}/wrftest.output |
---|
3865 | echo "-------------------------------------------------------------" >> \ |
---|
3866 | ${DEF_DIR}/wrftest.output |
---|
3867 | else |
---|
3868 | echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str FAIL" >>! \ |
---|
3869 | ${DEF_DIR}/wrftest.output |
---|
3870 | echo "-------------------------------------------------------------" >> \ |
---|
3871 | ${DEF_DIR}/wrftest.output |
---|
3872 | endif |
---|
3873 | end |
---|
3874 | popd |
---|
3875 | endif |
---|
3876 | endif |
---|
3877 | goto ALL_SHE_WROTE_FOR_NMM |
---|
3878 | endif |
---|
3879 | # End of generate and archive baseline or compare against baseline |
---|
3880 | |
---|
3881 | endif |
---|
3882 | |
---|
3883 | BOTTOM_OF_PHYSICS_LOOP: |
---|
3884 | |
---|
3885 | end |
---|
3886 | |
---|
3887 | ALL_SHE_WROTE_FOR_NMM: |
---|
3888 | |
---|
3889 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3890 | |
---|
3891 | if ( $clrm ) then |
---|
3892 | popd |
---|
3893 | endif |
---|
3894 | |
---|
3895 | end |
---|
3896 | |
---|
3897 | |
---|
3898 | # How long did this take. |
---|
3899 | |
---|
3900 | set end = ( `date` ) |
---|
3901 | echo "Start WRF Regression: $start " >> ${DEF_DIR}/wrftest.output |
---|
3902 | echo "End WRF Regression: $end " >> ${DEF_DIR}/wrftest.output |
---|
3903 | |
---|
3904 | # We have done all of the tests, and placed the PASS FAIL labels in the |
---|
3905 | # output file. If there are any FAIL messages, we are in trouble. |
---|
3906 | |
---|
3907 | grep FAIL ${DEF_DIR}/wrftest.output |
---|
3908 | set ok = $status |
---|
3909 | |
---|
3910 | # Send email of the status. |
---|
3911 | |
---|
3912 | if ( $ok == 0 ) then |
---|
3913 | $MAIL -s "REGRESSION FAILURE $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
3914 | else |
---|
3915 | $MAIL -s "REGRESSION SUCCESS $ARCH[1] ${WHERE_AM_I} " $GOOD_MAIL < ${DEF_DIR}/wrftest.output |
---|
3916 | endif |
---|
3917 | |
---|
3918 | # Clean left up detritus |
---|
3919 | |
---|
3920 | cd $CUR_DIR |
---|
3921 | |
---|
3922 | rm -rf damp_*eal >& /dev/null |
---|
3923 | rm -rf dom_*eal >& /dev/null |
---|
3924 | rm -rf phys_real_* >& /dev/null |
---|
3925 | rm -rf nest_real_* >& /dev/null |
---|
3926 | rm -rf phys_quarter_* >& /dev/null |
---|
3927 | rm -rf phys_b_wave_* >& /dev/null |
---|
3928 | rm -rf version_info >& /dev/null |
---|
3929 | rm -rf machfile >& /dev/null |
---|
3930 | rm -rf fdda_real* >& /dev/null |
---|
3931 | rm -rf time_real_* >& /dev/null |
---|
3932 | rm -rf dyn_real_* >& /dev/null |
---|
3933 | rm -rf damp_* >& /dev/null |
---|
3934 | rm -rf io_format >& /dev/null |
---|