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