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