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