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