1 | #!/bin/csh |
---|
2 | # @ job_type = parallel |
---|
3 | # @ environment = COPY_ALL;MP_EUILIB=us |
---|
4 | # @ job_name = regtest.$(jobid) |
---|
5 | # @ output = regtest_out |
---|
6 | # @ error = regtest_err |
---|
7 | # @ network.MPI = csss,shared,us |
---|
8 | # @ node_usage = shared |
---|
9 | # @ checkpoint = no |
---|
10 | # @ wall_clock_limit = 21600 |
---|
11 | # @ node = 1 |
---|
12 | # @ total_tasks = 4 |
---|
13 | ################### NCAR ######################## |
---|
14 | # @ ja_report = yes |
---|
15 | # @ class = share |
---|
16 | ################### NCAR ######################## |
---|
17 | ################### NCEP ######################## |
---|
18 | ## @ class = dev |
---|
19 | ## @ group = devqpri |
---|
20 | ## @ preferences = Feature == "dev" |
---|
21 | ################### NCEP ######################## |
---|
22 | # @ queue |
---|
23 | |
---|
24 | # #BSUB -x # exlusive use of node (not_shared) |
---|
25 | # #BSUB -a mpich_gm # at NCAR: lightning |
---|
26 | # #BSUB -R "span[ptile=2]" # how many tasks per node (1 or 2) |
---|
27 | #BSUB -a poe # at NCAR: bluevista |
---|
28 | #BSUB -R "span[ptile=4]" # how many tasks per node (up to 8) |
---|
29 | #BSUB -n 4 # number of total tasks |
---|
30 | #BSUB -o reg.out # output filename (%J to add job id) |
---|
31 | #BSUB -e reg.err # error filename |
---|
32 | #BSUB -J reg.test # job name |
---|
33 | #BSUB -q premium # queue |
---|
34 | #BSUB -W 6:00 # wallclock time |
---|
35 | #BSUB -P 64000400 |
---|
36 | |
---|
37 | # QSUB -q ded_4 # submit to 4 proc |
---|
38 | # QSUB -l mpp_p=4 # request 4 processors |
---|
39 | # QSUB -lT 21600 # max. job time limit is 6 h |
---|
40 | # QSUB -lF 250Mw # max. job file size limit is 250 Megawords |
---|
41 | # QSUB -eo # merge error and output into one file |
---|
42 | # QSUB -o reg.out # output file name |
---|
43 | # QSUB # there are no further QSUB commands |
---|
44 | |
---|
45 | # This is a script to test the bit-for-bit reproducibility of |
---|
46 | # the WRF model, when comparing single processor serial runs to |
---|
47 | # OpenMP and MPI parallel runs. There are several regression tests |
---|
48 | # that are performed. Failed comparisons get reported, but don't |
---|
49 | # stop the script. Failed builds or forecasts force an exit from |
---|
50 | # the script. |
---|
51 | |
---|
52 | # Approximate time for completion of full test suite |
---|
53 | # Compaq 733 MHz ev67 : 2.5 hours (empty) |
---|
54 | # Intel 1.2 GHz (4-pe) : 3.0 hours (empty) |
---|
55 | # IBM P4 : 2.0 hours (empty) |
---|
56 | |
---|
57 | # These need to be changed for your particular set of runs. This is |
---|
58 | # where email gets sent. |
---|
59 | |
---|
60 | if ( ( `uname` == AIX ) && ( ( `hostname | cut -c 1-2` != bs ) && ( `hostname | cut -c 1-2` != bv ) ) ) then |
---|
61 | set FAIL_MAIL = ( ${user}@noaa.gov ) |
---|
62 | set GOOD_MAIL = ( ${user}@noaa.gov ) |
---|
63 | |
---|
64 | setenv MP_EAGER_LIMIT 65536 |
---|
65 | setenv MP_SHARED_MEMORY yes |
---|
66 | setenv MP_SINGLE_THREAD yes |
---|
67 | setenv MP_LABELIO yes |
---|
68 | setenv MP_STDOUTMODE ordered |
---|
69 | |
---|
70 | setenv OMP_NUM_THREADS 4 |
---|
71 | setenv XLSMPOPTS "parthds=4:spins=0:yields=0:stack=128000000:schedule=static" |
---|
72 | setenv AIXTHREAD_SCOPE S |
---|
73 | setenv AIXTHREAD_MNRATIO 1:1 |
---|
74 | setenv SPINLOOPTIME 1000 |
---|
75 | setenv YIELDLOOPTIME 1000 |
---|
76 | else |
---|
77 | set FAIL_MAIL = ( ${user}@ucar.edu ) |
---|
78 | set GOOD_MAIL = ( ${user}@ucar.edu ) |
---|
79 | endif |
---|
80 | |
---|
81 | unalias cd cp rm ls pushd popd mv |
---|
82 | if ( `uname` == Linux ) alias banner echo |
---|
83 | |
---|
84 | # Get the command line input |
---|
85 | |
---|
86 | set thedate = -999 |
---|
87 | set thefile = "null" |
---|
88 | set thedata = "null" |
---|
89 | set clrm = 0 # compile local run mmmtmp, for using clsroom cluster and local disk |
---|
90 | |
---|
91 | # If this is a batch job (NCAR's IBMs or FSL's Intel and Alpha), we need to muck with the "input" |
---|
92 | # parameters a bit. |
---|
93 | |
---|
94 | if ( ( `uname` == AIX ) || ( `hostname` == tempest ) || ( `hostname | cut -c 1-2` == ln ) ) then |
---|
95 | set argv = ( -here ) |
---|
96 | set argv = ( -ftp ) |
---|
97 | set argv = ( -D today ) |
---|
98 | set argv = ( -env ) |
---|
99 | set WRFREGFILE = /mmm/users/gill/wrf.tar |
---|
100 | if ( ( `uname` == AIX ) && ( ( `hostname | cut -c 1-2` != bs ) && ( `hostname | cut -c 1-2` != bv ) ) ) then |
---|
101 | set argv = ( -f /nbns/meso/wx22tb/regression_tests/wrf.tar ) |
---|
102 | else |
---|
103 | set argv = ( -f wrf.tar ) |
---|
104 | endif |
---|
105 | else if ( ( `uname` == OSF1 ) && ( `hostname` == maple ) && ( $user == michalak ) ) then |
---|
106 | set clrm=1 |
---|
107 | endif |
---|
108 | |
---|
109 | # Where is the input data located - for a few known NCAR/MMM machines. |
---|
110 | |
---|
111 | if ( ( `hostname` == master ) || (`hostname | cut -c 1-4` == node ) ) then |
---|
112 | set WRFREGDATAEM = /big/users/gill/WRF-data-EM |
---|
113 | set WRFREGDATANMM = /big/users/gill/WRF-data-NMM |
---|
114 | else if ( `hostname` == jacaranda ) then |
---|
115 | set WRFREGDATAEM = /jacaranda/users/gill/WRF-data-EM |
---|
116 | set WRFREGDATANMM = /jacaranda/users/gill/WRF-data-NMM |
---|
117 | else if ( `hostname` == duku ) then |
---|
118 | set WRFREGDATAEM = /duku/users/gill/WRF-data-EM |
---|
119 | set WRFREGDATANMM = /duku/users/gill/WRF-data-NMM |
---|
120 | else if ( `hostname` == cape ) then |
---|
121 | set WRFREGDATAEM = /cape/users/michalak/WRF-data-EM |
---|
122 | set WRFREGDATANMM = /cape/users/michalak/WRF-data-NMM |
---|
123 | else if ( (`hostname | cut -c 1-6` == joshua ) || \ |
---|
124 | ( `hostname` == maple ) || (`hostname | cut -c 1-7` == service ) ) then |
---|
125 | set WRFREGDATAEM = /users/gill/WRF-data-EM |
---|
126 | set WRFREGDATANMM = /users/gill/WRF-data-NMM |
---|
127 | else if ( ( `hostname | cut -c 1-2` == bs ) || ( `hostname` == tempest ) || ( `hostname | cut -c 1-2` == ln ) || \ |
---|
128 | ( `hostname | cut -c 1-2` == bv ) ) then |
---|
129 | set WRFREGDATAEM = /mmm/users/gill/WRF-data-EM |
---|
130 | set WRFREGDATANMM = /mmm/users/gill/WRF-data-NMM |
---|
131 | else if ( ( `uname` == AIX ) && ( ( `hostname | cut -c 1-2` != bs ) && ( `hostname | cut -c 1-2` != bv ) ) ) then |
---|
132 | set WRFREGDATAEM = /nbns/meso/wx22tb/regression_tests/WRF-data-EM |
---|
133 | set WRFREGDATANMM = /nbns/meso/wx22tb/regression_tests/WRF-data-NMM |
---|
134 | else |
---|
135 | if ( ( -d /users/gill/WRF-data-EM ) && ( -d /users/gill/WRF-data-NMM ) ) then |
---|
136 | set WRFREGDATAEM = /users/gill/WRF-data-EM |
---|
137 | set WRFREGDATANMM = /users/gill/WRF-data-NMM |
---|
138 | else if ( ( -d /mmm/users/gill/WRF-data-EM ) && ( -d /mmm/users/gill/WRF-data-NMM ) ) then |
---|
139 | set WRFREGDATAEM = /mmm/users/gill/WRF-data-EM |
---|
140 | set WRFREGDATANMM = /mmm/users/gill/WRF-data-NMM |
---|
141 | else |
---|
142 | echo "stick the WRF em and nmm data somewhere, and then fill in the shell vars" |
---|
143 | echo "inside this script, you NEED WRFREGDATAEM and WRFREGDATANMM set" |
---|
144 | exit ( 1 ) |
---|
145 | endif |
---|
146 | endif |
---|
147 | #DAVE################################################### |
---|
148 | echo DAVE em data is located at $WRFREGDATAEM |
---|
149 | ls -ls $WRFREGDATAEM |
---|
150 | echo DAVE nmm data is located at $WRFREGDATANMM |
---|
151 | ls -ls $WRFREGDATANMM |
---|
152 | banner 1 |
---|
153 | #set ans = "$<" |
---|
154 | #DAVE################################################### |
---|
155 | |
---|
156 | if ( $#argv == 0 ) then |
---|
157 | echo "Please enter either a date for cvs checkout. ex regtest.csh -D date" |
---|
158 | echo " or a file name containing WRF. ex regtest.csh -f tarfile" |
---|
159 | echo " or the -ftp flag for the script to pick code off anon ftp" |
---|
160 | exit ( 2 ) |
---|
161 | endif |
---|
162 | |
---|
163 | set theargs = 0 |
---|
164 | foreach a ( $argv ) |
---|
165 | if ( "$a" == "-D" ) then |
---|
166 | |
---|
167 | rsh -n maple.mmm.ucar.edu w >& /dev/null |
---|
168 | if ( $status ) then |
---|
169 | echo "Cannot execute a remote shell on maple.mmm.ucar.edu, where the" |
---|
170 | echo "WRF code resides." |
---|
171 | echo "Please check that it is up and that you have permission to rsh" |
---|
172 | echo "to this host. (Create a .rhosts file)." |
---|
173 | ping -c 1 maple.mmm.ucar.edu |
---|
174 | exit 2 |
---|
175 | endif |
---|
176 | setenv CVSROOT maple.mmm.ucar.edu:/data3/mp/wrfhelp/WRF |
---|
177 | |
---|
178 | set acquire_from = "cvs" |
---|
179 | set thedate = $argv[2] |
---|
180 | |
---|
181 | endif |
---|
182 | |
---|
183 | if ( "$a" == "-f" ) then |
---|
184 | |
---|
185 | set thefile = $argv[2] |
---|
186 | # Check for absolute path, if not, make it absolute |
---|
187 | echo $thefile | grep '^/' > /dev/null |
---|
188 | if ( $status != 0 ) set thefile = `pwd`/$thefile |
---|
189 | set acquire_from = "filearg" |
---|
190 | |
---|
191 | endif |
---|
192 | |
---|
193 | if ( "$a" == "-ftp" ) then |
---|
194 | set acquire_from = "ftp" |
---|
195 | echo "anon ftp temporarily disabled" |
---|
196 | exit ( 3 ) |
---|
197 | endif |
---|
198 | |
---|
199 | if ( "$a" == "-here" ) then |
---|
200 | set acquire_from = "here" |
---|
201 | endif |
---|
202 | |
---|
203 | if ( "$a" == "-env" ) then |
---|
204 | set acquire_from = "environment" |
---|
205 | set thefile = $WRFREGFILE |
---|
206 | endif |
---|
207 | end |
---|
208 | |
---|
209 | # Start recording everything - for debug purposes. |
---|
210 | |
---|
211 | set echo |
---|
212 | set date |
---|
213 | |
---|
214 | # And to tell us how long we've spent on this whole regression test, |
---|
215 | # we should remember when we started. |
---|
216 | |
---|
217 | set start = ( `date` ) |
---|
218 | |
---|
219 | ##################################################################### |
---|
220 | |
---|
221 | # Initial set up values |
---|
222 | |
---|
223 | # Is this a single domain regression test or is this nested. Well, a nested one |
---|
224 | # is a bit special. It can only run on machines that have the WRF RSL-but-no-MPI |
---|
225 | # option available. |
---|
226 | |
---|
227 | set NESTED = TRUE |
---|
228 | set NESTED = FALSE |
---|
229 | |
---|
230 | if ( ( $NESTED == TRUE ) && ( ( `uname` == OSF1 ) || ( `uname` == Linux ) || ( `uname` == AIX ) ) ) then |
---|
231 | echo DOING a NESTED TEST |
---|
232 | else if ( $NESTED == TRUE ) then |
---|
233 | echo NESTED option is only valid on DEC, Linux, or AIX machines |
---|
234 | exit ( 1 ) |
---|
235 | endif |
---|
236 | |
---|
237 | # We can choose to do grid and obs nudging tests. |
---|
238 | |
---|
239 | set FDDA = TRUE |
---|
240 | set FDDA = FALSE |
---|
241 | |
---|
242 | # The default floating point precision is either 4 bytes or 8 bytes. |
---|
243 | # We assume that it is 4 (or the default for the architecture) unless |
---|
244 | # REAL8 is set to TRUE. |
---|
245 | |
---|
246 | set REAL8 = TRUE |
---|
247 | set REAL8 = FALSE |
---|
248 | |
---|
249 | # Are we shooting for a bit-for-bit run (serial vs OpenMP, serial vs MPI), or not? |
---|
250 | # If you want to do a performance-only run, the forecasts are still short, but you |
---|
251 | # get to insure that the optimized code builds and runs. |
---|
252 | |
---|
253 | set REG_TYPE = OPTIMIZED |
---|
254 | set REG_TYPE = BIT4BIT |
---|
255 | |
---|
256 | # For a Linux machine, we can use PGI or Intel compilers. |
---|
257 | |
---|
258 | if ( `uname` == Linux ) then |
---|
259 | set LINUX_COMP = INTEL |
---|
260 | set LINUX_COMP = PGI |
---|
261 | endif |
---|
262 | |
---|
263 | # Intel requires /usr/local/intel-8.0/lib in LD_LIBRARY_PATH |
---|
264 | # and it has to be in the .cshrc file for the rsh for mpirun |
---|
265 | # intel 8.0 Apr 2005 |
---|
266 | |
---|
267 | if ( `uname` == Linux ) then |
---|
268 | if ( $LINUX_COMP == INTEL ) then |
---|
269 | |
---|
270 | grep LD_LIBRARY_PATH ~/.cshrc >& /dev/null |
---|
271 | set ok1 = $status |
---|
272 | echo $LD_LIBRARY_PATH | grep intel >& /dev/null |
---|
273 | set ok2 = $status |
---|
274 | if ( ( $ok1 != 0 ) || ( $ok2 != 0 ) ) then |
---|
275 | echo You need to stick the following line in your .cshrc file |
---|
276 | echo setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/usr/local/intel-8.0/lib |
---|
277 | echo Otherwise mpirun cannot find libcxa.so.5 |
---|
278 | exit ( 1 ) |
---|
279 | endif |
---|
280 | endif |
---|
281 | endif |
---|
282 | |
---|
283 | # Is this a WRF chem test? |
---|
284 | |
---|
285 | if ( $NESTED != TRUE ) then |
---|
286 | set CHEM = TRUE |
---|
287 | set CHEM = FALSE |
---|
288 | else if ( $NESTED == TRUE ) then |
---|
289 | set CHEM = FALSE |
---|
290 | endif |
---|
291 | if ( $CHEM == TRUE ) then |
---|
292 | setenv WRF_CHEM 1 |
---|
293 | else if ( $CHEM == FALSE ) then |
---|
294 | setenv WRF_CHEM 0 |
---|
295 | endif |
---|
296 | |
---|
297 | # For the real data case, we can run either one of two data cases. If this is |
---|
298 | # a chemistry run, we are forced to use that data. |
---|
299 | |
---|
300 | set dataset = jun01 |
---|
301 | set dataset = jan00 |
---|
302 | if ( $CHEM == TRUE ) then |
---|
303 | set dataset = chem |
---|
304 | endif |
---|
305 | |
---|
306 | # Yet another local variable to change the name of where the data is located. |
---|
307 | |
---|
308 | set thedataem = ${WRFREGDATAEM}/${dataset} |
---|
309 | set thedatanmm = $WRFREGDATANMM |
---|
310 | |
---|
311 | # The distributed memory option RSL_LITE may be selected. |
---|
312 | |
---|
313 | set RSL_LITE = TRUE |
---|
314 | set RSL_LITE = FALSE |
---|
315 | |
---|
316 | set COMBO_NEST_RSL__LITE = TRUE |
---|
317 | set COMBO_NEST_RSL__LITE = FALSE |
---|
318 | |
---|
319 | if ( $COMBO_NEST_RSL__LITE == TRUE ) then |
---|
320 | set NESTED = TRUE |
---|
321 | set RSL_LITE = TRUE |
---|
322 | endif |
---|
323 | |
---|
324 | # A separately installed version of the latest ESMF library (NOT the |
---|
325 | # ESMF library included in the WRF tarfile) can be tested by setting |
---|
326 | # "ESMF_LIB" to "TRUE" below. This test is not supported on all |
---|
327 | # machines. |
---|
328 | |
---|
329 | set ESMF_LIB = TRUE |
---|
330 | set ESMF_LIB = FALSE |
---|
331 | |
---|
332 | # serial and OMP are not tested with ESMF so always start with env vars cleared |
---|
333 | unsetenv ESMFLIB |
---|
334 | unsetenv ESMFINC |
---|
335 | |
---|
336 | if ( $ESMF_LIB == TRUE ) then |
---|
337 | if ( ( `uname` == AIX ) && ( `hostname | cut -c 1-2` == bs ) ) then |
---|
338 | echo "A separately installed version of the latest ESMF library" |
---|
339 | echo "(NOT the ESMF library included in the WRF tarfile) will" |
---|
340 | echo "be used for MPI tests" |
---|
341 | setenv OBJECT_MODE 32 |
---|
342 | set ESMFLIBSAVE = /home/bluesky/hender/esmf/lib/libO/AIX.default.32.default |
---|
343 | set ESMFINCSAVE = /home/bluesky/hender/esmf/mod/modO/AIX.default.32.default |
---|
344 | echo "Setting ESMFLIB = ${ESMFLIBSAVE}" |
---|
345 | echo "Setting ESMFINC = ${ESMFINCSAVE}" |
---|
346 | else |
---|
347 | echo "Only the ESMF library included in the WRF tarfile is" |
---|
348 | echo "tested on this machine" |
---|
349 | exit ( 3 ) |
---|
350 | endif |
---|
351 | if ( $NESTED == TRUE ) then |
---|
352 | echo "The ESMF library does not work with nesting." |
---|
353 | exit ( 3 ) |
---|
354 | endif |
---|
355 | if ( $RSL_LITE == TRUE ) then |
---|
356 | echo "The ESMF library does not work with RSL_LITE." |
---|
357 | exit ( 3 ) |
---|
358 | endif |
---|
359 | endif |
---|
360 | |
---|
361 | # A single WRF output "quilt" server can be tested by setting "QUILT" to |
---|
362 | # "TRUE" below. At the moment, testing of I/O quilt servers is not supported |
---|
363 | # on all machines. |
---|
364 | |
---|
365 | set QUILT = TRUE |
---|
366 | set QUILT = FALSE |
---|
367 | |
---|
368 | if ( $QUILT == TRUE ) then |
---|
369 | if ( `uname` == AIX ) then |
---|
370 | echo "One WRF output quilt server will be used for some tests" |
---|
371 | else if ( ( `uname` == OSF1 ) && \ |
---|
372 | ( ( `hostname` == duku ) || \ |
---|
373 | ( `hostname` == joshua1 ) || \ |
---|
374 | ( `hostname` == joshua3 ) ) ) then |
---|
375 | echo "One WRF output quilt server will be used for some tests" |
---|
376 | else |
---|
377 | echo "WRF output quilt servers are not tested on this machine" |
---|
378 | exit ( 3 ) |
---|
379 | endif |
---|
380 | endif |
---|
381 | |
---|
382 | # Baseline data sets can be generated and archived or compared against. |
---|
383 | # - To generate and archive, set GENERATE_BASELINE to a pathname that can |
---|
384 | # be created by this script via "mkdir -p $GENERATE_BASELINE". This |
---|
385 | # directory must not already exist. |
---|
386 | # Set GENERATE_BASELINE = FALSE to avoid baseline generation. |
---|
387 | # - To compare with a previously archived baseline, set COMPARE_BASELINE |
---|
388 | # to an existing directory that contains an archived baseline. |
---|
389 | # Set COMPARE_BASELINE = FALSE to avoid baseline comparison. |
---|
390 | set GENERATE_BASELINE = FALSE |
---|
391 | set COMPARE_BASELINE = FALSE |
---|
392 | |
---|
393 | # Baseline generation and comparison are only done when BIT4BIT is set. |
---|
394 | if ( $GENERATE_BASELINE != FALSE ) then |
---|
395 | if ( $REG_TYPE != BIT4BIT ) then |
---|
396 | echo "ERROR: Baseline generation can only be done during BIT4BIT tests." |
---|
397 | exit ( 3 ) |
---|
398 | endif |
---|
399 | if ( -d $GENERATE_BASELINE ) then |
---|
400 | echo "ERROR: Baseline directory ${GENERATE_BASELINE} already exists." |
---|
401 | exit ( 3 ) |
---|
402 | else |
---|
403 | # Archive serial output file to baseline |
---|
404 | mkdir -p $GENERATE_BASELINE || ( echo "ERROR: cannot mkdir ${GENERATE_BASELINE}"; exit 3 ) |
---|
405 | endif |
---|
406 | endif |
---|
407 | if ( $COMPARE_BASELINE != FALSE ) then |
---|
408 | if ( $REG_TYPE != BIT4BIT ) then |
---|
409 | echo "Baseline comparison can only be done during BIT4BIT tests." |
---|
410 | exit ( 3 ) |
---|
411 | endif |
---|
412 | if ( ! -d $COMPARE_BASELINE ) then |
---|
413 | echo "${0}: ERROR: Baseline directory ${COMPARE_BASELINE} does not exist" |
---|
414 | exit ( 3 ) |
---|
415 | endif |
---|
416 | endif |
---|
417 | |
---|
418 | # Set the input/output format type (currently 1, 2 or 5 OK). |
---|
419 | # Binary NetCDF PHDF, IBM GriB, history only |
---|
420 | # 1 2 3 4 5 |
---|
421 | |
---|
422 | set IO_FORM = 2 |
---|
423 | set IO_FORM_NAME = ( io_bin io_netcdf io_dummy io_phdf5 io_grib1 ) |
---|
424 | set IO_FORM_WHICH =( IO IO IO IO O ) |
---|
425 | |
---|
426 | # There is a breakdown of cores to test depending on the various |
---|
427 | # options that the user is testing. |
---|
428 | # nested: cannot test NMM |
---|
429 | # rsl_lite: cannot test anything with y periodic bc |
---|
430 | # chem: em_real only |
---|
431 | # esmf_lib: cannot test NMM |
---|
432 | # grib output: cannot test NMM |
---|
433 | |
---|
434 | if ( ( $NESTED == TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
435 | set CORES = ( em_real em_b_wave em_quarter_ss ) |
---|
436 | else if ( ( $NESTED == TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
437 | set CORES = ( em_real ) |
---|
438 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
439 | set CORES = ( em_real em_b_wave em_quarter_ss nmm_real ) |
---|
440 | if ( $CHEM == TRUE ) then |
---|
441 | set CORES = ( em_real em_real ) |
---|
442 | endif |
---|
443 | if ( $ESMF_LIB == TRUE ) then |
---|
444 | set CORES = ( em_real em_b_wave em_quarter_ss ) |
---|
445 | endif |
---|
446 | if ( $IO_FORM_NAME[$IO_FORM] == io_grib1 ) then |
---|
447 | set CORES = ( em_real em_b_wave em_quarter_ss ) |
---|
448 | endif |
---|
449 | if ( $FDDA == TRUE ) then |
---|
450 | set CORES = ( em_real ) |
---|
451 | endif |
---|
452 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
453 | set CORES = ( em_real em_quarter_ss nmm_real ) |
---|
454 | if ( $CHEM == TRUE ) then |
---|
455 | set CORES = ( em_real em_real ) |
---|
456 | endif |
---|
457 | if ( $ESMF_LIB == TRUE ) then |
---|
458 | set CORES = ( em_real ) |
---|
459 | endif |
---|
460 | if ( $IO_FORM_NAME[$IO_FORM] == io_grib1 ) then |
---|
461 | set CORES = ( em_real ) |
---|
462 | endif |
---|
463 | if ( $FDDA == TRUE ) then |
---|
464 | set CORES = ( em_real ) |
---|
465 | endif |
---|
466 | endif |
---|
467 | |
---|
468 | # The b_wave case has binary input (4-byte only), the nmm |
---|
469 | # core has raw MPI calls, skip them if we are doing real*8 floats. |
---|
470 | # Bump up the OMP stack size for real*8 on OSF1 architectures. |
---|
471 | |
---|
472 | if ( $REAL8 == TRUE ) then |
---|
473 | if ( `uname` == OSF1 ) then |
---|
474 | setenv MP_STACK_SIZE 64000000 |
---|
475 | endif |
---|
476 | set CORES = ( em_real em_quarter_ss ) |
---|
477 | endif |
---|
478 | |
---|
479 | if ( ( $CHEM != TRUE ) && ( $FDDA != TRUE ) && ( $NESTED != TRUE ) ) then |
---|
480 | set PHYSOPTS = ( 1 2 3 4 ) |
---|
481 | else if ( ( $CHEM != TRUE ) && ( $FDDA != TRUE ) && ( $NESTED == TRUE ) ) then |
---|
482 | set PHYSOPTS = ( 1 2 3 ) |
---|
483 | else if ( ( $CHEM != TRUE ) && ( $FDDA == TRUE ) ) then |
---|
484 | set PHYSOPTS = ( 1 2 3 ) |
---|
485 | else if ( $CHEM == TRUE ) then |
---|
486 | set PHYSOPTS = ( 1 2 3 4 5 6 ) |
---|
487 | endif |
---|
488 | |
---|
489 | # This is selecting the ideal physics options - mostly selecting BC options. |
---|
490 | # With no nesting, run all three ideal physics options. When we have |
---|
491 | # RSL_LITE (we are only doing em_quarter_ss), choose the first option only |
---|
492 | # since it uses open boundaries. |
---|
493 | |
---|
494 | if ( ( $NESTED == TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
495 | set Max_Ideal_Physics_Options = 2 |
---|
496 | else if ( $RSL_LITE == TRUE ) then |
---|
497 | set Max_Ideal_Physics_Options = 1 |
---|
498 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
499 | set Max_Ideal_Physics_Options = 3 |
---|
500 | endif |
---|
501 | |
---|
502 | set CUR_DIR = `pwd` |
---|
503 | |
---|
504 | # How many domains to run (nest tests). Only em_real and ideals use this. |
---|
505 | # The max is 3 due to the number of columns in the namelist that are |
---|
506 | # currently filled in. |
---|
507 | |
---|
508 | if ( $NESTED == TRUE ) then |
---|
509 | if ( $dataset == jan00 ) then |
---|
510 | cat >! dom_real << EOF |
---|
511 | time_step = 180, |
---|
512 | time_step_fract_num = 0, |
---|
513 | time_step_fract_den = 1, |
---|
514 | max_dom = 2, |
---|
515 | s_we = 1, 1, 1, |
---|
516 | e_we = 74, 31, 31, |
---|
517 | s_sn = 1, 1, 1, |
---|
518 | e_sn = 61, 31, 31, |
---|
519 | s_vert = 1, 1, 1, |
---|
520 | e_vert = 28, 28, 28, |
---|
521 | dx = 30000, 10000, 3333.333333, |
---|
522 | dy = 30000, 10000, 3333.333333, |
---|
523 | grid_id = 1, 2, 3, |
---|
524 | parent_id = 0, 1, 2, |
---|
525 | i_parent_start = 0, 31, 11, |
---|
526 | j_parent_start = 0, 17, 11, |
---|
527 | parent_grid_ratio = 1, 3, 3, |
---|
528 | parent_time_step_ratio = 1, 3, 3, |
---|
529 | feedback = 1, |
---|
530 | smooth_option = 0 |
---|
531 | num_moves = 3 |
---|
532 | move_id = 2 , 2 , 2 |
---|
533 | move_interval = 3 , 6 , 9 |
---|
534 | move_cd_x = 1 , 1 , 1 |
---|
535 | move_cd_y = 1 , 1 , 1 |
---|
536 | EOF |
---|
537 | else if ( $dataset == jun01 ) then |
---|
538 | cat >! dom_real << EOF |
---|
539 | time_step = 60, |
---|
540 | time_step_fract_num = 0, |
---|
541 | time_step_fract_den = 1, |
---|
542 | max_dom = 2, |
---|
543 | s_we = 1, 1, 1, |
---|
544 | e_we = 91, 31, 31, |
---|
545 | s_sn = 1, 1, 1, |
---|
546 | e_sn = 82, 31, 31, |
---|
547 | s_vert = 1, 1, 1, |
---|
548 | e_vert = 28, 28, 28, |
---|
549 | dx = 10000, 3333.333333, 1111.111111, |
---|
550 | dy = 10000, 3333.333333, 1111.111111, |
---|
551 | grid_id = 1, 2, 3, |
---|
552 | parent_id = 0, 1, 2, |
---|
553 | i_parent_start = 0, 30, 11, |
---|
554 | j_parent_start = 0, 20, 11, |
---|
555 | parent_grid_ratio = 1, 3, 3, |
---|
556 | parent_time_step_ratio = 1, 3, 3, |
---|
557 | feedback = 1, |
---|
558 | smooth_option = 0 |
---|
559 | num_moves = 3 |
---|
560 | move_id = 2 , 2 , 2 |
---|
561 | move_interval = 1 , 2 , 3 |
---|
562 | move_cd_x = 1 , 1 , 1 |
---|
563 | move_cd_y = 1 , 1 , 1 |
---|
564 | EOF |
---|
565 | endif |
---|
566 | cat >! dom_ideal << EOF |
---|
567 | max_dom = 2, |
---|
568 | EOF |
---|
569 | else if ( $NESTED != TRUE ) then |
---|
570 | if ( $dataset == jan00 ) then |
---|
571 | cat >! dom_real << EOF |
---|
572 | time_step = 180, |
---|
573 | time_step_fract_num = 0, |
---|
574 | time_step_fract_den = 1, |
---|
575 | max_dom = 1, |
---|
576 | s_we = 1, 1, 1, |
---|
577 | e_we = 74, 31, 31, |
---|
578 | s_sn = 1, 1, 1, |
---|
579 | e_sn = 61, 31, 31, |
---|
580 | s_vert = 1, 1, 1, |
---|
581 | e_vert = 28, 28, 28, |
---|
582 | dx = 30000, 10000, 3333, |
---|
583 | dy = 30000, 10000, 3333, |
---|
584 | grid_id = 1, 2, 3, |
---|
585 | parent_id = 0, 1, 2, |
---|
586 | i_parent_start = 0, 31, 30, |
---|
587 | j_parent_start = 0, 17, 30, |
---|
588 | parent_grid_ratio = 1, 3, 3, |
---|
589 | parent_time_step_ratio = 1, 3, 3, |
---|
590 | feedback = 1, |
---|
591 | smooth_option = 0 |
---|
592 | EOF |
---|
593 | else if ( $dataset == jun01 ) then |
---|
594 | cat >! dom_real << EOF |
---|
595 | time_step = 60, |
---|
596 | time_step_fract_num = 0, |
---|
597 | time_step_fract_den = 1, |
---|
598 | max_dom = 1, |
---|
599 | s_we = 1, 1, 1, |
---|
600 | e_we = 91, 31, 31, |
---|
601 | s_sn = 1, 1, 1, |
---|
602 | e_sn = 82, 31, 31, |
---|
603 | s_vert = 1, 1, 1, |
---|
604 | e_vert = 28, 28, 28, |
---|
605 | dx = 10000, 3333.333333, 1111.111111, |
---|
606 | dy = 10000, 3333.333333, 1111.111111, |
---|
607 | grid_id = 1, 2, 3, |
---|
608 | parent_id = 0, 1, 2, |
---|
609 | i_parent_start = 0, 30, 11, |
---|
610 | j_parent_start = 0, 20, 11, |
---|
611 | parent_grid_ratio = 1, 3, 3, |
---|
612 | parent_time_step_ratio = 1, 3, 3, |
---|
613 | feedback = 1, |
---|
614 | smooth_option = 0 |
---|
615 | EOF |
---|
616 | endif |
---|
617 | cat >! dom_ideal << EOF |
---|
618 | max_dom = 1, |
---|
619 | EOF |
---|
620 | endif |
---|
621 | |
---|
622 | # The em_real entire physics namelist. Change what you want. |
---|
623 | |
---|
624 | cat >! phys_real_1 << EOF |
---|
625 | mp_physics = 3, 3, 3, |
---|
626 | ra_lw_physics = 1, 1, 1, |
---|
627 | ra_sw_physics = 1, 1, 1, |
---|
628 | radt = 30, 30, 30, |
---|
629 | sf_sfclay_physics = 1, 1, 1, |
---|
630 | sf_surface_physics = 1, 1, 1, |
---|
631 | bl_pbl_physics = 1, 1, 1, |
---|
632 | bldt = 0, 0, 0, |
---|
633 | cu_physics = 1, 1, 0, |
---|
634 | cudt = 5, 5, 5, |
---|
635 | isfflx = 1, |
---|
636 | ifsnow = 0, |
---|
637 | icloud = 1, |
---|
638 | surface_input_source = 1, |
---|
639 | num_soil_layers = 5, |
---|
640 | mp_zero_out = 0, |
---|
641 | maxiens = 1, |
---|
642 | maxens = 3, |
---|
643 | maxens2 = 3, |
---|
644 | maxens3 = 16, |
---|
645 | ensdim = 144, |
---|
646 | EOF |
---|
647 | |
---|
648 | cat >! dyn_real_SAFE << EOF |
---|
649 | pd_moist = .false., .false., .false., |
---|
650 | pd_scalar = .false., .false., .false., |
---|
651 | pd_chem = .false., .false., .false., |
---|
652 | pd_tke = .false., .false., .false., |
---|
653 | EOF |
---|
654 | |
---|
655 | cat >! dyn_real_1 << EOF |
---|
656 | pd_moist = .true., .true., .false., |
---|
657 | pd_scalar = .false., .false., .false., |
---|
658 | pd_chem = .false., .false., .false., |
---|
659 | pd_tke = .false., .false., .false., |
---|
660 | EOF |
---|
661 | |
---|
662 | cat >! time_real_1 << EOF |
---|
663 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
664 | EOF |
---|
665 | |
---|
666 | cat >! phys_real_2 << EOF |
---|
667 | mp_physics = 4, 4, 4, |
---|
668 | ra_lw_physics = 1, 1, 1, |
---|
669 | ra_sw_physics = 2, 2, 2, |
---|
670 | radt = 30, 30, 30, |
---|
671 | sf_sfclay_physics = 2, 2, 2, |
---|
672 | sf_surface_physics = 2, 2, 2, |
---|
673 | bl_pbl_physics = 2, 2, 2, |
---|
674 | bldt = 0, 0, 0, |
---|
675 | cu_physics = 2, 2, 0, |
---|
676 | cudt = 5, 5, 5, |
---|
677 | isfflx = 1, |
---|
678 | ifsnow = 0, |
---|
679 | icloud = 1, |
---|
680 | surface_input_source = 1, |
---|
681 | num_soil_layers = 4, |
---|
682 | mp_zero_out = 0, |
---|
683 | maxiens = 1, |
---|
684 | maxens = 3, |
---|
685 | maxens2 = 3, |
---|
686 | maxens3 = 16, |
---|
687 | ensdim = 144, |
---|
688 | EOF |
---|
689 | |
---|
690 | cat >! dyn_real_2 << EOF |
---|
691 | pd_moist = .true., .true., .false., |
---|
692 | pd_scalar = .false., .false., .false., |
---|
693 | pd_chem = .false., .false., .false., |
---|
694 | pd_tke = .false., .false., .false., |
---|
695 | EOF |
---|
696 | |
---|
697 | cat >! time_real_2 << EOF |
---|
698 | auxinput1_inname = "wrf_real_input_em.d<domain>.<date>" |
---|
699 | EOF |
---|
700 | |
---|
701 | cat >! phys_real_3 << EOF |
---|
702 | mp_physics = 5, 5, 5, |
---|
703 | ra_lw_physics = 1, 1, 1, |
---|
704 | ra_sw_physics = 2, 2, 2, |
---|
705 | radt = 30, 30, 30, |
---|
706 | sf_sfclay_physics = 2, 2, 2, |
---|
707 | sf_surface_physics = 3, 3, 3, |
---|
708 | bl_pbl_physics = 2, 2, 2, |
---|
709 | bldt = 0, 0, 0, |
---|
710 | cu_physics = 3, 3, 0, |
---|
711 | cudt = 5, 5, 5, |
---|
712 | isfflx = 1, |
---|
713 | ifsnow = 0, |
---|
714 | icloud = 1, |
---|
715 | surface_input_source = 1, |
---|
716 | num_soil_layers = 6, |
---|
717 | mp_zero_out = 0, |
---|
718 | maxiens = 1, |
---|
719 | maxens = 3, |
---|
720 | maxens2 = 3, |
---|
721 | maxens3 = 16, |
---|
722 | ensdim = 144, |
---|
723 | EOF |
---|
724 | |
---|
725 | cat >! dyn_real_3 << EOF |
---|
726 | pd_moist = .false., .false., .false., |
---|
727 | pd_scalar = .false., .false., .false., |
---|
728 | pd_chem = .false., .false., .false., |
---|
729 | pd_tke = .false., .false., .false., |
---|
730 | EOF |
---|
731 | |
---|
732 | cat >! time_real_3 << EOF |
---|
733 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
734 | EOF |
---|
735 | |
---|
736 | cat >! phys_real_4 << EOF |
---|
737 | mp_physics = 4, 4, 4, |
---|
738 | ra_lw_physics = 1, 1, 1, |
---|
739 | ra_sw_physics = 2, 2, 2, |
---|
740 | radt = 30, 30, 30, |
---|
741 | sf_sfclay_physics = 2, 2, 2, |
---|
742 | sf_surface_physics = 2, 2, 2, |
---|
743 | bl_pbl_physics = 2, 2, 2, |
---|
744 | bldt = 0, 0, 0, |
---|
745 | cu_physics = 2, 2, 0, |
---|
746 | cudt = 5, 5, 5, |
---|
747 | isfflx = 1, |
---|
748 | ifsnow = 0, |
---|
749 | icloud = 1, |
---|
750 | ucmcall = 1, |
---|
751 | surface_input_source = 1, |
---|
752 | num_soil_layers = 4, |
---|
753 | mp_zero_out = 0, |
---|
754 | maxiens = 1, |
---|
755 | maxens = 3, |
---|
756 | maxens2 = 3, |
---|
757 | maxens3 = 16, |
---|
758 | ensdim = 144, |
---|
759 | EOF |
---|
760 | |
---|
761 | cat >! dyn_real_4 << EOF |
---|
762 | pd_moist = .false., .false., .false., |
---|
763 | pd_scalar = .false., .false., .false., |
---|
764 | pd_chem = .false., .false., .false., |
---|
765 | pd_tke = .false., .false., .false., |
---|
766 | EOF |
---|
767 | |
---|
768 | cat >! time_real_4 << EOF |
---|
769 | auxinput1_inname = "wrf_real_input_em.d<domain>.<date>" |
---|
770 | EOF |
---|
771 | |
---|
772 | cat >! phys_real_5 << EOF |
---|
773 | mp_physics = 4, 4, 4, |
---|
774 | ra_lw_physics = 3, 3, 3, |
---|
775 | ra_sw_physics = 3, 3, 3, |
---|
776 | radt = 30, 30, 30, |
---|
777 | sf_sfclay_physics = 2, 2, 2, |
---|
778 | sf_surface_physics = 2, 2, 2, |
---|
779 | bl_pbl_physics = 2, 2, 2, |
---|
780 | bldt = 0, 0, 0, |
---|
781 | cu_physics = 2, 2, 0, |
---|
782 | cudt = 5, 5, 5, |
---|
783 | isfflx = 1, |
---|
784 | ifsnow = 0, |
---|
785 | icloud = 1, |
---|
786 | ucmcall = 1, |
---|
787 | surface_input_source = 1, |
---|
788 | num_soil_layers = 4, |
---|
789 | mp_zero_out = 0, |
---|
790 | maxiens = 1, |
---|
791 | maxens = 3, |
---|
792 | maxens2 = 3, |
---|
793 | maxens3 = 16, |
---|
794 | ensdim = 144, |
---|
795 | levsiz = 59 |
---|
796 | paerlev = 29 |
---|
797 | cam_abs_freq_s = 21600 |
---|
798 | cam_abs_dim1 = 4 |
---|
799 | cam_abs_dim2 = 28 |
---|
800 | EOF |
---|
801 | |
---|
802 | cat >! dyn_real_5 << EOF |
---|
803 | pd_moist = .false., .false., .false., |
---|
804 | pd_scalar = .false., .false., .false., |
---|
805 | pd_chem = .false., .false., .false., |
---|
806 | pd_tke = .false., .false., .false., |
---|
807 | EOF |
---|
808 | |
---|
809 | cat >! time_real_5 << EOF |
---|
810 | auxinput1_inname = "met_em.d<domain>.<date>" |
---|
811 | EOF |
---|
812 | |
---|
813 | cat >! fdda_real_1 << EOF |
---|
814 | grid_fdda = 1, 1, 1, |
---|
815 | gfdda_inname = "wrffdda_d<domain>", |
---|
816 | gfdda_end_h = 24, 24, 24, |
---|
817 | gfdda_interval_m = 360, 360, 360, |
---|
818 | fgdt = 0, 0, 0, |
---|
819 | if_no_pbl_nudging_uv = 0, 0, 1, |
---|
820 | if_no_pbl_nudging_t = 0, 0, 1, |
---|
821 | if_no_pbl_nudging_q = 0, 0, 1, |
---|
822 | if_zfac_uv = 0, 0, 1, |
---|
823 | k_zfac_uv = 10, 10, 1, |
---|
824 | if_zfac_t = 0, 0, 1, |
---|
825 | k_zfac_t = 10, 10, 1, |
---|
826 | if_zfac_q = 0, 0, 1, |
---|
827 | k_zfac_q = 10, 10, 1, |
---|
828 | guv = 0.0003, 0.0003, 0.0003, |
---|
829 | gt = 0.0003, 0.0003, 0.0003, |
---|
830 | gq = 0.0003, 0.0003, 0.0003, |
---|
831 | if_ramping = 1, |
---|
832 | dtramp_min = 360.0, |
---|
833 | io_form_gfdda = 2, |
---|
834 | EOF |
---|
835 | |
---|
836 | cat >! fdda_real_time_1 << EOF |
---|
837 | EOF |
---|
838 | |
---|
839 | cat >! fdda_real_2 << EOF |
---|
840 | obs_nudge_opt = 1,1,1,1,1 |
---|
841 | max_obs = 150000, |
---|
842 | nobs_ndg_vars = 5, |
---|
843 | nobs_err_flds = 9, |
---|
844 | obs_nudge_wind = 1,1,1,1,1 |
---|
845 | obs_coef_wind = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
846 | obs_nudge_temp = 1,1,1,1,1 |
---|
847 | obs_coef_temp = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
848 | obs_nudge_mois = 1,1,1,1,1 |
---|
849 | obs_coef_mois = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
850 | obs_rinxy = 240.,240.,180.,180,180 |
---|
851 | obs_rinsig = 0.1, |
---|
852 | obs_twindo = 40. |
---|
853 | obs_npfi = 10, |
---|
854 | obs_ionf = 2, |
---|
855 | obs_idynin = 0, |
---|
856 | obs_dtramp = 40., |
---|
857 | obs_ipf_errob = .true. |
---|
858 | obs_ipf_nudob = .true. |
---|
859 | obs_ipf_in4dob = .true. |
---|
860 | EOF |
---|
861 | |
---|
862 | cat >! fdda_real_time_2 << EOF |
---|
863 | auxinput11_interval_s = 180 |
---|
864 | auxinput11_end_h = 6 |
---|
865 | EOF |
---|
866 | |
---|
867 | cat >! fdda_real_3 << EOF |
---|
868 | grid_fdda = 1, 1, 1, |
---|
869 | gfdda_inname = "wrffdda_d<domain>", |
---|
870 | gfdda_end_h = 24, 24, 24, |
---|
871 | gfdda_interval_m = 360, 360, 360, |
---|
872 | fgdt = 0, 0, 0, |
---|
873 | if_no_pbl_nudging_uv = 0, 0, 1, |
---|
874 | if_no_pbl_nudging_t = 0, 0, 1, |
---|
875 | if_no_pbl_nudging_q = 0, 0, 1, |
---|
876 | if_zfac_uv = 0, 0, 1, |
---|
877 | k_zfac_uv = 10, 10, 1, |
---|
878 | if_zfac_t = 0, 0, 1, |
---|
879 | k_zfac_t = 10, 10, 1, |
---|
880 | if_zfac_q = 0, 0, 1, |
---|
881 | k_zfac_q = 10, 10, 1, |
---|
882 | guv = 0.0003, 0.0003, 0.0003, |
---|
883 | gt = 0.0003, 0.0003, 0.0003, |
---|
884 | gq = 0.0003, 0.0003, 0.0003, |
---|
885 | if_ramping = 1, |
---|
886 | dtramp_min = 360.0, |
---|
887 | io_form_gfdda = 2, |
---|
888 | obs_nudge_opt = 1,1,1,1,1 |
---|
889 | max_obs = 150000, |
---|
890 | nobs_ndg_vars = 5, |
---|
891 | nobs_err_flds = 9, |
---|
892 | obs_nudge_wind = 1,1,1,1,1 |
---|
893 | obs_coef_wind = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
894 | obs_nudge_temp = 1,1,1,1,1 |
---|
895 | obs_coef_temp = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
896 | obs_nudge_mois = 1,1,1,1,1 |
---|
897 | obs_coef_mois = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4 |
---|
898 | obs_rinxy = 240.,240.,180.,180,180 |
---|
899 | obs_rinsig = 0.1, |
---|
900 | obs_twindo = 40. |
---|
901 | obs_npfi = 10, |
---|
902 | obs_ionf = 2, |
---|
903 | obs_idynin = 0, |
---|
904 | obs_dtramp = 40., |
---|
905 | obs_ipf_errob = .true. |
---|
906 | obs_ipf_nudob = .true. |
---|
907 | obs_ipf_in4dob = .true. |
---|
908 | EOF |
---|
909 | |
---|
910 | cat >! fdda_real_time_3 << EOF |
---|
911 | auxinput11_interval_s = 180 |
---|
912 | auxinput11_end_h = 6 |
---|
913 | EOF |
---|
914 | |
---|
915 | # Tested options for ideal case em_b_wave. Modifying these |
---|
916 | # parameters is acceptable. Adding to these requires changes |
---|
917 | # to the ideal namelist build below. |
---|
918 | |
---|
919 | cat >! phys_b_wave_1a << EOF |
---|
920 | diff_opt = 1, |
---|
921 | km_opt = 1, |
---|
922 | damp_opt = 0, |
---|
923 | EOF |
---|
924 | cat >! phys_b_wave_1b << EOF |
---|
925 | mp_physics = 1, 1, 1, |
---|
926 | EOF |
---|
927 | cat >! phys_b_wave_1c << EOF |
---|
928 | non_hydrostatic = .true., .true., .true., |
---|
929 | EOF |
---|
930 | |
---|
931 | cat >! phys_b_wave_2a << EOF |
---|
932 | diff_opt = 1, |
---|
933 | km_opt = 1, |
---|
934 | damp_opt = 0, |
---|
935 | EOF |
---|
936 | cat >! phys_b_wave_2b << EOF |
---|
937 | mp_physics = 1, 1, 1, |
---|
938 | EOF |
---|
939 | cat >! phys_b_wave_2c << EOF |
---|
940 | non_hydrostatic = .false., .false., .false., |
---|
941 | EOF |
---|
942 | |
---|
943 | cat >! phys_b_wave_3a << EOF |
---|
944 | diff_opt = 1, |
---|
945 | km_opt = 1, |
---|
946 | damp_opt = 0, |
---|
947 | EOF |
---|
948 | cat >! phys_b_wave_3b << EOF |
---|
949 | mp_physics = 2, 2, 2, |
---|
950 | EOF |
---|
951 | cat >! phys_b_wave_3c << EOF |
---|
952 | non_hydrostatic = .false., .false., .false., |
---|
953 | EOF |
---|
954 | |
---|
955 | # Tested options for ideal case em_quarter_ss. Modifying these |
---|
956 | # parameters is acceptable. Adding to these requires changes |
---|
957 | # to the ideal namelist build below. |
---|
958 | |
---|
959 | cat >! phys_quarter_ss_1a << EOF |
---|
960 | diff_opt = 1, |
---|
961 | km_opt = 1, |
---|
962 | damp_opt = 0, |
---|
963 | EOF |
---|
964 | cat >! phys_quarter_ss_1b << EOF |
---|
965 | mp_physics = 1, 1, 1, |
---|
966 | EOF |
---|
967 | cat >! phys_quarter_ss_1c << EOF |
---|
968 | non_hydrostatic = .true., .true., .true., |
---|
969 | EOF |
---|
970 | cat >! phys_quarter_ss_1d << EOF |
---|
971 | periodic_x = .false.,.false.,.false., |
---|
972 | open_xs = .true., .false.,.false., |
---|
973 | open_xe = .true., .false.,.false., |
---|
974 | periodic_y = .false.,.false.,.false., |
---|
975 | open_ys = .true., .false.,.false., |
---|
976 | open_ye = .true., .false.,.false., |
---|
977 | EOF |
---|
978 | |
---|
979 | cat >! phys_quarter_ss_2a << EOF |
---|
980 | diff_opt = 2, |
---|
981 | km_opt = 2, |
---|
982 | damp_opt = 1, |
---|
983 | EOF |
---|
984 | cat >! phys_quarter_ss_2b << EOF |
---|
985 | mp_physics = 1, 1, 1, |
---|
986 | EOF |
---|
987 | cat >! phys_quarter_ss_2c << EOF |
---|
988 | non_hydrostatic = .true., .true., .true., |
---|
989 | EOF |
---|
990 | cat >! phys_quarter_ss_2d << EOF |
---|
991 | periodic_x = .true., .false.,.false., |
---|
992 | open_xs = .false.,.false.,.false., |
---|
993 | open_xe = .false.,.false.,.false., |
---|
994 | periodic_y = .true., .false.,.false., |
---|
995 | open_ys = .false.,.false.,.false., |
---|
996 | open_ye = .false.,.false.,.false., |
---|
997 | EOF |
---|
998 | |
---|
999 | cat >! phys_quarter_ss_3a << EOF |
---|
1000 | diff_opt = 2, |
---|
1001 | km_opt = 3, |
---|
1002 | damp_opt = 1, |
---|
1003 | EOF |
---|
1004 | cat >! phys_quarter_ss_3b << EOF |
---|
1005 | mp_physics = 2, 2, 2, |
---|
1006 | EOF |
---|
1007 | cat >! phys_quarter_ss_3c << EOF |
---|
1008 | non_hydrostatic = .false., .false., .false., |
---|
1009 | EOF |
---|
1010 | cat >! phys_quarter_ss_3d << EOF |
---|
1011 | periodic_x = .true., .false.,.false., |
---|
1012 | open_xs = .false.,.false.,.false., |
---|
1013 | open_xe = .false.,.false.,.false., |
---|
1014 | periodic_y = .true., .false.,.false., |
---|
1015 | open_ys = .false.,.false.,.false., |
---|
1016 | open_ye = .false.,.false.,.false., |
---|
1017 | EOF |
---|
1018 | |
---|
1019 | if ( $IO_FORM_WHICH[$IO_FORM] == IO ) then |
---|
1020 | cat >! io_format << EOF |
---|
1021 | io_form_history = $IO_FORM |
---|
1022 | io_form_restart = $IO_FORM |
---|
1023 | io_form_input = $IO_FORM |
---|
1024 | io_form_boundary = $IO_FORM |
---|
1025 | EOF |
---|
1026 | else if ( $IO_FORM_WHICH[$IO_FORM] == I ) then |
---|
1027 | cat >! io_format << EOF |
---|
1028 | io_form_history = 2 |
---|
1029 | io_form_restart = 2 |
---|
1030 | io_form_input = $IO_FORM |
---|
1031 | io_form_boundary = $IO_FORM |
---|
1032 | EOF |
---|
1033 | else if ( $IO_FORM_WHICH[$IO_FORM] == O ) then |
---|
1034 | cat >! io_format << EOF |
---|
1035 | io_form_history = $IO_FORM |
---|
1036 | io_form_restart = 2 |
---|
1037 | io_form_input = 2 |
---|
1038 | io_form_boundary = 2 |
---|
1039 | EOF |
---|
1040 | endif |
---|
1041 | |
---|
1042 | |
---|
1043 | if ( $dataset == jun01 ) then |
---|
1044 | set filetag_real=2001-06-11_12:00:00 |
---|
1045 | else if ( $dataset == jan00 ) then |
---|
1046 | set filetag_real=2000-01-24_12:00:00 |
---|
1047 | else if ( $dataset == chem ) then |
---|
1048 | set filetag_real = ( 2006-04-06_00:00:00 2006-04-06_12:00:00 ) |
---|
1049 | endif |
---|
1050 | |
---|
1051 | set filetag_ideal=0001-01-01_00:00:00 |
---|
1052 | #DAVE################################################### |
---|
1053 | echo did phys, set date to $filetag_real |
---|
1054 | banner 2 |
---|
1055 | #set ans = "$<" |
---|
1056 | #DAVE################################################### |
---|
1057 | |
---|
1058 | ##################################################################### |
---|
1059 | |
---|
1060 | # Set up info for particular architectures |
---|
1061 | |
---|
1062 | set ARCH = ( `uname` ) |
---|
1063 | |
---|
1064 | set ZAP_SERIAL = FALSE |
---|
1065 | set ZAP_OPENMP = FALSE |
---|
1066 | set SERIALRUNCOMMAND = |
---|
1067 | set OMPRUNCOMMAND = |
---|
1068 | set MPIRUNCOMMANDPOST = |
---|
1069 | |
---|
1070 | touch version_info |
---|
1071 | if ( $ARCH[1] == AIX ) then |
---|
1072 | set DEF_DIR = $home |
---|
1073 | set TMPDIR = /ptmp/$user |
---|
1074 | # keep stuff out of $HOME and /ptmp/$USER |
---|
1075 | # this allows multiple regressions tests to run simultaneously |
---|
1076 | # extend this to other machines later |
---|
1077 | if ( ( `hostname | cut -c 1-2` == bs ) && ( ! $?LOADL_JOB_NAME ) ) then |
---|
1078 | echo "${0}: ERROR:: This batch script must be submitted via" |
---|
1079 | echo "${0}: LoadLeveler on an AIX machine\!" |
---|
1080 | exit |
---|
1081 | else if ( `hostname | cut -c 1-2` == bs ) then |
---|
1082 | set job_id = `echo ${LOADL_JOB_NAME} | cut -f2 -d'.'` |
---|
1083 | set DEF_DIR = /ptmp/$user/wrf_regression.${job_id} |
---|
1084 | set TMPDIR = $DEF_DIR |
---|
1085 | if ( -d $DEF_DIR ) then |
---|
1086 | echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it" |
---|
1087 | exit ( 1 ) |
---|
1088 | else |
---|
1089 | mkdir -p $DEF_DIR |
---|
1090 | echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results" |
---|
1091 | endif |
---|
1092 | set CUR_DIR = ${LOADL_STEP_INITDIR} |
---|
1093 | else if ( `hostname | cut -c 1-2` == bv ) then |
---|
1094 | set job_id = $LSB_JOBID |
---|
1095 | set DEF_DIR = /ptmp/$user/wrf_regression.${job_id} |
---|
1096 | set TMPDIR = $DEF_DIR |
---|
1097 | if ( -d $DEF_DIR ) then |
---|
1098 | echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it" |
---|
1099 | exit ( 1 ) |
---|
1100 | else |
---|
1101 | mkdir -p $DEF_DIR |
---|
1102 | echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results" |
---|
1103 | endif |
---|
1104 | else if ( ( ( `hostname | cut -c 1-2` != bs ) && ( `hostname | cut -c 1-2` != bv ) ) && ( ! $?LOADL_JOB_NAME ) ) then |
---|
1105 | echo "${0}: ERROR:: This batch script must be submitted via" |
---|
1106 | echo "${0}: LoadLeveler on an AIX machine\!" |
---|
1107 | exit |
---|
1108 | else if ( ( `hostname | cut -c 1-2` != bs ) && ( `hostname | cut -c 1-2` != bv ) ) then |
---|
1109 | set job_id = `echo ${LOADL_JOB_NAME} | cut -f2 -d'.'` |
---|
1110 | set DEF_DIR = /ptmp/$user/wrf_regression.${job_id} |
---|
1111 | set TMPDIR = $DEF_DIR |
---|
1112 | if ( -d $DEF_DIR ) then |
---|
1113 | echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it" |
---|
1114 | exit ( 1 ) |
---|
1115 | else |
---|
1116 | mkdir -p $DEF_DIR |
---|
1117 | echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results" |
---|
1118 | endif |
---|
1119 | set CUR_DIR = ${LOADL_STEP_INITDIR} |
---|
1120 | endif |
---|
1121 | if ( ! -d $TMPDIR ) mkdir $TMPDIR |
---|
1122 | set MAIL = /usr/bin/mailx |
---|
1123 | if ( ( $NESTED == TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1124 | set COMPOPTS = ( 9 10 4 ) |
---|
1125 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1126 | set COMPOPTS = ( 1 2 4 ) |
---|
1127 | else if ( ( $NESTED == TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
1128 | set COMPOPTS = ( 9 10 3 ) |
---|
1129 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
1130 | set COMPOPTS = ( 1 2 3 ) |
---|
1131 | endif |
---|
1132 | set Num_Procs = 4 |
---|
1133 | set OPENMP = $Num_Procs |
---|
1134 | setenv MP_PROCS $Num_Procs |
---|
1135 | setenv MP_RMPOOL 1 |
---|
1136 | if ( `hostname | cut -c 1-2` == bs ) then |
---|
1137 | set MPIRUNCOMMAND = poe |
---|
1138 | else if ( `hostname | cut -c 1-2` == bv ) then |
---|
1139 | set MPIRUNCOMMAND = mpirun.lsf |
---|
1140 | else if ( ( `hostname | cut -c 1-2` != bs ) && ( `hostname | cut -c 1-2` != bv ) ) then |
---|
1141 | set MPIRUNCOMMAND = poe |
---|
1142 | endif |
---|
1143 | if ( $CHEM == TRUE ) then |
---|
1144 | set ZAP_OPENMP = TRUE |
---|
1145 | else if ( $CHEM == FALSE ) then |
---|
1146 | set ZAP_OPENMP = FALSE |
---|
1147 | endif |
---|
1148 | # check compiler version, JM |
---|
1149 | lslpp -i | grep xlf | grep ' xlfcmp ' | head -1 |
---|
1150 | set xlfvers=`lslpp -i | grep xlf | grep ' xlfcmp ' | head -1 | awk '{print $2}' | sed 's/\...*$//'` |
---|
1151 | if ( $xlfvers < 10 ) then |
---|
1152 | set ZAP_OPENMP = TRUE |
---|
1153 | endif |
---|
1154 | # end of compiler check, JM |
---|
1155 | echo "Compiler version info: " >! version_info |
---|
1156 | echo "FORTRAN: " `lslpp -l | grep xlfrte | head -1 | awk '{print $1 " " $2}'` >>! version_info |
---|
1157 | echo " " >>! version_info |
---|
1158 | echo "OS version info: " >>! version_info |
---|
1159 | echo "AIX: " `lslpp -l | grep bos.mp | head -1 | awk '{print $1 " " $2}'` >>! version_info |
---|
1160 | echo " " >>! version_info |
---|
1161 | setenv MP_SHARED_MEMORY yes |
---|
1162 | else if ( $ARCH[1] == OSF1 && $clrm == 0 ) then |
---|
1163 | if ( ( `hostname` == duku ) && ( -d /data1/$user ) ) then |
---|
1164 | set DEF_DIR = /data1/$user |
---|
1165 | else if ( ( `hostname | cut -c 1-6` == joshua ) && ( -d /data3/mp/$user ) ) then |
---|
1166 | set DEF_DIR = /data3/mp/${user}/`hostname` |
---|
1167 | if ( ! -d $DEF_DIR ) mkdir $DEF_DIR |
---|
1168 | else if ( ( `hostname | cut -c 1-6` == joshua ) && ( -d /data6a/md/$user ) ) then |
---|
1169 | set DEF_DIR = /data6a/md/${user}/`hostname` |
---|
1170 | if ( ! -d $DEF_DIR ) mkdir $DEF_DIR |
---|
1171 | else |
---|
1172 | set DEF_DIR = /mmmtmp/${user}/`hostname` |
---|
1173 | if ( ! -d $DEF_DIR ) mkdir $DEF_DIR |
---|
1174 | endif |
---|
1175 | set TMPDIR = . |
---|
1176 | set MAIL = /usr/bin/mailx |
---|
1177 | if ( ( $NESTED == TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1178 | set COMPOPTS = ( 2 4 6 ) |
---|
1179 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1180 | set COMPOPTS = ( 1 3 6 ) |
---|
1181 | else if ( ( $NESTED == TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
1182 | set COMPOPTS = ( 2 4 11 ) |
---|
1183 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
1184 | set COMPOPTS = ( 1 3 5 ) |
---|
1185 | endif |
---|
1186 | set Num_Procs = 4 |
---|
1187 | set OPENMP = $Num_Procs |
---|
1188 | cat >! `pwd`/machfile << EOF |
---|
1189 | `hostname` |
---|
1190 | `hostname` |
---|
1191 | `hostname` |
---|
1192 | `hostname` |
---|
1193 | EOF |
---|
1194 | set Mach = `pwd`/machfile |
---|
1195 | set SERIALRUNCOMMAND = |
---|
1196 | set OMPRUNCOMMAND = |
---|
1197 | set MPIRUNCOMMAND = ( /usr/local/mpich/bin/mpirun -np $Num_Procs -machinefile $Mach ) |
---|
1198 | if ( $CHEM == TRUE ) then |
---|
1199 | set ZAP_OPENMP = TRUE |
---|
1200 | else if ( $CHEM == FALSE ) then |
---|
1201 | set ZAP_OPENMP = FALSE |
---|
1202 | endif |
---|
1203 | echo "Compiler version info: " >! version_info |
---|
1204 | f90 -version >>&! version_info |
---|
1205 | echo " " >>! version_info |
---|
1206 | echo "OS version info: " >>! version_info |
---|
1207 | uname -a >>&! version_info |
---|
1208 | echo " " >>! version_info |
---|
1209 | else if ( $ARCH[1] == OSF1 && $clrm == 1 ) then |
---|
1210 | set DEF_DIR = /`hostname | cut -d. -f1`/$user |
---|
1211 | set TMPDIR = /mmmtmp/$user |
---|
1212 | set MAIL = /usr/bin/mailx |
---|
1213 | if ( ( $NESTED == TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1214 | set COMPOPTS = ( 2 4 6 ) |
---|
1215 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1216 | set COMPOPTS = ( 1 3 6 ) |
---|
1217 | else if ( ( $NESTED == TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
1218 | set COMPOPTS = ( 2 4 5 ) |
---|
1219 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
1220 | set COMPOPTS = ( 1 3 5 ) |
---|
1221 | endif |
---|
1222 | set Num_Procs = 4 |
---|
1223 | set OPENMP = 0 |
---|
1224 | set ZAP_OPENMP = TRUE |
---|
1225 | cat >! $TMPDIR/machfile << EOF |
---|
1226 | service03 |
---|
1227 | service04 |
---|
1228 | service05 |
---|
1229 | service06 |
---|
1230 | EOF |
---|
1231 | set Mach = $TMPDIR/machfile |
---|
1232 | set MPIRUNCOMMAND = ( mpirun -np $Num_Procs -machinefile $Mach ) |
---|
1233 | echo "Compiler version info: " >! version_info |
---|
1234 | f90 -version >>&! version_info |
---|
1235 | echo " " >>! version_info |
---|
1236 | echo "OS version info: " >>! version_info |
---|
1237 | uname -a >>&! version_info |
---|
1238 | echo " " >>! version_info |
---|
1239 | else if ( ( $ARCH[1] == Linux ) && ( `hostname` == bay-mmm ) ) then |
---|
1240 | set DEF_DIR = /data3/mp/${user}/`hostname` |
---|
1241 | if ( ! -d $DEF_DIR ) mkdir $DEF_DIR |
---|
1242 | set TMPDIR = . |
---|
1243 | set MAIL = /bin/mail |
---|
1244 | if ( $LINUX_COMP == PGI ) then |
---|
1245 | if ( ( $NESTED == TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1246 | set COMPOPTS = ( 2 4 5 ) |
---|
1247 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1248 | set COMPOPTS = ( 1 3 5 ) |
---|
1249 | else if ( ( $NESTED == TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
1250 | set COMPOPTS = ( 2 4 6 ) |
---|
1251 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
1252 | set COMPOPTS = ( 1 3 6 ) |
---|
1253 | endif |
---|
1254 | else if ( $LINUX_COMP == INTEL ) then |
---|
1255 | if ( $NESTED == TRUE ) then |
---|
1256 | set COMPOPTS = ( 8 10 11 ) |
---|
1257 | else if ( $NESTED != TRUE ) then |
---|
1258 | set COMPOPTS = ( 7 9 11 ) |
---|
1259 | endif |
---|
1260 | endif |
---|
1261 | set Num_Procs = 2 |
---|
1262 | set OPENMP = $Num_Procs |
---|
1263 | cat >! machfile << EOF |
---|
1264 | `hostname` |
---|
1265 | `hostname` |
---|
1266 | `hostname` |
---|
1267 | `hostname` |
---|
1268 | EOF |
---|
1269 | set Mach = `pwd`/machfile |
---|
1270 | if ( $CHEM == TRUE ) then |
---|
1271 | set ZAP_OPENMP = TRUE |
---|
1272 | else if ( $CHEM == FALSE ) then |
---|
1273 | set ZAP_OPENMP = FALSE |
---|
1274 | endif |
---|
1275 | if ( $LINUX_COMP == INTEL ) then |
---|
1276 | set ZAP_OPENMP = TRUE |
---|
1277 | endif |
---|
1278 | set MPIRUNCOMMAND = ( mpirun -np $Num_Procs -machinefile $Mach ) |
---|
1279 | echo "Compiler version info: " >! version_info |
---|
1280 | if ( $LINUX_COMP == PGI ) then |
---|
1281 | pgf90 -V >>&! version_info |
---|
1282 | else if ( $LINUX_COMP == INTEL ) then |
---|
1283 | ifort -v >>&! version_info |
---|
1284 | endif |
---|
1285 | echo " " >>! version_info |
---|
1286 | echo "OS version info: " >>! version_info |
---|
1287 | uname -a >>&! version_info |
---|
1288 | echo " " >>! version_info |
---|
1289 | else if ( ( $ARCH[1] == Linux ) && ( `hostname | cut -c 1-2` == ln ) ) then |
---|
1290 | set DEF_DIR = /ptmp/${user}/wrf_regtest |
---|
1291 | if ( ! -d $DEF_DIR ) mkdir $DEF_DIR |
---|
1292 | set TMPDIR = . |
---|
1293 | set MAIL = /bin/mail |
---|
1294 | if ( $LINUX_COMP == PGI ) then |
---|
1295 | if ( ( $NESTED == TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1296 | set COMPOPTS = ( 4 2 3 ) |
---|
1297 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1298 | set COMPOPTS = ( 1 2 3 ) |
---|
1299 | endif |
---|
1300 | endif |
---|
1301 | set Num_Procs = 4 |
---|
1302 | set OPENMP = 2 |
---|
1303 | cat >! machfile << EOF |
---|
1304 | `hostname` |
---|
1305 | `hostname` |
---|
1306 | `hostname` |
---|
1307 | `hostname` |
---|
1308 | EOF |
---|
1309 | set Mach = `pwd`/machfile |
---|
1310 | set ZAP_OPENMP = TRUE |
---|
1311 | set MPIRUNCOMMAND = mpirun.lsf |
---|
1312 | echo "Compiler version info: " >! version_info |
---|
1313 | if ( $LINUX_COMP == PGI ) then |
---|
1314 | pgf90 -V >>&! version_info |
---|
1315 | else if ( $LINUX_COMP == INTEL ) then |
---|
1316 | ifort -v >>&! version_info |
---|
1317 | endif |
---|
1318 | echo " " >>! version_info |
---|
1319 | echo "OS version info: " >>! version_info |
---|
1320 | uname -a >>&! version_info |
---|
1321 | echo " " >>! version_info |
---|
1322 | else if ( ( $ARCH[1] == Linux ) && ( `hostname` == loquat ) ) then |
---|
1323 | set job_id = $$ |
---|
1324 | set DEF_DIR = /loquat2/$user/wrf_regression.${job_id} |
---|
1325 | set TMPDIR = $DEF_DIR |
---|
1326 | if ( -d $DEF_DIR ) then |
---|
1327 | echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it" |
---|
1328 | exit ( 1 ) |
---|
1329 | else |
---|
1330 | mkdir -p $DEF_DIR |
---|
1331 | echo "See directory ${DEF_DIR}/ for wrftest.output and other test results" |
---|
1332 | endif |
---|
1333 | set MAIL = /bin/mail |
---|
1334 | if ( $LINUX_COMP == PGI ) then |
---|
1335 | if ( ( $NESTED == TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1336 | set COMPOPTS = ( 2 4 5 ) |
---|
1337 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1338 | set COMPOPTS = ( 1 3 5 ) |
---|
1339 | else if ( ( $NESTED == TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
1340 | set COMPOPTS = ( 2 4 6 ) |
---|
1341 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
1342 | set COMPOPTS = ( 1 3 6 ) |
---|
1343 | endif |
---|
1344 | else if ( $LINUX_COMP == INTEL ) then |
---|
1345 | if ( $NESTED == TRUE ) then |
---|
1346 | set COMPOPTS = ( 8 10 11 ) |
---|
1347 | else if ( $NESTED != TRUE ) then |
---|
1348 | set COMPOPTS = ( 7 9 11 ) |
---|
1349 | endif |
---|
1350 | endif |
---|
1351 | set Num_Procs = 2 |
---|
1352 | set OPENMP = $Num_Procs |
---|
1353 | cat >! machfile << EOF |
---|
1354 | `hostname` |
---|
1355 | `hostname` |
---|
1356 | `hostname` |
---|
1357 | `hostname` |
---|
1358 | EOF |
---|
1359 | set Mach = `pwd`/machfile |
---|
1360 | if ( $CHEM == TRUE ) then |
---|
1361 | set ZAP_OPENMP = TRUE |
---|
1362 | else if ( $CHEM == FALSE ) then |
---|
1363 | set ZAP_OPENMP = FALSE |
---|
1364 | endif |
---|
1365 | if ( $LINUX_COMP == INTEL ) then |
---|
1366 | set ZAP_OPENMP = TRUE |
---|
1367 | endif |
---|
1368 | set MPIRUNCOMMAND = ( mpirun -np $Num_Procs -machinefile $Mach ) |
---|
1369 | echo "Compiler version info: " >! version_info |
---|
1370 | if ( $LINUX_COMP == PGI ) then |
---|
1371 | pgf90 -V >>&! version_info |
---|
1372 | else if ( $LINUX_COMP == INTEL ) then |
---|
1373 | ifort -v >>&! version_info |
---|
1374 | endif |
---|
1375 | echo " " >>! version_info |
---|
1376 | echo "OS version info: " >>! version_info |
---|
1377 | uname -a >>&! version_info |
---|
1378 | echo " " >>! version_info |
---|
1379 | else if ( `hostname` == tempest ) then |
---|
1380 | set DEF_DIR = /ptmp/${user}/wrf_regtest.${QSUB_REQID} |
---|
1381 | if ( ! -d $DEF_DIR ) mkdir $DEF_DIR |
---|
1382 | set TMPDIR = . |
---|
1383 | set MAIL = /usr/sbin/Mail |
---|
1384 | set COMPOPTS = ( 1 2 3 ) |
---|
1385 | set Num_Procs = 2 |
---|
1386 | set OPENMP = $Num_Procs |
---|
1387 | set Mach = `pwd`/machfile |
---|
1388 | set ZAP_OPENMP = TRUE |
---|
1389 | set MPIRUNCOMMAND = ( mpirun -np $Num_Procs ) |
---|
1390 | echo "Compiler version info: " >! version_info |
---|
1391 | f90 -version >>&! version_info |
---|
1392 | echo " " >>! version_info |
---|
1393 | echo "OS version info: " >>! version_info |
---|
1394 | uname -a >>&! version_info |
---|
1395 | echo " " >>! version_info |
---|
1396 | else if ( ( $ARCH[1] == Linux ) && ( `hostname` == master ) ) then |
---|
1397 | set DEF_DIR = /big6/gill/DO_NOT_REMOVE_DIR |
---|
1398 | set TMPDIR = . |
---|
1399 | set MAIL = /bin/mail |
---|
1400 | if ( $LINUX_COMP == PGI ) then |
---|
1401 | if ( $NESTED == TRUE ) then |
---|
1402 | set COMPOPTS = ( 2 4 5 ) |
---|
1403 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE == TRUE ) ) then |
---|
1404 | set COMPOPTS = ( 1 3 6 ) |
---|
1405 | else if ( ( $NESTED != TRUE ) && ( $RSL_LITE != TRUE ) ) then |
---|
1406 | set COMPOPTS = ( 1 3 5 ) |
---|
1407 | endif |
---|
1408 | else if ( $LINUX_COMP == INTEL ) then |
---|
1409 | if ( $NESTED == TRUE ) then |
---|
1410 | set COMPOPTS = ( 8 10 11 ) |
---|
1411 | else if ( $NESTED != TRUE ) then |
---|
1412 | set COMPOPTS = ( 7 9 11 ) |
---|
1413 | endif |
---|
1414 | endif |
---|
1415 | set Num_Procs = 4 |
---|
1416 | set OPENMP = 2 |
---|
1417 | cat >! machfile << EOF |
---|
1418 | node3 |
---|
1419 | node3 |
---|
1420 | node4 |
---|
1421 | node4 |
---|
1422 | EOF |
---|
1423 | set Mach = `pwd`/machfile |
---|
1424 | if ( $CHEM == TRUE ) then |
---|
1425 | set ZAP_OPENMP = TRUE |
---|
1426 | else if ( $CHEM == FALSE ) then |
---|
1427 | set ZAP_OPENMP = FALSE |
---|
1428 | endif |
---|
1429 | if ( $LINUX_COMP == INTEL ) then |
---|
1430 | set ZAP_OPENMP = TRUE |
---|
1431 | endif |
---|
1432 | set MPIRUNCOMMAND = ( mpirun -v -np $Num_Procs -machinefile $Mach -nolocal ) |
---|
1433 | set MPIRUNCOMMANDPOST = "< /dev/null" |
---|
1434 | echo "Compiler version info: " >! version_info |
---|
1435 | if ( $LINUX_COMP == PGI ) then |
---|
1436 | pgf90 -V >>&! version_info |
---|
1437 | else if ( $LINUX_COMP == INTEL ) then |
---|
1438 | ifort -v >>&! version_info |
---|
1439 | endif |
---|
1440 | echo " " >>! version_info |
---|
1441 | echo "OS version info: " >>! version_info |
---|
1442 | uname -a >>&! version_info |
---|
1443 | echo " " >>! version_info |
---|
1444 | else |
---|
1445 | echo "Unrecognized architecture for regression test" >! error_message |
---|
1446 | echo `uname` >> error_message |
---|
1447 | echo `hostname` >> error_message |
---|
1448 | $MAIL -s "Unknown architecture $ARCH[1] " $FAIL_MAIL < error_message |
---|
1449 | exit ( 1 ) |
---|
1450 | endif |
---|
1451 | |
---|
1452 | ##################################################################### |
---|
1453 | #DAVE################################################### |
---|
1454 | echo did the arch specific stuff |
---|
1455 | banner 3 |
---|
1456 | #set ans = "$<" |
---|
1457 | #DAVE################################################### |
---|
1458 | |
---|
1459 | # First of all, in which particular directory do we start. |
---|
1460 | |
---|
1461 | cd $DEF_DIR |
---|
1462 | |
---|
1463 | # We want to keep the old regression stuff around |
---|
1464 | |
---|
1465 | if ( -d regression_test ) then |
---|
1466 | if ( -d regression_test.old ) then |
---|
1467 | /bin/rm -fr regression_test.old |
---|
1468 | endif |
---|
1469 | /bin/mv regression_test regression_test.old |
---|
1470 | endif |
---|
1471 | |
---|
1472 | # Go to the regression test directory |
---|
1473 | |
---|
1474 | mkdir regression_test |
---|
1475 | set ok = $status |
---|
1476 | if ( $ok != 0 ) then |
---|
1477 | echo "Gee, I cannot make a directory in $DEF_DIR" >! error_message |
---|
1478 | echo `pwd` >> error_message |
---|
1479 | echo `\ls -ls` >> error_message |
---|
1480 | $MAIL -s "$DEF_DIR not writable $ARCH[1] " $FAIL_MAIL < error_message |
---|
1481 | exit ( 1 ) |
---|
1482 | else |
---|
1483 | pushd regression_test |
---|
1484 | endif |
---|
1485 | |
---|
1486 | if ( $acquire_from == "cvs" ) then |
---|
1487 | |
---|
1488 | # Checkout the most recent version of WRF from the NCAR cvs repository, |
---|
1489 | # and pick up the required input data from the anonymous ftp site. |
---|
1490 | |
---|
1491 | cvs checkout -D $thedate WRFV2 |
---|
1492 | find ./WRFV2 -exec touch \{\} \; |
---|
1493 | ftp -n ftp.ucar.edu < ftp_script_data |
---|
1494 | |
---|
1495 | |
---|
1496 | else if ( $acquire_from == "filearg" ) then |
---|
1497 | |
---|
1498 | # A tar file of the WRF source was provided, so that is used, along with |
---|
1499 | # the required input data files from the ftp site. |
---|
1500 | |
---|
1501 | tar xvf $thefile |
---|
1502 | cd WRFV2 |
---|
1503 | clean -a |
---|
1504 | cd .. |
---|
1505 | ftp -n ftp.ucar.edu < ftp_script_data |
---|
1506 | |
---|
1507 | else if ( $acquire_from == "environment" ) then |
---|
1508 | |
---|
1509 | # A tar file of WRF is assumed to be available. |
---|
1510 | |
---|
1511 | tar xvf $thefile |
---|
1512 | |
---|
1513 | endif |
---|
1514 | |
---|
1515 | # And we can stick the input data where we want, the WRFV2 directory has been created. |
---|
1516 | |
---|
1517 | ( cd WRFV2/test/em_real ; ln -sf $thedataem/* . ) |
---|
1518 | ( cd WRFV2/test/nmm_real ; ln -s $thedatanmm/wrf_real* . ; cp $thedatanmm/namelist.input.regtest . ) |
---|
1519 | #DAVE################################################### |
---|
1520 | ( cd WRFV2/test/em_real ; ls -ls ) |
---|
1521 | ( cd WRFV2/test/nmm_real ; ls -ls ) |
---|
1522 | banner 4 |
---|
1523 | #set ans = "$<" |
---|
1524 | #DAVE################################################### |
---|
1525 | |
---|
1526 | # John-specific stuff for maple is the else; part of the "using service machines". |
---|
1527 | |
---|
1528 | if ( ! $clrm ) then |
---|
1529 | pushd WRFV2 |
---|
1530 | else |
---|
1531 | if ( ! -d $TMPDIR ) then |
---|
1532 | echo something wrong 1 |
---|
1533 | endif |
---|
1534 | if ( ! -d $TMPDIR/RUN ) then |
---|
1535 | mkdir $TMPDIR/RUN |
---|
1536 | /bin/rm -fr $TMPDIR/RUN/* |
---|
1537 | endif |
---|
1538 | if ( -d $TMPDIR/RUN ) then |
---|
1539 | tar cf - ./WRFV2/test ./WRFV2/main | ( cd $TMPDIR/RUN ; tar xvf - ) |
---|
1540 | pushd WRFV2 |
---|
1541 | else |
---|
1542 | echo something wrong 2 |
---|
1543 | exit |
---|
1544 | endif |
---|
1545 | endif |
---|
1546 | |
---|
1547 | # Here we initialize our output message. |
---|
1548 | |
---|
1549 | if ( -e ${DEF_DIR}/wrftest.output ) rm ${DEF_DIR}/wrftest.output |
---|
1550 | echo "Architecute: $ARCH[1] machine: `hostname`" >>! ${DEF_DIR}/wrftest.output |
---|
1551 | echo "WRFV2 source from: $acquire_from " >>! ${DEF_DIR}/wrftest.output |
---|
1552 | echo "Number of OpenMP processes to use: $OPENMP" >>! ${DEF_DIR}/wrftest.output |
---|
1553 | echo "Number of MPI processes to use: $Num_Procs" >>! ${DEF_DIR}/wrftest.output |
---|
1554 | set name = ( `grep ^${user}: /etc/passwd | cut -d: -f5` ) |
---|
1555 | echo "Test conducted by $name" >>! ${DEF_DIR}/wrftest.output |
---|
1556 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1557 | echo "Test run from directory ${CUR_DIR}" >>! ${DEF_DIR}/wrftest.output |
---|
1558 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1559 | if ( $?LOADL_JOB_NAME ) then |
---|
1560 | echo "Loadlever job name = ${LOADL_JOB_NAME}" >>! ${DEF_DIR}/wrftest.output |
---|
1561 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1562 | endif |
---|
1563 | echo "Real data case for EM is from $dataset " >>! ${DEF_DIR}/wrftest.output |
---|
1564 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1565 | echo "The em real and ideal forecasts will be nested: $NESTED " >>! ${DEF_DIR}/wrftest.output |
---|
1566 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1567 | if ( $REG_TYPE == BIT4BIT ) then |
---|
1568 | echo "This is a bit-wise (traditional) regression test. " >>! ${DEF_DIR}/wrftest.output |
---|
1569 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1570 | else if ( $REG_TYPE == OPTIMIZED ) then |
---|
1571 | echo "This is a fully optimized regression test. " >>! ${DEF_DIR}/wrftest.output |
---|
1572 | echo "No inter-comparisons are made. " >>! ${DEF_DIR}/wrftest.output |
---|
1573 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1574 | endif |
---|
1575 | if ( $REAL8 == TRUE ) then |
---|
1576 | echo "Floating point precision is 8-bytes" >>! ${DEF_DIR}/wrftest.output |
---|
1577 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1578 | endif |
---|
1579 | if ( $CHEM == TRUE ) then |
---|
1580 | echo "WRF_CHEM tests run for em_real core only, no other cores run" >>! ${DEF_DIR}/wrftest.output |
---|
1581 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1582 | endif |
---|
1583 | if ( $RSL_LITE == TRUE ) then |
---|
1584 | echo "Parallel DM portion using RSL_LITE build option" >>! ${DEF_DIR}/wrftest.output |
---|
1585 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1586 | else if ( $RSL_LITE != TRUE ) then |
---|
1587 | echo "Parallel DM portion using RSL build option" >>! ${DEF_DIR}/wrftest.output |
---|
1588 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1589 | endif |
---|
1590 | if ( $ESMF_LIB == TRUE ) then |
---|
1591 | echo "A separately installed version of the latest ESMF library" >>! ${DEF_DIR}/wrftest.output |
---|
1592 | echo "(NOT the ESMF library included in the WRF tarfile) will" >>! ${DEF_DIR}/wrftest.output |
---|
1593 | echo "be used for MPI tests" >>! ${DEF_DIR}/wrftest.output |
---|
1594 | echo "Setting ESMFLIB = ${ESMFLIBSAVE}" >>! ${DEF_DIR}/wrftest.output |
---|
1595 | echo "Setting ESMFINC = ${ESMFINCSAVE}" >>! ${DEF_DIR}/wrftest.output |
---|
1596 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1597 | endif |
---|
1598 | if ( $QUILT == TRUE ) then |
---|
1599 | echo "One WRF output quilt server will be used for some tests" >>! ${DEF_DIR}/wrftest.output |
---|
1600 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1601 | endif |
---|
1602 | if ( $FDDA == TRUE ) then |
---|
1603 | echo "Running FDDA tests" >>! ${DEF_DIR}/wrftest.output |
---|
1604 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1605 | endif |
---|
1606 | if ( $GENERATE_BASELINE != FALSE ) then |
---|
1607 | echo "WRF output will be archived in baseline directory ${GENERATE_BASELINE} for some tests" >>! \ |
---|
1608 | ${DEF_DIR}/wrftest.output |
---|
1609 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1610 | endif |
---|
1611 | if ( $COMPARE_BASELINE != FALSE ) then |
---|
1612 | echo "WRF output will be compared with files in baseline directory ${COMPARE_BASELINE} for some tests" >>! \ |
---|
1613 | ${DEF_DIR}/wrftest.output |
---|
1614 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1615 | endif |
---|
1616 | echo "The selected I/O option is $IO_FORM ($IO_FORM_NAME[$IO_FORM])" >>! ${DEF_DIR}/wrftest.output |
---|
1617 | if ( $IO_FORM_WHICH[$IO_FORM] == IO ) then |
---|
1618 | echo "This option is for both input and history files" >>! ${DEF_DIR}/wrftest.output |
---|
1619 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1620 | else if ( $IO_FORM_WHICH[$IO_FORM] == I ) then |
---|
1621 | echo "This option is for input files only" >>! ${DEF_DIR}/wrftest.output |
---|
1622 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1623 | else if ( $IO_FORM_WHICH[$IO_FORM] == O ) then |
---|
1624 | echo "This option is for history files only" >>! ${DEF_DIR}/wrftest.output |
---|
1625 | echo " " >>! ${DEF_DIR}/wrftest.output |
---|
1626 | endif |
---|
1627 | |
---|
1628 | cat ${CUR_DIR}/version_info >>! ${DEF_DIR}/wrftest.output |
---|
1629 | |
---|
1630 | # There are three WRF em executables to be considered that can run in threaded and |
---|
1631 | # distributed memory. The 2d hills and 2d squall lines cannot be parallelized with |
---|
1632 | # MPI, and are therefore not considered in this shell. The nmm is only run with |
---|
1633 | # distributed memory (1 vs 4 procs). |
---|
1634 | |
---|
1635 | set first_time_in = TRUE |
---|
1636 | foreach core ( $CORES ) |
---|
1637 | #DAVE################################################### |
---|
1638 | echo doing core $core |
---|
1639 | banner 5 |
---|
1640 | #set ans = "$<" |
---|
1641 | #DAVE################################################### |
---|
1642 | |
---|
1643 | # Some sleight of hand is required for the chemistry tests because we need to |
---|
1644 | # build it twice. But normally, we only build with different real vs ideal, or em vs nmm. |
---|
1645 | # What to do, what to do? Well, we ask for em_real TWICE. The first time we build without chemistry |
---|
1646 | # activated, the second time with it activated. The first time, we do a single |
---|
1647 | # test, the second time through, we do the other 5 tests. |
---|
1648 | |
---|
1649 | if ( ( $CHEM == TRUE ) && ( ${#CORES} == 2 ) && ( $first_time_in == TRUE ) ) then |
---|
1650 | setenv WRF_CHEM 0 |
---|
1651 | set PHYSOPTS = ( 1 ) |
---|
1652 | set first_time_in = FALSE |
---|
1653 | else if ( ( $CHEM == TRUE ) && ( ${#CORES} == 2 ) && ( $first_time_in != TRUE ) ) then |
---|
1654 | setenv WRF_CHEM 1 |
---|
1655 | set PHYSOPTS = ( 2 3 4 5 6 ) |
---|
1656 | endif |
---|
1657 | |
---|
1658 | # Cores to test. |
---|
1659 | |
---|
1660 | set ZAP_SERIAL_FOR_THIS_CORE = FALSE |
---|
1661 | set ZAP_OPENMP_FOR_THIS_CORE = FALSE |
---|
1662 | if ( `echo $core | cut -c 1-2` == em ) then |
---|
1663 | setenv WRF_EM_CORE 1 |
---|
1664 | setenv WRF_NMM_CORE 0 |
---|
1665 | setenv WRF_COAMPS_CORE 0 |
---|
1666 | setenv WRF_EXP_CORE 0 |
---|
1667 | set ZAP_SERIAL_FOR_THIS_CORE = FALSE |
---|
1668 | set ZAP_OPENMP_FOR_THIS_CORE = FALSE |
---|
1669 | else if ( `echo $core | cut -c 1-3` == nmm ) then |
---|
1670 | setenv WRF_EM_CORE 0 |
---|
1671 | setenv WRF_NMM_CORE 1 |
---|
1672 | setenv WRF_COAMPS_CORE 0 |
---|
1673 | setenv WRF_EXP_CORE 0 |
---|
1674 | set ZAP_SERIAL_FOR_THIS_CORE = TRUE |
---|
1675 | set ZAP_OPENMP_FOR_THIS_CORE = TRUE |
---|
1676 | endif |
---|
1677 | |
---|
1678 | # Here we are looping over all of the various compilation configurations, |
---|
1679 | # such as serial only, OpenMP only, MPI only, etc. Each architecture |
---|
1680 | # has its own list of these options. We build each of the executables for |
---|
1681 | # this particular ${core}. |
---|
1682 | |
---|
1683 | foreach compopt ( $COMPOPTS ) |
---|
1684 | #DAVE################################################### |
---|
1685 | echo doing compile option $compopt |
---|
1686 | banner 6 |
---|
1687 | #set ans = "$<" |
---|
1688 | #DAVE################################################### |
---|
1689 | |
---|
1690 | # We sometimes are interested in bypassing the OpenMP option. |
---|
1691 | |
---|
1692 | if ( $compopt == $COMPOPTS[2] ) then |
---|
1693 | if ( $ZAP_OPENMP == TRUE || $ZAP_OPENMP_FOR_THIS_CORE == TRUE ) then |
---|
1694 | goto GOT_THIS_EXEC |
---|
1695 | endif |
---|
1696 | endif |
---|
1697 | |
---|
1698 | # NMM only runs parallel |
---|
1699 | if ( $compopt == $COMPOPTS[1] ) then |
---|
1700 | if ( $ZAP_SERIAL == TRUE || $ZAP_SERIAL_FOR_THIS_CORE == TRUE ) then |
---|
1701 | goto GOT_THIS_EXEC |
---|
1702 | endif |
---|
1703 | endif |
---|
1704 | |
---|
1705 | if ( `uname` == AIX ) goto BUILD_REGARDLESS |
---|
1706 | |
---|
1707 | # Did we already build this one? |
---|
1708 | |
---|
1709 | if ( $core == em_real ) then |
---|
1710 | if ( ( $compopt == $COMPOPTS[1] ) && \ |
---|
1711 | ( -e main/wrf_${core}.exe.$compopt ) && \ |
---|
1712 | ( -e main/real_${core}.exe.1 ) && \ |
---|
1713 | ( -e ${DEF_DIR}/regression_test/WRFV2/external/$IO_FORM_NAME[$IO_FORM]/diffwrf ) ) then |
---|
1714 | goto GOT_THIS_EXEC |
---|
1715 | else if ( ( $compopt != $COMPOPTS[1] ) && \ |
---|
1716 | ( -e main/wrf_${core}.exe.$compopt ) && \ |
---|
1717 | ( -e ${DEF_DIR}/regression_test/WRFV2/external/$IO_FORM_NAME[$IO_FORM]/diffwrf ) ) then |
---|
1718 | goto GOT_THIS_EXEC |
---|
1719 | endif |
---|
1720 | else |
---|
1721 | if ( ( $compopt == $COMPOPTS[1] ) && \ |
---|
1722 | ( -e main/wrf_${core}.exe.$compopt ) && \ |
---|
1723 | ( -e main/ideal_${core}.exe.1 ) && \ |
---|
1724 | ( -e ${DEF_DIR}/regression_test/WRFV2/external/$IO_FORM_NAME[$IO_FORM]/diffwrf ) ) then |
---|
1725 | goto GOT_THIS_EXEC |
---|
1726 | else if ( ( $compopt != $COMPOPTS[1] ) && \ |
---|
1727 | ( -e main/wrf_${core}.exe.$compopt ) && \ |
---|
1728 | ( -e ${DEF_DIR}/regression_test/WRFV2/external/$IO_FORM_NAME[$IO_FORM]/diffwrf ) ) then |
---|
1729 | goto GOT_THIS_EXEC |
---|
1730 | endif |
---|
1731 | endif |
---|
1732 | |
---|
1733 | BUILD_REGARDLESS: |
---|
1734 | |
---|
1735 | # The WRF configuration file works with a single integer |
---|
1736 | # input, which is the compiler option. By convention, option $COMPOPTS[1] is |
---|
1737 | # serial, $COMPOPTS[2] is OMP, and $COMPOPTS[3] is MPI. |
---|
1738 | |
---|
1739 | # Print info about use of separately installed ESMF library. |
---|
1740 | set esmf_lib_str = " - - - - - - - - - - - - - " |
---|
1741 | if ( $ESMF_LIB == TRUE ) then |
---|
1742 | # only test ESMF with MPI |
---|
1743 | if ( $compopt == $COMPOPTS[3] ) then |
---|
1744 | echo "A separately installed version of the latest ESMF library" >>! ${DEF_DIR}/wrftest.output |
---|
1745 | echo "(NOT the ESMF library included in the WRF tarfile) is" >>! ${DEF_DIR}/wrftest.output |
---|
1746 | echo "being used for this test of $core parallel $compopt..." >>! ${DEF_DIR}/wrftest.output |
---|
1747 | set esmf_lib_str = "using separate ESMF library" |
---|
1748 | setenv ESMFLIB $ESMFLIBSAVE |
---|
1749 | setenv ESMFINC $ESMFINCSAVE |
---|
1750 | else |
---|
1751 | unsetenv ESMFLIB |
---|
1752 | unsetenv ESMFINC |
---|
1753 | endif |
---|
1754 | endif |
---|
1755 | |
---|
1756 | #DAVE################################################### |
---|
1757 | echo start build mechanism |
---|
1758 | banner 7 |
---|
1759 | #set ans = "$<" |
---|
1760 | #DAVE################################################### |
---|
1761 | ./clean -a |
---|
1762 | echo $compopt | ./configure |
---|
1763 | |
---|
1764 | # Decide whether this a bit-for-bit run or an fully optimized run. We are just |
---|
1765 | # tinkering with the configure.wrf file optimization here. |
---|
1766 | |
---|
1767 | if ( $REG_TYPE == BIT4BIT ) then |
---|
1768 | if ( `uname` == AIX ) then |
---|
1769 | if ( ( $compopt == $COMPOPTS[1] ) || ( $compopt == $COMPOPTS[3] ) ) then |
---|
1770 | sed -e '/^OMP/d' -e '/^FCOPTIM/d' -e '/^FCDEBUG/s/#/-O0 /g' ./configure.wrf >! foo ; /bin/mv foo configure.wrf |
---|
1771 | else |
---|
1772 | sed -e '/^OMP/s/noauto/noauto:noopt/' \ |
---|
1773 | -e '/^FCOPTIM/d' -e '/^FCDEBUG/s/#/-O0 /g' ./configure.wrf >! foo ; /bin/mv foo configure.wrf |
---|
1774 | endif |
---|
1775 | sed -e 's/-lmassv//g' -e 's/-lmass//g' -e 's/-DNATIVE_MASSV//g' -e '/^FCBASEOPTS/s/#//g' ./configure.wrf >! foo ; /bin/mv foo configure.wrf |
---|
1776 | else if ( `uname` == Linux ) then |
---|
1777 | if ( ( $compopt == $COMPOPTS[1] ) || ( $compopt == $COMPOPTS[3] ) ) then |
---|
1778 | sed -e '/^OMP/d' -e '/^FCOPTIM/d' -e '/^FCDEBUG/s/#-g/-g/g' ./configure.wrf >! foo ; /bin/mv foo configure.wrf |
---|
1779 | else |
---|
1780 | sed -e '/^FCOPTIM/d' -e '/^FCDEBUG/s/#-g/-g/g' ./configure.wrf >! foo ; /bin/mv foo configure.wrf |
---|
1781 | endif |
---|
1782 | sed -e '/^#PGI /s/#PGI / /g' ./configure.wrf >! foo ; /bin/mv foo configure.wrf |
---|
1783 | else if ( `uname` == OSF1 ) then |
---|
1784 | if ( ( $compopt == $COMPOPTS[1] ) || ( $compopt == $COMPOPTS[3] ) ) then |
---|
1785 | sed -e '/^OMP/d' -e '/^FCOPTIM/d' -e '/^FCDEBUG/s/# -g/-O0/g' -e '/^FCDEBUG/s/# -O0/-O0/g' ./configure.wrf >! foo ; /bin/mv foo configure.wrf |
---|
1786 | else |
---|
1787 | sed -e '/^FCOPTIM/d' -e '/^FCDEBUG/s/# -g/-O0/g' -e '/^FCDEBUG/s/# -O0/-O0/g' ./configure.wrf >! foo ; /bin/mv foo configure.wrf |
---|
1788 | endif |
---|
1789 | else |
---|
1790 | if ( ( $compopt == $COMPOPTS[1] ) || ( $compopt == $COMPOPTS[3] ) ) then |
---|
1791 | sed -e '/^OMP/d' -e '/^FCOPTIM/d' -e '/^FCDEBUG/s/#//g' ./configure.wrf >! foo ; /bin/mv foo configure.wrf |
---|
1792 | else |
---|
1793 | sed -e '/^FCOPTIM/d' -e '/^FCDEBUG/s/#//g' ./configure.wrf >! foo ; /bin/mv foo configure.wrf |
---|
1794 | endif |
---|
1795 | endif |
---|
1796 | endif |
---|
1797 | |
---|
1798 | # We also need to modify the configure.wrf file based on whether or not there is |
---|
1799 | # going to be nesting. All regtest em_real nesting runs utilize a moving nest. All of the |
---|
1800 | # ARCHFLAGS macros need to have -DMOVE_NESTS added to the list of options. |
---|
1801 | |
---|
1802 | if ( ( $NESTED == TRUE ) && ( $core == em_real ) ) then |
---|
1803 | sed -e '/^ARCHFLAGS/s/=/= -DMOVE_NESTS/' ./configure.wrf >! foo ; /bin/mv foo configure.wrf |
---|
1804 | endif |
---|
1805 | |
---|
1806 | # The configure.wrf file needs to be adjusted as to whether we are requesting real*4 or real*8 |
---|
1807 | # as the default floating precision. |
---|
1808 | |
---|
1809 | if ( $REAL8 == TRUE ) then |
---|
1810 | sed -e '/^RWORDSIZE/s/\$(NATIVE_RWORDSIZE)/8/' configure.wrf > ! foo ; /bin/mv foo configure.wrf |
---|
1811 | endif |
---|
1812 | |
---|
1813 | #DAVE################################################### |
---|
1814 | echo configure built with optim mods removed, ready to compile |
---|
1815 | banner 8 |
---|
1816 | #set ans = "$<" |
---|
1817 | #DAVE################################################### |
---|
1818 | |
---|
1819 | # The WRF_SRC_ROOT_DIR hack is only used by the OSF1 build. |
---|
1820 | # It works around the annoying fact that in OSF1 $(PWD) does |
---|
1821 | # not change during execution of regtest.csh, despite the "cd" |
---|
1822 | # and "pushd" commands. |
---|
1823 | setenv WRF_SRC_ROOT_DIR "${DEF_DIR}/regression_test/WRFV2" |
---|
1824 | # Build this executable |
---|
1825 | |
---|
1826 | ./compile $core |
---|
1827 | #DAVE################################################### |
---|
1828 | echo compile done |
---|
1829 | banner 9 |
---|
1830 | #set ans = "$<" |
---|
1831 | #DAVE################################################### |
---|
1832 | |
---|
1833 | # Did the compile work? Check the expected executable names and locations. |
---|
1834 | |
---|
1835 | set ok = $status |
---|
1836 | if ( ! -x main/wrf.exe ) set ok = 1 |
---|
1837 | |
---|
1838 | if ( ( $core == em_real ) && ( $compopt == $COMPOPTS[1] ) ) then |
---|
1839 | if ( ! -e main/real.exe ) set ok = 1 |
---|
1840 | else if ( ( $core == nmm_real ) && ( $compopt == $COMPOPTS[3] ) ) then |
---|
1841 | if ( ! -e main/real_nmm.exe ) set ok = 1 |
---|
1842 | else if ( $compopt == $COMPOPTS[1] ) then |
---|
1843 | if ( ! -e main/ideal.exe ) set ok = 1 |
---|
1844 | endif |
---|
1845 | |
---|
1846 | if ( ! -x external/io_netcdf/diffwrf ) set ok = 1 |
---|
1847 | if ( ! -x external/io_int/diffwrf ) set ok = 1 |
---|
1848 | |
---|
1849 | if ( $ok != 0 ) then |
---|
1850 | echo "SUMMARY compilation for $core parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
1851 | $MAIL -s "REGRESSION FAILURE $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
1852 | exit ( 3 ) |
---|
1853 | else |
---|
1854 | echo "SUMMARY compilation for $core parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
1855 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
1856 | mv main/wrf.exe main/wrf_${core}.exe.$compopt |
---|
1857 | if ( ( $core == em_real ) && ( $compopt == $COMPOPTS[1] ) ) then |
---|
1858 | mv main/real.exe main/real_${core}.exe.1 |
---|
1859 | else if ( ( $core == nmm_real ) && ( $compopt == $COMPOPTS[3] ) ) then |
---|
1860 | mv main/real_nmm.exe main/real_${core}.exe.$COMPOPTS[3] |
---|
1861 | else if ( $compopt == $COMPOPTS[1] ) then |
---|
1862 | mv main/ideal.exe main/ideal_${core}.exe.1 |
---|
1863 | endif |
---|
1864 | #DAVE################################################### |
---|
1865 | echo exec exists |
---|
1866 | ls -ls main/*.exe* |
---|
1867 | banner 10 |
---|
1868 | #set ans = "$<" |
---|
1869 | #DAVE################################################### |
---|
1870 | endif |
---|
1871 | |
---|
1872 | GOT_THIS_EXEC: |
---|
1873 | |
---|
1874 | if ( $clrm ) then |
---|
1875 | cp main/*exe* $TMPDIR/RUN/WRFV2/main |
---|
1876 | endif |
---|
1877 | |
---|
1878 | end |
---|
1879 | |
---|
1880 | if ( $clrm ) then |
---|
1881 | pushd $TMPDIR/RUN/WRFV2 |
---|
1882 | endif |
---|
1883 | |
---|
1884 | # We have all of the executables built, now we run'em. This is a loop |
---|
1885 | # over all of the various physics options for this particular |
---|
1886 | # ${core}. Inside the physics loop, we loop over the parallel options. |
---|
1887 | # This allows us to use the same WRF input files for each of the parallel |
---|
1888 | # choices for a single physics loop index. |
---|
1889 | |
---|
1890 | foreach phys_option ( $PHYSOPTS ) |
---|
1891 | #DAVE################################################### |
---|
1892 | echo which phys option $phys_option |
---|
1893 | banner 11 |
---|
1894 | #set ans = "$<" |
---|
1895 | #DAVE################################################### |
---|
1896 | |
---|
1897 | # For each of the executables, we need to run several physics |
---|
1898 | # options. |
---|
1899 | |
---|
1900 | if ( $core == em_real ) then |
---|
1901 | |
---|
1902 | if ( $CHEM != TRUE ) then |
---|
1903 | set filetag=$filetag_real |
---|
1904 | else if ( $CHEM == TRUE ) then |
---|
1905 | if ( $phys_option <= 3 ) then |
---|
1906 | set filetag=$filetag_real[1] |
---|
1907 | else |
---|
1908 | set filetag=$filetag_real[2] |
---|
1909 | endif |
---|
1910 | endif |
---|
1911 | |
---|
1912 | foreach compopt ( $COMPOPTS ) |
---|
1913 | #DAVE################################################### |
---|
1914 | echo real if filetag is $filetag |
---|
1915 | echo compopt = $compopt |
---|
1916 | banner 12 |
---|
1917 | #set ans = "$<" |
---|
1918 | #DAVE################################################### |
---|
1919 | |
---|
1920 | # We sometimes are interested in bypassing the OpenMP option. |
---|
1921 | |
---|
1922 | if ( $compopt == $COMPOPTS[2] ) then |
---|
1923 | if ( $ZAP_OPENMP == TRUE || $ZAP_OPENMP_FOR_THIS_CORE == TRUE ) then |
---|
1924 | goto BYPASS_COMP_LOOP_REAL |
---|
1925 | endif |
---|
1926 | endif |
---|
1927 | |
---|
1928 | if ( $compopt == $COMPOPTS[1] ) then |
---|
1929 | if ( $ZAP_SERIAL == TRUE || $ZAP_SERIAL_FOR_THIS_CORE == TRUE ) then |
---|
1930 | goto BYPASS_COMP_LOOP_REAL |
---|
1931 | endif |
---|
1932 | endif |
---|
1933 | |
---|
1934 | pushd test/$core |
---|
1935 | |
---|
1936 | # |
---|
1937 | # Create the correct namelist.input file for real data cases. |
---|
1938 | # |
---|
1939 | |
---|
1940 | if ( $CHEM != TRUE ) then |
---|
1941 | cp ${CUR_DIR}/phys_real_${phys_option} phys_opt |
---|
1942 | if ( ( $RSL_LITE == TRUE ) && ( $NESTED != TRUE ) ) then |
---|
1943 | cp ${CUR_DIR}/dyn_real_${phys_option} dyn_opt |
---|
1944 | else |
---|
1945 | cp ${CUR_DIR}/dyn_real_SAFE dyn_opt |
---|
1946 | endif |
---|
1947 | cp ${CUR_DIR}/time_real_${phys_option} time_opt |
---|
1948 | cp ${CUR_DIR}/dom_real dom_real |
---|
1949 | if ( -e fdda_opt ) rm fdda_opt |
---|
1950 | cat " grid_fdda=0" > fdda_opt |
---|
1951 | if ( -e fdda_time ) rm fdda_time |
---|
1952 | cat " auxinput4_interval=0" > fdda_time |
---|
1953 | |
---|
1954 | if ( $FDDA == TRUE ) then |
---|
1955 | cp ${CUR_DIR}/fdda_real_${phys_option} fdda_opt |
---|
1956 | cp ${CUR_DIR}/fdda_real_time_${phys_option} fdda_time |
---|
1957 | endif |
---|
1958 | |
---|
1959 | set time_step = `awk ' /^ time_step /{ print $3 } ' namelist.input.$dataset | cut -d, -f1` |
---|
1960 | |
---|
1961 | # Wanna do more/less time steps on the real cases? Easy. Those last two numbers |
---|
1962 | # in the eqns are all you need. Their product must be 60. So, instead of 3 and 20, |
---|
1963 | # (3 coarse grid timesteps), you could use 20 and 3 (20 coarse grid time steps). |
---|
1964 | |
---|
1965 | if ( $NESTED == TRUE ) then |
---|
1966 | @ run_seconds = $time_step * 3 |
---|
1967 | @ history_interval = $time_step / 20 |
---|
1968 | else if ( $NESTED != TRUE ) then |
---|
1969 | @ run_seconds = $time_step * 10 |
---|
1970 | @ history_interval = $time_step / 6 |
---|
1971 | endif |
---|
1972 | rm ed_in namelist.input.temp |
---|
1973 | cat >! ed_in << EOF |
---|
1974 | g/run_seconds/s/[0-9]/$run_seconds |
---|
1975 | g/history_interval/s/[0-9][0-9][0-9]/$history_interval |
---|
1976 | w namelist.input.temp |
---|
1977 | q |
---|
1978 | EOF |
---|
1979 | ed namelist.input.$dataset < ed_in |
---|
1980 | |
---|
1981 | cp ${CUR_DIR}/io_format io_format |
---|
1982 | sed -e '/^ mp_physics/,/ensdim/d' -e '/^ &physics/r ./phys_opt' \ |
---|
1983 | -e '/^ pd_moist/,/pd_tke/d' -e '/^ v_sca_adv_order/r ./dyn_opt' \ |
---|
1984 | -e '/^ auxinput1_inname/d' -e '/^ debug_level/r ./time_opt' \ |
---|
1985 | -e '/^ time_step /,/^ smooth_option/d' -e '/^ &domains/r ./dom_real' \ |
---|
1986 | -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
1987 | -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 200/g' \ |
---|
1988 | -e 's/ run_days *= [0-9][0-9]*/ run_days = 0/g' \ |
---|
1989 | -e 's/ run_hours *= [0-9][0-9]*/ run_hours = 0/g' \ |
---|
1990 | -e 's/ run_minutes *= [0-9][0-9]*/ run_minutes = 0/g' \ |
---|
1991 | -e '/^ &fdda/r fdda_opt' \ |
---|
1992 | -e '/^ debug_level/r fdda_time' \ |
---|
1993 | namelist.input.temp >! namelist.input |
---|
1994 | |
---|
1995 | # The chem run has its own namelist, due to special input files (io_form not tested for chem) |
---|
1996 | |
---|
1997 | else if ( $CHEM == TRUE ) then |
---|
1998 | cp namelist.input.chem_test_${phys_option} namelist.input |
---|
1999 | if ( -e wrf_real_input_em.d01.${filetag} ) then |
---|
2000 | \rm wrf_real_input_em.d01.* |
---|
2001 | endif |
---|
2002 | if ( ${phys_option} <= 3 ) then |
---|
2003 | ln -s 00z/wrf_real* . |
---|
2004 | else |
---|
2005 | ln -s 12z/wrf_real* . |
---|
2006 | endif |
---|
2007 | |
---|
2008 | endif |
---|
2009 | |
---|
2010 | # WRF output quilt servers are only tested for MPI configuration. |
---|
2011 | # Currently, only one WRF output quilt server is used. |
---|
2012 | |
---|
2013 | if ( $QUILT == TRUE ) then |
---|
2014 | if ( $compopt == $COMPOPTS[3] ) then |
---|
2015 | # For now, test only one group of one output quilt servers. |
---|
2016 | sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \ |
---|
2017 | -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \ |
---|
2018 | namelist.input >! namelist.input.temp |
---|
2019 | mv -f namelist.input.temp namelist.input |
---|
2020 | echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled." |
---|
2021 | echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output |
---|
2022 | endif |
---|
2023 | endif |
---|
2024 | |
---|
2025 | /bin/cp namelist.input $TMPDIR/namelist.input.$core.${phys_option}.$compopt |
---|
2026 | #DAVE################################################### |
---|
2027 | echo built namelist $TMPDIR/namelist.input.$core.${phys_option}.$compopt |
---|
2028 | cat $TMPDIR/namelist.input.$core.${phys_option}.$compopt |
---|
2029 | echo need history interval to be 30 |
---|
2030 | banner 13 |
---|
2031 | #set ans = "$<" |
---|
2032 | #DAVE################################################### |
---|
2033 | #DAVE################################################### |
---|
2034 | echo skipped link of data files, we push them elsewhere |
---|
2035 | ls -ls wrf_real* |
---|
2036 | banner 14 |
---|
2037 | #set ans = "$<" |
---|
2038 | #DAVE################################################### |
---|
2039 | |
---|
2040 | # If this is the serial code, generate the IC and BC. The real.exe program is not |
---|
2041 | # parallelized, so the data is generated and saved for the rest of the parallel tests. |
---|
2042 | # This data is necessarily updated for each of the physics tests. |
---|
2043 | |
---|
2044 | if ( $compopt == $COMPOPTS[1] ) then |
---|
2045 | |
---|
2046 | # Zap any old input data laying around. |
---|
2047 | |
---|
2048 | rm wrfinput_d01 >& /dev/null |
---|
2049 | rm wrfbdy_d01 >& /dev/null |
---|
2050 | |
---|
2051 | if ( $NESTED == TRUE ) then |
---|
2052 | setenv OMP_NUM_THREADS 1 |
---|
2053 | if ( `uname` == AIX ) then |
---|
2054 | setenv XLSMPOPTS "parthds=1" |
---|
2055 | endif |
---|
2056 | $SERIALRUNCOMMAND ../../main/real_${core}.exe.1 >! print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
2057 | else if ( $NESTED != TRUE ) then |
---|
2058 | ../../main/real_${core}.exe.1 >! print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
2059 | endif |
---|
2060 | #DAVE################################################### |
---|
2061 | echo finished real |
---|
2062 | banner 15 |
---|
2063 | #set ans = "$<" |
---|
2064 | #DAVE################################################### |
---|
2065 | |
---|
2066 | grep "SUCCESS COMPLETE" print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt} >& /dev/null |
---|
2067 | set success = $status |
---|
2068 | |
---|
2069 | # Did making the IC BC files work? |
---|
2070 | |
---|
2071 | if ( ( -e wrfinput_d01 ) && ( -e wrfbdy_d01 ) && ( $success == 0 ) ) then |
---|
2072 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2073 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2074 | else |
---|
2075 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2076 | $MAIL -s "WRF FAIL making IC/BC $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2077 | exit ( 4 ) |
---|
2078 | endif |
---|
2079 | #DAVE################################################### |
---|
2080 | echo IC BC must be OK |
---|
2081 | ls -ls wrfi* wrfb* |
---|
2082 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
2083 | ncdump -v Times wrfb* | tail -20 |
---|
2084 | endif |
---|
2085 | banner 16 |
---|
2086 | #set ans = "$<" |
---|
2087 | #DAVE################################################### |
---|
2088 | endif |
---|
2089 | |
---|
2090 | # Run the forecast for this core, physics package and parallel option |
---|
2091 | |
---|
2092 | rm $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt >& /dev/null |
---|
2093 | |
---|
2094 | # The chem run has its own set of namelists, due to special input files. |
---|
2095 | |
---|
2096 | if ( $CHEM == TRUE ) then |
---|
2097 | |
---|
2098 | # WRF output quilt servers are only tested for MPI configuration. |
---|
2099 | # Currently, only one WRF output quilt server is used. |
---|
2100 | |
---|
2101 | if ( $QUILT == TRUE ) then |
---|
2102 | if ( $compopt == $COMPOPTS[3] ) then |
---|
2103 | # For now, test only one group of one output quilt servers. |
---|
2104 | sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \ |
---|
2105 | -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \ |
---|
2106 | namelist.input >! namelist.input.temp |
---|
2107 | mv -f namelist.input.temp namelist.input |
---|
2108 | echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled." |
---|
2109 | echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output |
---|
2110 | endif |
---|
2111 | endif |
---|
2112 | endif |
---|
2113 | |
---|
2114 | if ( $compopt == $COMPOPTS[1] ) then |
---|
2115 | setenv OMP_NUM_THREADS 1 |
---|
2116 | if ( `uname` == AIX ) then |
---|
2117 | setenv XLSMPOPTS "parthds=1" |
---|
2118 | endif |
---|
2119 | if ( $NESTED == TRUE ) then |
---|
2120 | $SERIALRUNCOMMAND ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}.exe |
---|
2121 | else if ( $NESTED != TRUE ) then |
---|
2122 | ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}.exe |
---|
2123 | endif |
---|
2124 | else if ( $compopt == $COMPOPTS[2] ) then |
---|
2125 | setenv OMP_NUM_THREADS $OPENMP |
---|
2126 | if ( `uname` == AIX ) then |
---|
2127 | setenv XLSMPOPTS "parthds=${OPENMP}" |
---|
2128 | endif |
---|
2129 | if ( $NESTED == TRUE ) then |
---|
2130 | $OMPRUNCOMMAND ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}.exe |
---|
2131 | else if ( $NESTED != TRUE ) then |
---|
2132 | ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}.exe |
---|
2133 | endif |
---|
2134 | else if ( $compopt == $COMPOPTS[3] ) then |
---|
2135 | setenv OMP_NUM_THREADS 1 |
---|
2136 | if ( `uname` == AIX ) then |
---|
2137 | setenv XLSMPOPTS "parthds=1" |
---|
2138 | endif |
---|
2139 | $MPIRUNCOMMAND ../../main/wrf_${core}.exe.$compopt $MPIRUNCOMMANDPOST |
---|
2140 | mv rsl.error.0000 print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}.exe |
---|
2141 | endif |
---|
2142 | #DAVE################################################### |
---|
2143 | echo ran wrf fcst compopt = $compopt |
---|
2144 | banner 17 |
---|
2145 | #set ans = "$<" |
---|
2146 | #DAVE################################################### |
---|
2147 | |
---|
2148 | grep "SUCCESS COMPLETE" print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}.exe |
---|
2149 | set success = $status |
---|
2150 | |
---|
2151 | # Did making the forecast work, by that, we mean "is there an output file created", and "are there 2 times periods". |
---|
2152 | |
---|
2153 | if ( ( -e wrfout_d01_${filetag} ) && ( $success == 0 ) ) then |
---|
2154 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
2155 | ncdump -h wrfout_d01_${filetag} | grep Time | grep UNLIMITED | grep currently | grep -q 2 |
---|
2156 | set ok = $status |
---|
2157 | set found_nans = 1 |
---|
2158 | if ( `uname` == AIX ) then |
---|
2159 | ncdump wrfout_d01_${filetag} | grep NaN >& /dev/null |
---|
2160 | set found_nans = $status |
---|
2161 | else if ( `uname` == OSF1 ) then |
---|
2162 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
2163 | # set found_nans = $status |
---|
2164 | else if ( `uname` == Linux ) then |
---|
2165 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
2166 | set found_nans = $status |
---|
2167 | endif |
---|
2168 | if ( $found_nans == 0 ) then |
---|
2169 | echo found nans |
---|
2170 | set ok = 1 |
---|
2171 | endif |
---|
2172 | |
---|
2173 | else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1 ) then |
---|
2174 | # set joe_times = `../../external/io_grib1/wgrib -s -4yr wrfout_d01_${filetag} | grep -v ":anl:" | wc -l` |
---|
2175 | # if ( $joe_times >= 100 ) then |
---|
2176 | set joe_times = `../../external/io_grib1/wgrib -s -4yr wrfout_d01_${filetag} | grep "UGRD:10 m" | wc -l` |
---|
2177 | if ( $joe_times == 2 ) then |
---|
2178 | set ok = 0 |
---|
2179 | else |
---|
2180 | set ok = 1 |
---|
2181 | endif |
---|
2182 | endif |
---|
2183 | if ( $ok == 0 ) then |
---|
2184 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2185 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2186 | else |
---|
2187 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2188 | $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2189 | exit ( 5 ) |
---|
2190 | endif |
---|
2191 | else |
---|
2192 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2193 | $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2194 | exit ( 6 ) |
---|
2195 | endif |
---|
2196 | #DAVE################################################### |
---|
2197 | echo success or failure of fcst |
---|
2198 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
2199 | ncdump -v Times wrfout_d01_${filetag} | tail -20 |
---|
2200 | endif |
---|
2201 | banner 18 |
---|
2202 | #set ans = "$<" |
---|
2203 | #DAVE################################################### |
---|
2204 | |
---|
2205 | # We have to save this output file for our biggy comparison after all of the |
---|
2206 | # parallel options have been considered. |
---|
2207 | |
---|
2208 | mv wrfout_d01_${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt |
---|
2209 | |
---|
2210 | # To save space, we move the executables after we are finished with them. |
---|
2211 | |
---|
2212 | if ( $phys_option == $PHYSOPTS[${#PHYSOPTS}] ) then |
---|
2213 | mv ../../main/wrf_${core}.exe.$compopt $TMPDIR/wrf_${core}.exe.$compopt |
---|
2214 | endif |
---|
2215 | |
---|
2216 | popd |
---|
2217 | |
---|
2218 | BYPASS_COMP_LOOP_REAL: |
---|
2219 | |
---|
2220 | end |
---|
2221 | |
---|
2222 | else if ( $core == nmm_real ) then |
---|
2223 | #DAVE################################################### |
---|
2224 | echo doing nmm pre |
---|
2225 | banner 19 |
---|
2226 | #set ans = "$<" |
---|
2227 | #DAVE################################################### |
---|
2228 | |
---|
2229 | set compopt = $COMPOPTS[3] # ! parallel only |
---|
2230 | set filetag = 2005-01-23_00:00:00 |
---|
2231 | set phys_option=1 |
---|
2232 | pushd test/$core |
---|
2233 | |
---|
2234 | #DAVE################################################### |
---|
2235 | echo did rms |
---|
2236 | echo $filetag $phys_option |
---|
2237 | banner 19a |
---|
2238 | #set ans = "$<" |
---|
2239 | #DAVE################################################### |
---|
2240 | |
---|
2241 | # Build NMM namelist |
---|
2242 | |
---|
2243 | cp ${CUR_DIR}/io_format io_format |
---|
2244 | sed -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
2245 | namelist.input.regtest >! namelist.input.temp |
---|
2246 | |
---|
2247 | # A fairly short forecast, 10 time steps |
---|
2248 | |
---|
2249 | sed -e 's/^ run_days *= *[0-9]*/ run_days = 0 /' \ |
---|
2250 | -e 's/^ run_seconds *= *[0-9]*/ run_seconds = 900 /' \ |
---|
2251 | -e 's/^ history_interval *= *[0-9][0-9]*/ history_interval = 15 /' \ |
---|
2252 | -e 's/^ frames_per_outfile *= [0-9]*/ frames_per_outfile = 200/g' \ |
---|
2253 | namelist.input.temp >! namelist.input |
---|
2254 | |
---|
2255 | #DAVE################################################### |
---|
2256 | echo did cp of namelist |
---|
2257 | ls -ls namelist.input |
---|
2258 | cat namelist.input |
---|
2259 | banner 19b |
---|
2260 | #set ans = "$<" |
---|
2261 | #DAVE################################################### |
---|
2262 | |
---|
2263 | # Generate IC/BC for NMM run |
---|
2264 | |
---|
2265 | set RUNCOMMAND = `echo $MPIRUNCOMMAND | sed "s/$Num_Procs/1/"` |
---|
2266 | |
---|
2267 | # Zap any old input data laying around. |
---|
2268 | |
---|
2269 | rm wrfinput_d01 >& /dev/null |
---|
2270 | rm wrfbdy_d01 >& /dev/null |
---|
2271 | |
---|
2272 | $RUNCOMMAND ../../main/real_${core}.exe.$COMPOPTS[3] >! print.out.real_${core}_Phys=${phys_option}_Parallel=$COMPOPTS[3] |
---|
2273 | #DAVE################################################### |
---|
2274 | echo finished real |
---|
2275 | banner 19c |
---|
2276 | #set ans = "$<" |
---|
2277 | #DAVE################################################### |
---|
2278 | |
---|
2279 | mv rsl.out.0000 print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt} |
---|
2280 | grep "SUCCESS COMPLETE" print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt} >& /dev/null |
---|
2281 | set success = $status |
---|
2282 | |
---|
2283 | # Did making the IC BC files work? |
---|
2284 | |
---|
2285 | if ( ( -e wrfinput_d01 ) && ( -e wrfbdy_d01 ) && ( $success == 0 ) ) then |
---|
2286 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2287 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2288 | else |
---|
2289 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2290 | $MAIL -s "WRF FAIL making IC/BC $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2291 | exit ( 4 ) |
---|
2292 | endif |
---|
2293 | #DAVE################################################### |
---|
2294 | echo IC BC must be OK |
---|
2295 | ls -lsL wrfinput* wrfb* |
---|
2296 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
2297 | ncdump -v Times wrfb* | tail -20 |
---|
2298 | endif |
---|
2299 | banner 20 |
---|
2300 | #set ans = "$<" |
---|
2301 | #DAVE################################################### |
---|
2302 | |
---|
2303 | # Run on 1 and then on Num_Procs processors |
---|
2304 | |
---|
2305 | foreach n ( 1 $Num_Procs ) |
---|
2306 | #DAVE################################################### |
---|
2307 | echo running nmm on $n procs |
---|
2308 | banner 21 |
---|
2309 | #set ans = "$<" |
---|
2310 | #DAVE################################################### |
---|
2311 | |
---|
2312 | if ( ( $n != 1 ) && ( $QUILT != TRUE ) ) then |
---|
2313 | @ nmm_proc = $Num_Procs |
---|
2314 | cat >! nproc_xy << EOF |
---|
2315 | nproc_x = $nmm_proc |
---|
2316 | nproc_y = 1 |
---|
2317 | EOF |
---|
2318 | sed -e '/^ numtiles/r nproc_xy' namelist.input >! file.foo |
---|
2319 | mv file.foo namelist.input |
---|
2320 | else if ( ( $n != 1 ) && ( $QUILT == TRUE ) ) then |
---|
2321 | @ nmm_proc = $Num_Procs - 1 |
---|
2322 | cat >! nproc_xy << EOF |
---|
2323 | nproc_x = $nmm_proc |
---|
2324 | nproc_y = 1 |
---|
2325 | EOF |
---|
2326 | sed -e '/^ numtiles/r nproc_xy' namelist.input >! file.foo |
---|
2327 | mv file.foo namelist.input |
---|
2328 | endif |
---|
2329 | |
---|
2330 | if ( `uname` == AIX ) then |
---|
2331 | set RUNCOMMAND = $MPIRUNCOMMAND |
---|
2332 | else |
---|
2333 | set RUNCOMMAND = `echo $MPIRUNCOMMAND | sed "s/$Num_Procs/$n/"` |
---|
2334 | endif |
---|
2335 | |
---|
2336 | # WRF output quilt servers are only tested for MPI configuration. |
---|
2337 | # Currently, only one WRF output quilt server is used. |
---|
2338 | |
---|
2339 | if ( ( $QUILT == TRUE ) && ( $n == $Num_Procs ) ) then |
---|
2340 | if ( $compopt == $COMPOPTS[3] ) then |
---|
2341 | # For now, test only one group of one output quilt servers. |
---|
2342 | sed -e 's/ nio_tasks_per_group *= *[0-9]*/ nio_tasks_per_group = 1/g' \ |
---|
2343 | -e 's/ nio_groups *= *[0-9]*/ nio_groups = 1/g' \ |
---|
2344 | namelist.input >! namelist.input.temp |
---|
2345 | mv -f namelist.input.temp namelist.input |
---|
2346 | echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled." |
---|
2347 | echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output |
---|
2348 | endif |
---|
2349 | endif |
---|
2350 | |
---|
2351 | # NMM can fail on spurious fp exceptions that don't affect soln. Retry if necessary. |
---|
2352 | |
---|
2353 | set tries=0 |
---|
2354 | while ( $tries < 2 ) |
---|
2355 | #DAVE################################################### |
---|
2356 | echo try attempt $tries allowed to be less than 2 |
---|
2357 | banner 22 |
---|
2358 | #set ans = "$<" |
---|
2359 | #DAVE################################################### |
---|
2360 | @ tries = $tries + 1 |
---|
2361 | $RUNCOMMAND ../../main/wrf_${core}.exe.$compopt $MPIRUNCOMMANDPOST |
---|
2362 | mv rsl.error.0000 print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}.exe_${n}p |
---|
2363 | grep "SUCCESS COMPLETE" print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}.exe_${n}p |
---|
2364 | set success = $status |
---|
2365 | set ok = $status |
---|
2366 | if ( ( -e wrfout_d01_${filetag} ) && ( $success == 0 ) ) then |
---|
2367 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
2368 | ncdump -h wrfout_d01_${filetag} | grep Time | grep UNLIMITED | grep currently | grep -q 2 |
---|
2369 | set ok = $status |
---|
2370 | set found_nans = 1 |
---|
2371 | if ( `uname` == AIX ) then |
---|
2372 | ncdump wrfout_d01_${filetag} | grep NaN >& /dev/null |
---|
2373 | set found_nans = $status |
---|
2374 | else if ( `uname` == OSF1 ) then |
---|
2375 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
2376 | # set found_nans = $status |
---|
2377 | else if ( `uname` == Linux ) then |
---|
2378 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
2379 | set found_nans = $status |
---|
2380 | endif |
---|
2381 | if ( $found_nans == 0 ) then |
---|
2382 | echo found nans |
---|
2383 | set ok = 1 |
---|
2384 | endif |
---|
2385 | |
---|
2386 | else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1 ) then |
---|
2387 | ../../external/io_grib1/wgrib -s -4yr wrfout_d01_${filetag} | grep "UGRD:10 m above gnd:3600 sec fcst" |
---|
2388 | set ok = $status |
---|
2389 | endif |
---|
2390 | if ( $ok == 0 ) then |
---|
2391 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2392 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2393 | set tries=2 # success, bail from loop |
---|
2394 | else |
---|
2395 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2396 | $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2397 | if ( $tries == 2 ) exit ( 5 ) |
---|
2398 | endif |
---|
2399 | else |
---|
2400 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2401 | $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2402 | if ( $tries == 2 ) exit ( 6 ) |
---|
2403 | endif |
---|
2404 | mv wrfout_d01_${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.${compopt}_${n}p |
---|
2405 | #DAVE################################################### |
---|
2406 | echo did nmm fcst |
---|
2407 | ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.${compopt}_${n}p |
---|
2408 | banner 23 |
---|
2409 | #set ans = "$<" |
---|
2410 | #DAVE################################################### |
---|
2411 | end |
---|
2412 | end |
---|
2413 | |
---|
2414 | popd |
---|
2415 | |
---|
2416 | else |
---|
2417 | |
---|
2418 | #DAVE################################################### |
---|
2419 | echo doing ideal runs |
---|
2420 | banner 24 |
---|
2421 | #set ans = "$<" |
---|
2422 | #DAVE################################################### |
---|
2423 | # The ideal cases have different physics tests than the real cases. If this is |
---|
2424 | # more that the total number of ideal physics experiments that we were led to |
---|
2425 | # believe would exist, jump to the end of the physics loop. |
---|
2426 | |
---|
2427 | if ( $phys_option > $Max_Ideal_Physics_Options ) then |
---|
2428 | goto BOTTOM_OF_PHYSICS_LOOP |
---|
2429 | endif |
---|
2430 | |
---|
2431 | set filetag=$filetag_ideal |
---|
2432 | |
---|
2433 | foreach compopt ( $COMPOPTS ) |
---|
2434 | #DAVE################################################### |
---|
2435 | echo doing compopt = $compopt |
---|
2436 | echo filetag = $filetag |
---|
2437 | banner 25 |
---|
2438 | #set ans = "$<" |
---|
2439 | #DAVE################################################### |
---|
2440 | |
---|
2441 | |
---|
2442 | # We sometimes are interested in bypassing the OpenMP option. |
---|
2443 | |
---|
2444 | if ( $compopt == $COMPOPTS[2] ) then |
---|
2445 | if ( $ZAP_OPENMP == TRUE ) then |
---|
2446 | goto BYPASS_COMP_LOOP_IDEAL |
---|
2447 | endif |
---|
2448 | endif |
---|
2449 | |
---|
2450 | pushd test/$core |
---|
2451 | |
---|
2452 | if ( ! -e namelist.input.template ) cp namelist.input namelist.input.template |
---|
2453 | |
---|
2454 | # Create the correct namelist.input file. |
---|
2455 | |
---|
2456 | cp ${CUR_DIR}/dom_ideal dom_ideal |
---|
2457 | if ( $core == em_quarter_ss ) then |
---|
2458 | cp ${CUR_DIR}/phys_quarter_ss_${phys_option}a phys_tke |
---|
2459 | cp ${CUR_DIR}/phys_quarter_ss_${phys_option}b phys_mp |
---|
2460 | cp ${CUR_DIR}/phys_quarter_ss_${phys_option}c phys_nh |
---|
2461 | cp ${CUR_DIR}/phys_quarter_ss_${phys_option}d phys_bc |
---|
2462 | else if ( $core == em_b_wave ) then |
---|
2463 | cp ${CUR_DIR}/phys_b_wave_${phys_option}a phys_tke |
---|
2464 | cp ${CUR_DIR}/phys_b_wave_${phys_option}b phys_mp |
---|
2465 | cp ${CUR_DIR}/phys_b_wave_${phys_option}c phys_nh |
---|
2466 | endif |
---|
2467 | |
---|
2468 | cp ${CUR_DIR}/io_format io_format |
---|
2469 | if ( $NESTED == TRUE ) then |
---|
2470 | if ( $core == em_quarter_ss ) then |
---|
2471 | sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \ |
---|
2472 | -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 1/g' \ |
---|
2473 | -e 's/ run_seconds *= *[0-9][0-9]*/ run_seconds = 0/g' \ |
---|
2474 | -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 1/g' \ |
---|
2475 | -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \ |
---|
2476 | -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \ |
---|
2477 | -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
2478 | -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \ |
---|
2479 | -e '/^ non_hydrostatic/d' -e '/^ epssm/r ./phys_nh' \ |
---|
2480 | -e '/^ periodic_x/d' -e '/^ open_xs/d' -e '/^ open_xe/d' \ |
---|
2481 | -e '/^ periodic_y/d' -e '/^ open_ys/d' -e '/^ open_ye/d' \ |
---|
2482 | -e '/^ &bdy_control/r ./phys_bc' \ |
---|
2483 | -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \ |
---|
2484 | ./namelist.input.template >! namelist.input |
---|
2485 | else if ( $core == em_b_wave ) then |
---|
2486 | sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \ |
---|
2487 | -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 20/g' \ |
---|
2488 | -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 20/g' \ |
---|
2489 | -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \ |
---|
2490 | -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \ |
---|
2491 | -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
2492 | -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \ |
---|
2493 | -e '/^ non_hydrostatic/d' -e '/^ epssm/r ./phys_nh' \ |
---|
2494 | -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \ |
---|
2495 | ./namelist.input.template >! namelist.input |
---|
2496 | endif |
---|
2497 | else if ( $NESTED != TRUE ) then |
---|
2498 | if ( $core == em_quarter_ss ) then |
---|
2499 | sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \ |
---|
2500 | -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 2/g' \ |
---|
2501 | -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 2/g' \ |
---|
2502 | -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \ |
---|
2503 | -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \ |
---|
2504 | -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
2505 | -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \ |
---|
2506 | -e '/^ non_hydrostatic/d' -e '/^ epssm/r ./phys_nh' \ |
---|
2507 | -e '/^ periodic_x/d' -e '/^ open_xs/d' -e '/^ open_xe/d' \ |
---|
2508 | -e '/^ periodic_y/d' -e '/^ open_ys/d' -e '/^ open_ye/d' \ |
---|
2509 | -e '/^ &bdy_control/r ./phys_bc' \ |
---|
2510 | -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \ |
---|
2511 | ./namelist.input.template >! namelist.input |
---|
2512 | else if ( $core == em_b_wave ) then |
---|
2513 | sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \ |
---|
2514 | -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 100/g' \ |
---|
2515 | -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 100/g' \ |
---|
2516 | -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \ |
---|
2517 | -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \ |
---|
2518 | -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \ |
---|
2519 | -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \ |
---|
2520 | -e '/^ non_hydrostatic/d' -e '/^ epssm/r ./phys_nh' \ |
---|
2521 | -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \ |
---|
2522 | ./namelist.input.template >! namelist.input |
---|
2523 | endif |
---|
2524 | endif |
---|
2525 | |
---|
2526 | # WRF output quilt servers are only tested for MPI configuration. |
---|
2527 | # Currently, only one WRF output quilt server is used. |
---|
2528 | |
---|
2529 | if ( $QUILT == TRUE ) then |
---|
2530 | if ( $compopt == $COMPOPTS[3] ) then |
---|
2531 | # For now, test only one group of one output quilt servers. |
---|
2532 | sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \ |
---|
2533 | -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \ |
---|
2534 | namelist.input >! namelist.input.temp |
---|
2535 | mv -f namelist.input.temp namelist.input |
---|
2536 | echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled." |
---|
2537 | echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output |
---|
2538 | endif |
---|
2539 | endif |
---|
2540 | #DAVE################################################### |
---|
2541 | echo built namelist |
---|
2542 | ls -ls namelist.input |
---|
2543 | banner 26 |
---|
2544 | #set ans = "$<" |
---|
2545 | #DAVE################################################### |
---|
2546 | |
---|
2547 | # If this is the serial code, generate the IC and BC. The ideal.exe program is not |
---|
2548 | # parallelized, so the data is generated and saved for the rest of the parallel tests. |
---|
2549 | |
---|
2550 | if ( $compopt == $COMPOPTS[1] ) then |
---|
2551 | |
---|
2552 | # Zap any old input data laying around. |
---|
2553 | |
---|
2554 | rm wrfinput_d01 >& /dev/null |
---|
2555 | rm wrfbdy_d01 >& /dev/null |
---|
2556 | |
---|
2557 | ../../main/ideal_${core}.exe.1 >! print.out.ideal_${core}_Parallel=${compopt} |
---|
2558 | #DAVE################################################### |
---|
2559 | echo ran ideal |
---|
2560 | ls -ls wrfiput* |
---|
2561 | banner 27 |
---|
2562 | #set ans = "$<" |
---|
2563 | #DAVE################################################### |
---|
2564 | |
---|
2565 | grep "SUCCESS COMPLETE" print.out.ideal_${core}_Parallel=${compopt} >& /dev/null |
---|
2566 | set success = $status |
---|
2567 | |
---|
2568 | # Did making the IC BC files work? |
---|
2569 | |
---|
2570 | if ( ( -e wrfinput_d01 ) && ( $success == 0 ) ) then |
---|
2571 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2572 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2573 | else |
---|
2574 | echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2575 | $MAIL -s "WRF FAIL making IC/BC $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2576 | exit ( 7 ) |
---|
2577 | endif |
---|
2578 | endif |
---|
2579 | |
---|
2580 | # Run the forecast for this core and parallel option |
---|
2581 | |
---|
2582 | rm $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt >& /dev/null |
---|
2583 | |
---|
2584 | if ( $compopt == $COMPOPTS[1] ) then |
---|
2585 | setenv OMP_NUM_THREADS 1 |
---|
2586 | if ( `uname` == AIX ) then |
---|
2587 | setenv XLSMPOPTS "parthds=1" |
---|
2588 | endif |
---|
2589 | if ( $NESTED == TRUE ) then |
---|
2590 | $SERIALRUNCOMMAND ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}.exe |
---|
2591 | else if ( $NESTED != TRUE ) then |
---|
2592 | ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}.exe |
---|
2593 | endif |
---|
2594 | else if ( $compopt == $COMPOPTS[2] ) then |
---|
2595 | setenv OMP_NUM_THREADS $OPENMP |
---|
2596 | if ( `uname` == AIX ) then |
---|
2597 | setenv XLSMPOPTS "parthds=${OPENMP}" |
---|
2598 | endif |
---|
2599 | if ( $NESTED == TRUE ) then |
---|
2600 | $OMPRUNCOMMAND ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}.exe |
---|
2601 | else if ( $NESTED != TRUE ) then |
---|
2602 | ../../main/wrf_${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}.exe |
---|
2603 | endif |
---|
2604 | else if ( $compopt == $COMPOPTS[3] ) then |
---|
2605 | setenv OMP_NUM_THREADS 1 |
---|
2606 | if ( `uname` == AIX ) then |
---|
2607 | setenv XLSMPOPTS "parthds=1" |
---|
2608 | endif |
---|
2609 | $MPIRUNCOMMAND ../../main/wrf_${core}.exe.$compopt $MPIRUNCOMMANDPOST |
---|
2610 | mv rsl.error.0000 print.out.wrf_${core}_Parallel=${compopt}.exe |
---|
2611 | endif |
---|
2612 | #DAVE################################################### |
---|
2613 | echo ran ideal fcst |
---|
2614 | banner 28 |
---|
2615 | #set ans = "$<" |
---|
2616 | #DAVE################################################### |
---|
2617 | |
---|
2618 | grep "SUCCESS COMPLETE" print.out.wrf_${core}_Parallel=${compopt}.exe |
---|
2619 | set success = $status |
---|
2620 | |
---|
2621 | # Did making the forecast work, by that, we mean "is there an output file created?" |
---|
2622 | |
---|
2623 | if ( ( -e wrfout_d01_${filetag} ) && ( $success == 0 ) ) then |
---|
2624 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
2625 | ncdump -h wrfout_d01_${filetag} | grep Time | grep UNLIMITED | grep currently | grep -q 2 |
---|
2626 | set ok = $status |
---|
2627 | set found_nans = 1 |
---|
2628 | if ( `uname` == AIX ) then |
---|
2629 | ncdump wrfout_d01_${filetag} | grep NaN >& /dev/null |
---|
2630 | set found_nans = $status |
---|
2631 | else if ( `uname` == OSF1 ) then |
---|
2632 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
2633 | # set found_nans = $status |
---|
2634 | else if ( `uname` == Linux ) then |
---|
2635 | ncdump wrfout_d01_${filetag} | grep nan >& /dev/null |
---|
2636 | set found_nans = $status |
---|
2637 | endif |
---|
2638 | if ( $found_nans == 0 ) then |
---|
2639 | echo found nans |
---|
2640 | set ok = 1 |
---|
2641 | endif |
---|
2642 | |
---|
2643 | else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1 ) then |
---|
2644 | # set joe_times = `../../external/io_grib1/wgrib -s -4yr wrfout_d01_${filetag} | grep -v ":anl:" | wc -l` |
---|
2645 | # if ( $joe_times >= 100 ) then |
---|
2646 | set joe_times = `../../external/io_grib1/wgrib -s -4yr wrfout_d01_${filetag} | grep "UGRD:10 m" | wc -l` |
---|
2647 | if ( $joe_times == 2 ) then |
---|
2648 | set ok = 0 |
---|
2649 | else |
---|
2650 | set ok = 1 |
---|
2651 | endif |
---|
2652 | endif |
---|
2653 | if ( $ok == 0 ) then |
---|
2654 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2655 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2656 | else |
---|
2657 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2658 | $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2659 | exit ( 8 ) |
---|
2660 | endif |
---|
2661 | else |
---|
2662 | echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2663 | $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
2664 | exit ( 9 ) |
---|
2665 | endif |
---|
2666 | |
---|
2667 | # We have to save this output file for our biggy comparison after all of the |
---|
2668 | # parallel options have been considered. |
---|
2669 | |
---|
2670 | mv wrfout_d01_${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt |
---|
2671 | |
---|
2672 | # To save space, we move the executables after we are finished with them. |
---|
2673 | |
---|
2674 | if ( $phys_option == $Max_Ideal_Physics_Options ) then |
---|
2675 | mv ../../main/wrf_${core}.exe.$compopt $TMPDIR/wrf_${core}.exe.$compopt |
---|
2676 | endif |
---|
2677 | #DAVE################################################### |
---|
2678 | echo fcst was a success |
---|
2679 | ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt |
---|
2680 | if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf ) then |
---|
2681 | ncdump -v Times $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$compopt | tail -20 |
---|
2682 | endif |
---|
2683 | banner 29 |
---|
2684 | #set ans = "$<" |
---|
2685 | #DAVE################################################### |
---|
2686 | |
---|
2687 | popd |
---|
2688 | |
---|
2689 | BYPASS_COMP_LOOP_IDEAL: |
---|
2690 | |
---|
2691 | end |
---|
2692 | |
---|
2693 | endif |
---|
2694 | |
---|
2695 | # OK, once more, we gotta check if this is a BIT4BIT run. If so then there |
---|
2696 | # are a number of comparisons to do. If this is a an OPTIMIZED run, then the |
---|
2697 | # comparisons will fail the bit-wise comparisons. |
---|
2698 | |
---|
2699 | if ( $REG_TYPE == BIT4BIT) then |
---|
2700 | |
---|
2701 | if ( $core == nmm_real ) then |
---|
2702 | |
---|
2703 | pushd ${DEF_DIR}/regression_test/WRFV2/test/$core |
---|
2704 | set DIFFWRF = ${DEF_DIR}/regression_test/WRFV2/external/$IO_FORM_NAME[$IO_FORM]/diffwrf |
---|
2705 | |
---|
2706 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_1p ) && \ |
---|
2707 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p ) ) then |
---|
2708 | set foo1 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_1p `) |
---|
2709 | set foo2 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p `) |
---|
2710 | set size1 = $foo1[6] |
---|
2711 | set size2 = $foo2[6] |
---|
2712 | if ( $size1 == $size2 ) then |
---|
2713 | set RIGHT_SIZE = TRUE |
---|
2714 | else |
---|
2715 | set RIGHT_SIZE = FALSE |
---|
2716 | endif |
---|
2717 | else |
---|
2718 | set RIGHT_SIZE = FALSE |
---|
2719 | endif |
---|
2720 | |
---|
2721 | # 1p vs Num_Procs MPI |
---|
2722 | |
---|
2723 | rm fort.88 fort.98 >& /dev/null |
---|
2724 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_1p ) && \ |
---|
2725 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p ) && \ |
---|
2726 | ( $RIGHT_SIZE == TRUE ) ) then |
---|
2727 | $DIFFWRF $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_1p \ |
---|
2728 | $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p >& /dev/null |
---|
2729 | else |
---|
2730 | touch fort.88 fort.98 |
---|
2731 | endif |
---|
2732 | if ( ! -e fort.88 ) then |
---|
2733 | echo "SUMMARY 1 vs $Num_Procs MPI for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2734 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2735 | else |
---|
2736 | echo "SUMMARY 1 vs $Num_Procs MPI for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2737 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2738 | endif |
---|
2739 | |
---|
2740 | popd |
---|
2741 | |
---|
2742 | else if ( ${#COMPOPTS} != 1 ) then |
---|
2743 | |
---|
2744 | # If there is only a single parallel option, then we are just trying to |
---|
2745 | # build the serial code. That implies no comparisons are needed. |
---|
2746 | |
---|
2747 | # All of the forecasts for this set of physics and core have been |
---|
2748 | # generated. We now compare the WRF model output files to see |
---|
2749 | # if they are S^2D^2. |
---|
2750 | |
---|
2751 | pushd ${DEF_DIR}/regression_test/WRFV2/test/$core |
---|
2752 | set DIFFWRF = ${DEF_DIR}/regression_test/WRFV2/external/$IO_FORM_NAME[$IO_FORM]/diffwrf |
---|
2753 | |
---|
2754 | # Are we skipping the OpenMP runs? |
---|
2755 | |
---|
2756 | if ( $ZAP_OPENMP == TRUE ) then |
---|
2757 | goto BYPASS_OPENMP_SUMMARY1 |
---|
2758 | endif |
---|
2759 | |
---|
2760 | # Are the files the same size? If not, then only the initial times |
---|
2761 | # will be compared. That means, on a failure to run a forecast, the |
---|
2762 | # diffwrf will give a pass. We need to root out this evil. |
---|
2763 | |
---|
2764 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] ) && \ |
---|
2765 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[2] ) ) then |
---|
2766 | set foo1 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] `) |
---|
2767 | set foo2 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[2] `) |
---|
2768 | set size1 = $foo1[6] |
---|
2769 | set size2 = $foo2[6] |
---|
2770 | if ( $size1 == $size2 ) then |
---|
2771 | set RIGHT_SIZE_OMP = TRUE |
---|
2772 | else |
---|
2773 | set RIGHT_SIZE_OMP = FALSE |
---|
2774 | endif |
---|
2775 | else |
---|
2776 | set RIGHT_SIZE_OMP = FALSE |
---|
2777 | endif |
---|
2778 | |
---|
2779 | BYPASS_OPENMP_SUMMARY1: |
---|
2780 | |
---|
2781 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] ) && \ |
---|
2782 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] ) ) then |
---|
2783 | set foo1 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] `) |
---|
2784 | set foo3 = ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] `) |
---|
2785 | set size1 = $foo1[6] |
---|
2786 | set size3 = $foo3[6] |
---|
2787 | if ( $size1 == $size3 ) then |
---|
2788 | set RIGHT_SIZE_MPI = TRUE |
---|
2789 | else |
---|
2790 | set RIGHT_SIZE_MPI = FALSE |
---|
2791 | endif |
---|
2792 | else |
---|
2793 | set RIGHT_SIZE_MPI = FALSE |
---|
2794 | endif |
---|
2795 | |
---|
2796 | # Are we skipping the OpenMP runs? |
---|
2797 | |
---|
2798 | if ( $ZAP_OPENMP == TRUE ) then |
---|
2799 | goto BYPASS_OPENMP_SUMMARY2 |
---|
2800 | endif |
---|
2801 | |
---|
2802 | # Serial vs OpenMP |
---|
2803 | |
---|
2804 | rm fort.88 fort.98 >& /dev/null |
---|
2805 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] ) && \ |
---|
2806 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[2] ) && \ |
---|
2807 | ( $RIGHT_SIZE_OMP == TRUE ) ) then |
---|
2808 | $DIFFWRF $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] \ |
---|
2809 | $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[2] >& /dev/null |
---|
2810 | else |
---|
2811 | touch fort.88 fort.98 |
---|
2812 | endif |
---|
2813 | if ( ! -e fort.88 ) then |
---|
2814 | echo "SUMMARY serial vs OMP for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2815 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2816 | else |
---|
2817 | echo "SUMMARY serial vs OMP for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2818 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2819 | endif |
---|
2820 | |
---|
2821 | BYPASS_OPENMP_SUMMARY2: |
---|
2822 | |
---|
2823 | # Serial vs MPI |
---|
2824 | |
---|
2825 | rm fort.88 fort.98 >& /dev/null |
---|
2826 | if ( ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] ) && \ |
---|
2827 | ( -e $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] ) && \ |
---|
2828 | ( $RIGHT_SIZE_MPI == TRUE ) ) then |
---|
2829 | $DIFFWRF $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] \ |
---|
2830 | $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] >& /dev/null |
---|
2831 | else |
---|
2832 | touch fort.88 fort.98 |
---|
2833 | endif |
---|
2834 | if ( ! -e fort.88 ) then |
---|
2835 | echo "SUMMARY serial vs MPI for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output |
---|
2836 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2837 | else |
---|
2838 | echo "SUMMARY serial vs MPI for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output |
---|
2839 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
2840 | endif |
---|
2841 | |
---|
2842 | popd |
---|
2843 | |
---|
2844 | endif |
---|
2845 | |
---|
2846 | # Generate and archive baseline or compare against baseline |
---|
2847 | |
---|
2848 | if ( $core != nmm_real ) then |
---|
2849 | if ( $GENERATE_BASELINE != FALSE ) then |
---|
2850 | if ( ! -d $GENERATE_BASELINE ) then |
---|
2851 | echo "ERROR: Baseline directory ${GENERATE_BASELINE} does not exist" >>! \ |
---|
2852 | ${DEF_DIR}/wrftest.output |
---|
2853 | exit ( 10 ) |
---|
2854 | else |
---|
2855 | # Archive serial output file to baseline |
---|
2856 | pushd ${DEF_DIR}/regression_test/WRFV2/test/$core |
---|
2857 | set basefilenm = wrfout_d01_${filetag}.${core}.${phys_option} |
---|
2858 | set basefile = ${GENERATE_BASELINE}/${basefilenm} |
---|
2859 | set outfile = $TMPDIR/${basefilenm}.$COMPOPTS[1] |
---|
2860 | if ( -e $outfile ) then |
---|
2861 | cp $outfile $basefile || \ |
---|
2862 | ( echo "ERROR: cannot copy ${outfile} to ${basefile}" >>! \ |
---|
2863 | ${DEF_DIR}/wrftest.output; exit 10 ) |
---|
2864 | else |
---|
2865 | echo "ERROR: Cannot archive baseline, file $outfile does not exist" >>! \ |
---|
2866 | ${DEF_DIR}/wrftest.output |
---|
2867 | echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option FAIL" >>! \ |
---|
2868 | ${DEF_DIR}/wrftest.output |
---|
2869 | echo "-------------------------------------------------------------" >> \ |
---|
2870 | ${DEF_DIR}/wrftest.output |
---|
2871 | exit ( 10 ) |
---|
2872 | endif |
---|
2873 | echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option PASS" >>! \ |
---|
2874 | ${DEF_DIR}/wrftest.output |
---|
2875 | echo "-------------------------------------------------------------" >> \ |
---|
2876 | ${DEF_DIR}/wrftest.output |
---|
2877 | popd |
---|
2878 | endif |
---|
2879 | endif |
---|
2880 | if ( $COMPARE_BASELINE != FALSE ) then |
---|
2881 | if ( ! -d $COMPARE_BASELINE ) then |
---|
2882 | echo "${0}: ERROR:: Baseline directory ${COMPARE_BASELINE} does not exist" >>! \ |
---|
2883 | ${DEF_DIR}/wrftest.output |
---|
2884 | exit ( 10 ) |
---|
2885 | else |
---|
2886 | # Compare against baseline output file |
---|
2887 | set basefilenm = wrfout_d01_${filetag}.${core}.${phys_option} |
---|
2888 | set basefile = ${COMPARE_BASELINE}/${basefilenm} |
---|
2889 | set DIFFWRF = ${DEF_DIR}/regression_test/WRFV2/external/$IO_FORM_NAME[$IO_FORM]/diffwrf |
---|
2890 | set testdir = ${DEF_DIR}/regression_test/WRFV2/test/$core |
---|
2891 | pushd ${testdir} |
---|
2892 | foreach compopt ( $COMPOPTS ) |
---|
2893 | set cmpfile = $TMPDIR/${basefilenm}.$compopt |
---|
2894 | rm fort.88 fort.98 >& /dev/null |
---|
2895 | if ( ( -e ${basefile} ) && ( -e ${cmpfile} ) ) then |
---|
2896 | # Are the files the same size? If not, then only the initial times |
---|
2897 | # will be compared. That means, on a failure to run a forecast, the |
---|
2898 | # diffwrf will give a pass. We need to root out this evil. |
---|
2899 | set foob = ( ` \ls -ls ${basefile} `) |
---|
2900 | set fooc = ( ` \ls -ls ${cmpfile} `) |
---|
2901 | set sizeb = $foob[6] |
---|
2902 | set sizec = $fooc[6] |
---|
2903 | if ( $sizeb == $sizec ) then |
---|
2904 | $DIFFWRF ${basefile} ${cmpfile} >& /dev/null |
---|
2905 | if ( -e fort.88 ) then |
---|
2906 | echo "FAIL: Baseline comparison, file ${cmpfile} did not match ${basefile} according to diffwrf" >>! \ |
---|
2907 | ${DEF_DIR}/wrftest.output |
---|
2908 | endif |
---|
2909 | else |
---|
2910 | touch fort.88 fort.98 |
---|
2911 | echo "FAIL: Baseline comparison, files ${cmpfile} and ${basefile} have different sizes" >>! \ |
---|
2912 | ${DEF_DIR}/wrftest.output |
---|
2913 | endif |
---|
2914 | else |
---|
2915 | echo "FAIL: Baseline comparison, either ${cmpfile} or ${basefile} does not exist" >>! \ |
---|
2916 | ${DEF_DIR}/wrftest.output |
---|
2917 | touch fort.88 fort.98 |
---|
2918 | endif |
---|
2919 | if ( ! -e fort.88 ) then |
---|
2920 | echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str PASS" >>! \ |
---|
2921 | ${DEF_DIR}/wrftest.output |
---|
2922 | echo "-------------------------------------------------------------" >> \ |
---|
2923 | ${DEF_DIR}/wrftest.output |
---|
2924 | else |
---|
2925 | echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str FAIL" >>! \ |
---|
2926 | ${DEF_DIR}/wrftest.output |
---|
2927 | echo "-------------------------------------------------------------" >> \ |
---|
2928 | ${DEF_DIR}/wrftest.output |
---|
2929 | endif |
---|
2930 | end |
---|
2931 | popd |
---|
2932 | endif |
---|
2933 | endif |
---|
2934 | else if ( $core == nmm_real ) then |
---|
2935 | if ( $GENERATE_BASELINE != FALSE ) then |
---|
2936 | if ( ! -d $GENERATE_BASELINE ) then |
---|
2937 | echo "ERROR: Baseline directory ${GENERATE_BASELINE} does not exist" >>! \ |
---|
2938 | ${DEF_DIR}/wrftest.output |
---|
2939 | exit ( 10 ) |
---|
2940 | else |
---|
2941 | # Archive serial output file to baseline |
---|
2942 | pushd ${DEF_DIR}/regression_test/WRFV2/test/$core |
---|
2943 | set basefilenm = wrfout_d01_${filetag}.${core}.${phys_option} |
---|
2944 | set basefile = ${GENERATE_BASELINE}/${basefilenm} |
---|
2945 | set outfile = $TMPDIR/${basefilenm}.$COMPOPTS[3]_1p |
---|
2946 | if ( -e $outfile ) then |
---|
2947 | cp $outfile $basefile || \ |
---|
2948 | ( echo "ERROR: cannot copy ${outfile} to ${basefile}" >>! \ |
---|
2949 | ${DEF_DIR}/wrftest.output; exit 10 ) |
---|
2950 | else |
---|
2951 | echo "ERROR: Cannot archive baseline, file $outfile does not exist" >>! \ |
---|
2952 | ${DEF_DIR}/wrftest.output |
---|
2953 | echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option FAIL" >>! \ |
---|
2954 | ${DEF_DIR}/wrftest.output |
---|
2955 | echo "-------------------------------------------------------------" >> \ |
---|
2956 | ${DEF_DIR}/wrftest.output |
---|
2957 | exit ( 10 ) |
---|
2958 | endif |
---|
2959 | echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option PASS" >>! \ |
---|
2960 | ${DEF_DIR}/wrftest.output |
---|
2961 | echo "-------------------------------------------------------------" >> \ |
---|
2962 | ${DEF_DIR}/wrftest.output |
---|
2963 | popd |
---|
2964 | endif |
---|
2965 | endif |
---|
2966 | if ( $COMPARE_BASELINE != FALSE ) then |
---|
2967 | if ( ! -d $COMPARE_BASELINE ) then |
---|
2968 | echo "${0}: ERROR:: Baseline directory ${COMPARE_BASELINE} does not exist" >>! \ |
---|
2969 | ${DEF_DIR}/wrftest.output |
---|
2970 | exit ( 10 ) |
---|
2971 | else |
---|
2972 | # Compare against baseline output file |
---|
2973 | set basefilenm = wrfout_d01_${filetag}.${core}.${phys_option} |
---|
2974 | set basefile = ${COMPARE_BASELINE}/${basefilenm} |
---|
2975 | set DIFFWRF = ${DEF_DIR}/regression_test/WRFV2/external/$IO_FORM_NAME[$IO_FORM]/diffwrf |
---|
2976 | set testdir = ${DEF_DIR}/regression_test/WRFV2/test/$core |
---|
2977 | pushd ${testdir} |
---|
2978 | set compopt = $COMPOPTS[3] |
---|
2979 | foreach proc ( 1p 4p ) |
---|
2980 | set cmpfile = $TMPDIR/${basefilenm}.${compopt}_${proc} |
---|
2981 | rm fort.88 fort.98 >& /dev/null |
---|
2982 | if ( ( -e ${basefile} ) && ( -e ${cmpfile} ) ) then |
---|
2983 | # Are the files the same size? If not, then only the initial times |
---|
2984 | # will be compared. That means, on a failure to run a forecast, the |
---|
2985 | # diffwrf will give a pass. We need to root out this evil. |
---|
2986 | set foob = ( ` \ls -ls ${basefile} `) |
---|
2987 | set fooc = ( ` \ls -ls ${cmpfile} `) |
---|
2988 | set sizeb = $foob[6] |
---|
2989 | set sizec = $fooc[6] |
---|
2990 | if ( $sizeb == $sizec ) then |
---|
2991 | $DIFFWRF ${basefile} ${cmpfile} >& /dev/null |
---|
2992 | if ( -e fort.88 ) then |
---|
2993 | echo "FAIL: Baseline comparison, file ${cmpfile} did not match ${basefile} according to diffwrf" >>! \ |
---|
2994 | ${DEF_DIR}/wrftest.output |
---|
2995 | endif |
---|
2996 | else |
---|
2997 | touch fort.88 fort.98 |
---|
2998 | echo "FAIL: Baseline comparison, files ${cmpfile} and ${basefile} have different sizes" >>! \ |
---|
2999 | ${DEF_DIR}/wrftest.output |
---|
3000 | endif |
---|
3001 | else |
---|
3002 | echo "FAIL: Baseline comparison, either ${cmpfile} or ${basefile} does not exist" >>! \ |
---|
3003 | ${DEF_DIR}/wrftest.output |
---|
3004 | touch fort.88 fort.98 |
---|
3005 | endif |
---|
3006 | if ( ! -e fort.88 ) then |
---|
3007 | echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str PASS" >>! \ |
---|
3008 | ${DEF_DIR}/wrftest.output |
---|
3009 | echo "-------------------------------------------------------------" >> \ |
---|
3010 | ${DEF_DIR}/wrftest.output |
---|
3011 | else |
---|
3012 | echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str FAIL" >>! \ |
---|
3013 | ${DEF_DIR}/wrftest.output |
---|
3014 | echo "-------------------------------------------------------------" >> \ |
---|
3015 | ${DEF_DIR}/wrftest.output |
---|
3016 | endif |
---|
3017 | end |
---|
3018 | popd |
---|
3019 | endif |
---|
3020 | endif |
---|
3021 | goto ALL_SHE_WROTE_FOR_NMM |
---|
3022 | endif |
---|
3023 | # End of generate and archive baseline or compare against baseline |
---|
3024 | |
---|
3025 | endif |
---|
3026 | |
---|
3027 | BOTTOM_OF_PHYSICS_LOOP: |
---|
3028 | |
---|
3029 | end |
---|
3030 | |
---|
3031 | ALL_SHE_WROTE_FOR_NMM: |
---|
3032 | |
---|
3033 | echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output |
---|
3034 | |
---|
3035 | if ( $clrm ) then |
---|
3036 | popd |
---|
3037 | endif |
---|
3038 | |
---|
3039 | end |
---|
3040 | |
---|
3041 | |
---|
3042 | # How long did this take. |
---|
3043 | |
---|
3044 | set end = ( `date` ) |
---|
3045 | echo "Start WRF Regression: $start " >> ${DEF_DIR}/wrftest.output |
---|
3046 | echo "End WRF Regression: $end " >> ${DEF_DIR}/wrftest.output |
---|
3047 | |
---|
3048 | # We have done all of the tests, and placed the PASS FAIL labels in the |
---|
3049 | # output file. If there are any FAIL messages, we are in trouble. |
---|
3050 | |
---|
3051 | grep FAIL ${DEF_DIR}/wrftest.output |
---|
3052 | set ok = $status |
---|
3053 | |
---|
3054 | # Send email of the status. |
---|
3055 | |
---|
3056 | if ( $ok == 0 ) then |
---|
3057 | $MAIL -s "REGRESSION FAILURE $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output |
---|
3058 | else |
---|
3059 | $MAIL -s "REGRESSION SUCCESS $ARCH[1] " $GOOD_MAIL < ${DEF_DIR}/wrftest.output |
---|
3060 | endif |
---|
3061 | |
---|
3062 | # Clean left up detritus |
---|
3063 | |
---|
3064 | cd $CUR_DIR |
---|
3065 | |
---|
3066 | rm -rf dom_*eal >& /dev/null |
---|
3067 | rm -rf phys_real_* >& /dev/null |
---|
3068 | rm -rf phys_quarter_* >& /dev/null |
---|
3069 | rm -rf phys_b_wave_* >& /dev/null |
---|
3070 | rm -rf version_info >& /dev/null |
---|
3071 | rm -rf machfile >& /dev/null |
---|
3072 | rm -rf fdda_real* >& /dev/null |
---|
3073 | rm -rf time_real_* >& /dev/null |
---|
3074 | rm -rf dyn_real_* >& /dev/null |
---|