3 # #BSUB -x # exlusive use of node (not_shared)
4 # #BSUB -a mpich_gm # at NCAR: lightning
5 # #BSUB -R "span[ptile=2]" # how many tasks per node (1 or 2)
6 #BSUB -a poe # at NCAR: bluevista
7 #BSUB -R "span[ptile=4]" # how many tasks per node (up to 8)
8 #BSUB -n 4 # number of total tasks
9 #BSUB -o regh.out # output filename (%J to add job id)
10 #BSUB -e regh.err # error filename
11 #BSUB -J regtest # job name
12 #BSUB -q share # queue
13 #BSUB -W 12:00 # wallclock time
17 # QSUB -q ded_4 # submit to 4 proc
18 # QSUB -l mpp_p=4 # request 4 processors
19 # QSUB -lT 21600 # max. job time limit is 6 h
20 # QSUB -lF 250Mw # max. job file size limit is 250 Megawords
21 # QSUB -eo # merge error and output into one file
22 # QSUB -o reg.out # output file name
23 # QSUB # there are no further QSUB commands
25 # This is a script to test the bit-for-bit reproducibility of
26 # the WRF model, when comparing single processor serial runs to
27 # OpenMP and MPI parallel runs. There are several regression tests
28 # that are performed. Failed comparisons get reported, but don't
29 # stop the script. Failed builds or forecasts force an exit from
32 # Approximate time for completion of full test suite
33 # Compaq 733 MHz ev67 : 2.5 hours (empty)
34 # Intel 1.2 GHz (4-pe) : 3.0 hours (empty)
35 # IBM P4 : 2.0 hours (empty)
37 # Do we keep running even when there are BAD failures?
39 set KEEP_ON_RUNNING
= FALSE
40 set KEEP_ON_RUNNING
= TRUE
42 # These need to be changed for your particular set of runs. This is
43 # where email gets sent.
45 if ( ( `uname` == AIX
) && ( ( `hostname | cut -c 1-2` != bs
) && \
46 ( `hostname | cut -c 1-2` != bv
) && ( `hostname | cut -c 1-2` != be
) ) ) then
47 set FAIL_MAIL
= ( ${user}@noaa.gov
)
48 set GOOD_MAIL
= ( ${user}@noaa.gov
)
50 setenv MP_EAGER_LIMIT
65536
51 setenv MP_SHARED_MEMORY
yes
52 setenv MP_SINGLE_THREAD
yes
54 setenv MP_STDOUTMODE ordered
56 setenv OMP_NUM_THREADS
4
57 setenv XLSMPOPTS
"parthds=4:spins=0:yields=0:stack=128000000:schedule=static"
58 setenv AIXTHREAD_SCOPE S
59 setenv AIXTHREAD_MNRATIO
1:1
60 setenv SPINLOOPTIME
1000
61 setenv YIELDLOOPTIME
1000
63 set FAIL_MAIL
= ( ${user}@ucar.edu
)
64 set GOOD_MAIL
= ( ${user}@ucar.edu
)
67 unalias cd cp rm ls pushd popd mv
68 if ( ( `uname` == Linux
) ||
( `uname` == Darwin
) ) alias banner echo
70 # Get the command line input
75 set clrm
= 0 # compile local run mmmtmp, for using clsroom cluster and local disk
77 # If this is a batch job (NCAR's IBMs or FSL's Intel and Alpha), we need to muck with the "input"
80 if ( ( `uname` == AIX
) ||
( `hostname` == tempest
) ||
( `hostname | cut -c 1-2` == ln ) ) then
83 set argv
= ( -D today
)
85 set WRFREGFILE
= /mmm
/users
/gill
/wrf.
tar
86 if ( ( `uname` == AIX
) && ( ( `hostname | cut -c 1-2` != bs
) && \
87 ( `hostname | cut -c 1-2` != bv
) && ( `hostname | cut -c 1-2` != be
) ) ) then
88 set argv
= ( -f /nbns
/meso
/wx22tb
/regression_tests
/wrf.
tar )
90 set argv
= ( -f wrf.
tar )
94 # Where is the input data located - for a few known NCAR/MMM machines.
96 if ( ( `hostname` == master
) ||
(`hostname | cut -c 1-4` == node
) ) then
97 set WRFREGDATAEM
= /big
/users
/gill
/WRF-data-EM
98 set WRFREGDATANMM
= /big
/users
/gill
/WRF-data-NMM
99 else if ( `hostname` == jacaranda
) then
100 set WRFREGDATAEM
= /jacaranda
/users
/gill
/WRF-data-EM
101 set WRFREGDATANMM
= /jacaranda
/users
/gill
/WRF-data-NMM
102 else if ( `hostname` == stink
) then
103 set WRFREGDATAEM
= /stink
/gill
/Regression_Tests
/WRF_regression_data
/processed
104 set WRFREGDATANMM
= /stink
/gill
/Regression_Tests
/WRF_regression_data
/WRF-data-NMM
105 else if ( `hostname` == cape
) then
106 set WRFREGDATAEM
= /cape
/users
/michalak
/WRF-data-EM
107 set WRFREGDATANMM
= /cape
/users
/michalak
/WRF-data-NMM
108 else if ( (`hostname | cut -c 1-6` == joshua
) || \
109 ( `hostname` == maple
) ||
(`hostname | cut -c 1-7` == service
) ) then
110 set WRFREGDATAEM
= /users
/gill
/WRF-data-EM
111 set WRFREGDATANMM
= /users
/gill
/WRF-data-NMM
112 else if ( ( `hostname | cut -c 1-2` == bs
) ||
( `hostname` == tempest
) ||
( `hostname | cut -c 1-2` == ln ) || \
113 ( `hostname | cut -c 1-2` == bv
) ||
( `hostname | cut -c 1-2` == be
) ) then
114 set WRFREGDATAEM
= /mmm
/users
/gill
/WRF-data-EM
115 set WRFREGDATAEM
= /mmm
/users
/gill
/WRF_regression_data
/processed
116 set WRFREGDATANMM
= /rap
/RJNTB
/dtc
//WRF-data-NMM
117 else if ( ( `uname` == AIX
) && ( ( `hostname | cut -c 1-2` != bs
) && \
118 ( `hostname | cut -c 1-2` != bv
) && ( `hostname | cut -c 1-2` != be
) ) ) then
119 set WRFREGDATAEM
= /nbns
/meso
/wx22tb
/regression_tests
/WRF-data-EM
120 set WRFREGDATANMM
= /nbns
/meso
/wx22tb
/regression_tests
/WRF-data-NMM
122 if ( ( -d /users
/gill
/WRF-data-EM
) && ( -d /users
/gill
/WRF-data-NMM
) ) then
123 set WRFREGDATAEM
= /users
/gill
/WRF-data-EM
124 set WRFREGDATANMM
= /users
/gill
/WRF-data-NMM
125 else if ( ( -d /mmm
/users
/gill
/WRF-data-EM
) && ( -d /mmm
/users
/gill
/WRF-data-NMM
) ) then
126 set WRFREGDATAEM
= /mmm
/users
/gill
/WRF-data-EM
127 set WRFREGDATANMM
= /rap
/RJNTB
/dtc
/WRF-data-NMM
129 echo "stick the WRF em and nmm data somewhere, and then fill in the shell vars"
130 echo "inside this script, you NEED WRFREGDATAEM and WRFREGDATANMM set"
134 #DAVE###################################################
135 echo DAVE em data is located
at $WRFREGDATAEM
137 echo DAVE nmm data is located
at $WRFREGDATANMM
138 ls -ls $WRFREGDATANMM
141 #DAVE###################################################
143 if ( $#argv == 0 ) then
144 echo "Please enter either a date for cvs checkout. ex regtest.csh -D date"
145 echo " or a file name containing WRF. ex regtest.csh -f tarfile"
146 echo " or the -ftp flag for the script to pick code off anon ftp"
152 if ( "$a" == "-D" ) then
154 rsh -n maple.mmm.ucar.edu w
>& /dev
/null
156 echo "Cannot execute a remote shell on maple.mmm.ucar.edu, where the"
157 echo "WRF code resides."
158 echo "Please check that it is up and that you have permission to rsh"
159 echo "to this host. (Create a .rhosts file)."
160 ping -c 1 maple.mmm.ucar.edu
163 setenv CVSROOT maple.mmm.ucar.edu
:/data
3/mp
/wrfhelp
/WRF
165 set acquire_from
= "cvs"
166 set thedate
= $argv[2]
170 if ( "$a" == "-f" ) then
172 set thefile
= $argv[2]
173 # Check for absolute path, if not, make it absolute
174 echo $thefile |
grep '^/' > /dev
/null
175 if ( $status != 0 ) set thefile
= `pwd`/$thefile
176 set acquire_from
= "filearg"
180 if ( "$a" == "-ftp" ) then
181 set acquire_from
= "ftp"
182 echo "anon ftp temporarily disabled"
186 if ( "$a" == "-here" ) then
187 set acquire_from
= "here"
190 if ( "$a" == "-env" ) then
191 set acquire_from
= "environment"
192 set thefile
= $WRFREGFILE
196 # Start recording everything - for debug purposes.
201 # And to tell us how long we've spent on this whole regression test,
202 # we should remember when we started.
204 set start
= ( `date` )
206 #####################################################################
208 # Initial set up values
210 # Is this a single domain regression test or is this nested. Well, a nested one
211 # is a bit special. It can only run on machines that have the WRF RSL_LITE-but-no-MPI
217 if ( $NESTED == TRUE
) then
218 echo DOING a NESTED TEST
221 # Use the adaptive time step option
226 if ( $ADAPTIVE == TRUE
) then
227 set STEP_TO_OUTPUT_TIME
= .TRUE.
228 set USE_ADAPTIVE_TIME_STEP
= .TRUE.
230 set STEP_TO_OUTPUT_TIME
= .FALSE.
231 set USE_ADAPTIVE_TIME_STEP
= .FALSE.
234 # We can choose to do grid and obs nudging tests.
242 if ( $FDDA2 == TRUE
) then
246 # We can choose to do hwrf tests.
251 # The default floating point precision is either 4 bytes or 8 bytes.
252 # We assume that it is 4 (or the default for the architecture) unless
253 # REAL8 is set to TRUE.
258 # Are we shooting for a bit-for-bit run (serial vs OpenMP, serial vs MPI), or not?
259 # If you want to do a performance-only run, the forecasts are still short, but you
260 # get to insure that the optimized code builds and runs.
262 set REG_TYPE
= OPTIMIZED
263 set REG_TYPE
= BIT4BIT
265 # For a Mac/Intel, we can run either g95 or PGI.
267 if ( `uname` == Darwin
) then
272 # We can choose to do a global test
274 if ( $NESTED != TRUE
) then
277 else if ( $NESTED == TRUE
) then
281 # Is this a WRF chem test?
282 # if CHEM = TRUE, then chemistry run
283 # if KPP = TRUE, then chemistry with KPP run (CHEM set to true)
285 if ( $NESTED != TRUE
) then
290 if ( $KPP == TRUE
) then
293 else if ( $NESTED == TRUE
) then
297 if ( $CHEM == TRUE
) then
299 else if ( $CHEM == FALSE
) then
302 if ( $KPP == TRUE
) then
304 setenv FLEX_LIB_DIR
/usr
/local
/lib
306 else if ( $KPP == FALSE
) then
312 # For the real data case, we can run either one of two data cases. If this is
313 # a chemistry run, we are forced to use that data.
317 if ( $CHEM == TRUE
) then
320 if ( $GLOBAL == TRUE
) then
324 # Yet another local variable to change the name of where the data is located.
326 set thedataem
= ${WRFREGDATAEM}/${dataset}
327 set thedatanmm
= $WRFREGDATANMM
329 # A separately installed version of the latest ESMF library (NOT the
330 # ESMF library included in the WRF tarfile) can be tested by setting
331 # "ESMF_LIB" to "TRUE" below. This test is not supported on all
337 # serial and OMP are not tested with ESMF so always start with env vars cleared
341 if ( $ESMF_LIB == TRUE
) then
342 if ( ( `uname` == AIX
) && ( ( `hostname | cut -c 1-2` == bv
) ||
( `hostname | cut -c 1-2` == be
) ) ) then
343 echo "A separately installed version of the latest ESMF library"
344 echo "(NOT the ESMF library included in the WRF tarfile) will"
345 echo "be used for MPI tests"
346 setenv OBJECT_MODE
64
347 # set ESMFLIBSAVE = /home/bluevista/hender/esmf/esmf_2_2_2r/lib/libO/AIX.default.64.mpi.default
348 # set ESMFINCSAVE = /home/bluevista/hender/esmf/esmf_2_2_2r/mod/modO/AIX.default.64.mpi.default
349 setenv ESMF_DIR
/mmm
/users
/michalak
/esmf
352 setenv ESMF_INSTALL_PREFIX
$ESMF_DIR/..
/esmf_install
353 setenv ESMFLIB
$ESMF_INSTALL_PREFIX/lib
/libg
/AIX.default
.64.mpi.default
354 setenv ESMFINC
$ESMF_INSTALL_PREFIX/mod
/modg
/AIX.default
.64.mpi.default
355 set ESMFLIBSAVE
= $ESMFLIB
356 set ESMFINCSAVE
= $ESMFINC
357 echo "Using ESMFLIB = ${ESMFLIBSAVE}"
358 echo "Using ESMFINC = ${ESMFINCSAVE}"
360 echo "Only the ESMF library included in the WRF tarfile is"
361 echo "tested on this machine"
364 if ( $NESTED == TRUE
) then
365 echo "The ESMF library does not work with nesting."
370 # A single WRF output "quilt" server can be tested by setting "QUILT" to
371 # "TRUE" below. At the moment, testing of I/O quilt servers is not supported
377 if ( $QUILT == TRUE
) then
378 echo "One WRF output quilt server will be used for some tests"
381 # Baseline data sets can be generated and archived or compared against.
382 # - To generate and archive, set GENERATE_BASELINE to a pathname that can
383 # be created by this script via "mkdir -p $GENERATE_BASELINE". This
384 # directory must not already exist.
385 # Set GENERATE_BASELINE = FALSE to avoid baseline generation.
386 # - To compare with a previously archived baseline, set COMPARE_BASELINE
387 # to an existing directory that contains an archived baseline.
388 # Set COMPARE_BASELINE = FALSE to avoid baseline comparison.
389 set GENERATE_BASELINE
= FALSE
390 set COMPARE_BASELINE
= FALSE
392 # Baseline generation and comparison are only done when BIT4BIT is set.
393 if ( $GENERATE_BASELINE != FALSE
) then
394 if ( $REG_TYPE != BIT4BIT
) then
395 echo "ERROR: Baseline generation can only be done during BIT4BIT tests."
398 if ( -d $GENERATE_BASELINE ) then
399 echo "ERROR: Baseline directory ${GENERATE_BASELINE} already exists."
402 # Archive serial output file to baseline
403 mkdir
-p $GENERATE_BASELINE ||
( echo "ERROR: cannot mkdir ${GENERATE_BASELINE}"; exit 3 )
406 if ( $COMPARE_BASELINE != FALSE
) then
407 if ( $REG_TYPE != BIT4BIT
) then
408 echo "Baseline comparison can only be done during BIT4BIT tests."
411 if ( ! -d $COMPARE_BASELINE ) then
412 echo "${0}: ERROR: Baseline directory ${COMPARE_BASELINE} does not exist"
417 # Set the input/output format type (currently 1, 2 or 5 OK).
418 # Binary NetCDF PHDF, IBM GriB, history only
422 set IO_FORM_NAME
= ( io_bin io_netcdf io_dummy io_phdf5 io_grib1
)
423 set IO_FORM_WHICH
=( IO IO IO IO O
)
425 # There is a breakdown of cores to test depending on the various
426 # options that the user is testing.
427 # nested: cannot test NMM
428 # rsl_lite: cannot test anything with y periodic bc
430 # esmf_lib: cannot test NMM
431 # grib output: cannot test NMM
433 if ( $NESTED == TRUE
) then
434 set CORES
= ( em_real em_b_wave em_quarter_ss
)
435 else if ( $NESTED != TRUE
) then
436 set CORES
= ( em_real em_b_wave em_quarter_ss nmm_real
)
437 set CORES
= ( nmm_real
)
438 if ( $CHEM == TRUE
) then
439 set CORES
= ( em_real em_real
)
441 if ( $GLOBAL == TRUE
) then
442 set CORES
= ( em_real
)
444 if ( $ADAPTIVE == TRUE
) then
445 set CORES
= ( em_real
)
447 if ( $ESMF_LIB == TRUE
) then
448 set CORES
= ( em_real em_b_wave em_quarter_ss
)
450 if ( $IO_FORM_NAME[$IO_FORM] == io_grib1
) then
451 set CORES
= ( em_real em_b_wave em_quarter_ss
)
453 if ( $FDDA == TRUE
) then
454 set CORES
= ( em_real
)
456 if ( $HWRF == TRUE
) then
457 set CORES
= ( nmm_real
)
461 # The b_wave case has binary input (4-byte only), the nmm
462 # core has raw MPI calls, skip them if we are doing real*8 floats.
464 if ( $REAL8 == TRUE
) then
465 set CORES
= ( em_real em_quarter_ss
)
468 if ( ( $CHEM != TRUE
) && ( $FDDA != TRUE
) && ( $NESTED != TRUE
) && ( $REAL8 != TRUE
) && ( $GLOBAL != TRUE
) ) then
469 set PHYSOPTS
= ( 1 2 3 4 5 6 7 )
470 else if ( ( $CHEM != TRUE
) && ( $FDDA != TRUE
) && ( ( $NESTED == TRUE
) ||
( $REAL8 == TRUE
) ||
( $GLOBAL == TRUE
) ) ) then
471 set PHYSOPTS
= ( 1 2 3 4 5 6 )
472 else if ( ( $CHEM != TRUE
) && ( $FDDA == TRUE
) ) then
473 if ( $FDDA2 == TRUE
) then
474 set PHYSOPTS_FDDA
= BOTH
476 set PHYSOPTS_FDDA
= GRID
478 if ( $PHYSOPTS_FDDA == GRID
) then
481 set PHYSOPTS
= ( 1 2 3 )
483 else if ( $CHEM == TRUE
) then
484 set PHYSOPTS
= ( 1 2 3 4 5 6 )
488 # This is selecting the ideal physics options - mostly selecting BC options.
489 # With no nesting, run all three ideal physics options.
491 if ( $NESTED == TRUE
) then
492 set Max_Ideal_Physics_Options
= 2
493 else if ( $NESTED != TRUE
) then
494 set Max_Ideal_Physics_Options
= 3
499 # How many domains to run (nest tests). Only em_real and ideals use this.
500 # The max is 3 due to the number of columns in the namelist that are
501 # currently filled in.
503 if ( $NESTED == TRUE
) then
504 if ( $dataset == jan00
) then
505 cat >! dom_real
<< EOF
507 time_step_fract_num = 0,
508 time_step_fract_den = 1,
516 dx = 30000, 10000, 3333.333333,
517 dy = 30000, 10000, 3333.333333,
520 i_parent_start = 0, 31, 11,
521 j_parent_start = 0, 17, 11,
522 parent_grid_ratio = 1, 3, 3,
523 parent_time_step_ratio = 1, 3, 3,
528 move_interval = 3 , 6 , 9
529 move_cd_x = 1 , 1 , 1
530 move_cd_y = 1 , 1 , 1
531 use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
532 step_to_output_time = $STEP_TO_OUTPUT_TIME
534 else if ( $dataset == jun01
) then
535 cat >! dom_real
<< EOF
537 time_step_fract_num = 0,
538 time_step_fract_den = 1,
546 dx = 10000, 3333.333333, 1111.111111,
547 dy = 10000, 3333.333333, 1111.111111,
550 i_parent_start = 0, 30, 11,
551 j_parent_start = 0, 20, 11,
552 parent_grid_ratio = 1, 3, 3,
553 parent_time_step_ratio = 1, 3, 3,
558 move_interval = 1 , 2 , 3
559 move_cd_x = 1 , 1 , 1
560 move_cd_y = 1 , 1 , 1
561 use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
562 step_to_output_time = $STEP_TO_OUTPUT_TIME
565 cat >! dom_ideal
<< EOF
568 else if ( $NESTED != TRUE
) then
569 if ( $dataset == jan00
) then
570 cat >! dom_real
<< EOF
572 time_step_fract_num = 0,
573 time_step_fract_den = 1,
581 dx = 30000, 10000, 3333,
582 dy = 30000, 10000, 3333,
585 i_parent_start = 0, 31, 30,
586 j_parent_start = 0, 17, 30,
587 parent_grid_ratio = 1, 3, 3,
588 parent_time_step_ratio = 1, 3, 3,
591 use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
592 step_to_output_time = $STEP_TO_OUTPUT_TIME
594 else if ( $dataset == jun01
) then
595 cat >! dom_real
<< EOF
597 time_step_fract_num = 0,
598 time_step_fract_den = 1,
606 dx = 10000, 3333.333333, 1111.111111,
607 dy = 10000, 3333.333333, 1111.111111,
610 i_parent_start = 0, 30, 11,
611 j_parent_start = 0, 20, 11,
612 parent_grid_ratio = 1, 3, 3,
613 parent_time_step_ratio = 1, 3, 3,
616 use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
617 step_to_output_time = $STEP_TO_OUTPUT_TIME
619 else if ( $dataset == global
) then
620 cat >! dom_real
<< EOF
622 time_step_fract_num = 00
623 time_step_fract_den = 112
631 num_metgrid_levels = 27
632 dx = 625373.288,20000, 4000,
633 dy = 625373.288,20000, 4000,
634 p_top_requested = 5000
637 i_parent_start = 0, 17, 17,
638 j_parent_start = 0, 33, 33,
639 parent_grid_ratio = 1, 5, 5,
640 parent_time_step_ratio = 1, 5, 5,
645 cat >! dom_ideal
<< EOF
650 # The em_real entire physics namelist. Change what you want.
652 cat >! phys_real_1
<< EOF
653 mp_physics = 3, 3, 3,
654 ra_lw_physics = 1, 1, 1,
655 ra_sw_physics = 1, 1, 1,
657 sf_sfclay_physics = 1, 1, 1,
658 sf_surface_physics = 1, 1, 1,
659 bl_pbl_physics = 1, 1, 1,
661 cu_physics = 1, 1, 0,
666 surface_input_source = 1,
676 cat >! dyn_real_SAFE
<< EOF
677 moist_adv_opt = 0, 0, 0,
678 scalar_adv_opt = 0, 0, 0,
679 chem_adv_opt = 0, 0, 0,
680 tke_adv_opt = 0, 0, 0,
683 cat >! dyn_real_1
<< EOF
684 moist_adv_opt = 1, 1, 1,
685 scalar_adv_opt = 0, 0, 0,
686 chem_adv_opt = 0, 0, 0,
687 tke_adv_opt = 0, 0, 0,
690 cat >! time_real_1
<< EOF
691 auxinput1_inname = "met_em.d<domain>.<date>"
694 cat >! nest_real_1
<< EOF
695 input_from_file = .true.,.false.,.false.
698 cat >! damp_real_1
<< EOF
700 zdamp = 5000., 5000., 5000.,
701 dampcoef = 0.01, 0.01, 0.01
704 cat >! phys_real_2
<< EOF
705 mp_physics = 4, 4, 4,
706 ra_lw_physics = 1, 1, 1,
707 ra_sw_physics = 1, 1, 1,
709 sf_sfclay_physics = 2, 2, 2,
710 sf_surface_physics = 2, 2, 2,
711 bl_pbl_physics = 2, 2, 2,
713 cu_physics = 2, 2, 0,
716 topo_shading = 0, 0, 0,
720 surface_input_source = 1,
730 cat >! dyn_real_2
<< EOF
731 moist_adv_opt = 1, 1, 1,
732 scalar_adv_opt = 0, 0, 0,
733 chem_adv_opt = 0, 0, 0,
734 tke_adv_opt = 0, 0, 0,
737 if ( $GLOBAL == TRUE
) then
738 cp dyn_real_SAFE dyn_real_2
741 cat >! time_real_2
<< EOF
742 auxinput1_inname = "met_em.d<domain>.<date>"
745 cat >! nest_real_2
<< EOF
746 input_from_file = .true.,.false.,.false.
749 cat >! damp_real_2
<< EOF
751 zdamp = 5000., 5000., 5000.,
752 dampcoef = 0.01, 0.01, 0.01
755 cat >! phys_real_3
<< EOF
756 mp_physics = 5, 5, 5,
757 ra_lw_physics = 1, 1, 1,
758 ra_sw_physics = 2, 2, 2,
760 sf_sfclay_physics = 2, 2, 2,
761 sf_surface_physics = 3, 3, 3,
762 bl_pbl_physics = 2, 2, 2,
764 cu_physics = 3, 3, 0,
772 surface_input_source = 1,
782 cat >! dyn_real_3
<< EOF
783 moist_adv_opt = 2, 2, 2,
784 scalar_adv_opt = 0, 0, 0,
785 chem_adv_opt = 0, 0, 0,
786 tke_adv_opt = 0, 0, 0,
789 cat >! time_real_3
<< EOF
790 auxinput1_inname = "met_em.d<domain>.<date>"
793 cat >! nest_real_3
<< EOF
794 input_from_file = .true.,.false.,.false.
797 cat >! damp_real_3
<< EOF
799 zdamp = 5000., 5000., 5000.,
800 dampcoef = 0.01, 0.01, 0.01
803 cat >! phys_real_4
<< EOF
804 mp_physics = 6, 6, 6,
805 ra_lw_physics = 1, 1, 1,
806 ra_sw_physics = 2, 2, 2,
808 sf_sfclay_physics = 2, 2, 2,
809 sf_surface_physics = 2, 2, 2,
810 bl_pbl_physics = 2, 2, 2,
812 cu_physics = 5, 5, 0,
817 sf_urban_physics = 1, 1, 1,
818 surface_input_source = 1,
828 cat >! dyn_real_4
<< EOF
829 moist_adv_opt = 2, 2, 2,
830 scalar_adv_opt = 0, 0, 0,
831 chem_adv_opt = 0, 0, 0,
832 tke_adv_opt = 0, 0, 0,
835 cat >! time_real_4
<< EOF
836 auxinput1_inname = "met_em.d<domain>.<date>"
839 cat >! nest_real_4
<< EOF
840 input_from_file = .true.,.false.,.false.
843 cat >! damp_real_4
<< EOF
845 zdamp = 5000., 5000., 5000.,
846 dampcoef = 0.01, 0.01, 0.01
849 cat >! phys_real_5
<< EOF
850 mp_physics = 10, 10, 10,
851 ra_lw_physics = 1, 1, 1,
852 ra_sw_physics = 1, 1, 1,
854 sf_sfclay_physics = 7, 7, 7,
855 sf_surface_physics = 1, 1, 1,
856 bl_pbl_physics = 7, 7, 7,
858 cu_physics = 99, 99, 0,
861 topo_shading = 0, 0, 0,
865 sf_urban_physics = 1, 1, 1,
866 surface_input_source = 1,
876 cam_abs_freq_s = 21600
881 cat >! dyn_real_5
<< EOF
882 moist_adv_opt = 2, 2, 2,
883 scalar_adv_opt = 0, 0, 0,
884 chem_adv_opt = 0, 0, 0,
885 tke_adv_opt = 0, 0, 0,
888 cat >! time_real_5
<< EOF
889 auxinput1_inname = "met_em.d<domain>.<date>"
892 cat >! nest_real_5
<< EOF
893 input_from_file = .true.,.false.,.false.
896 cat >! damp_real_5
<< EOF
898 zdamp = 5000., 5000., 5000.,
899 dampcoef = 0.05, 0.05, 0.05
902 cat >! phys_real_6
<< EOF
903 mp_physics = 7, 7, 7,
904 ra_lw_physics = 1, 1, 1,
905 ra_sw_physics = 2, 2, 2,
907 sf_sfclay_physics = 7, 7, 7,
908 sf_surface_physics = 1, 1, 1,
909 bl_pbl_physics = 7, 7, 7,
911 cu_physics = 1, 1, 0,
919 sf_urban_physics = 1, 1, 1,
920 surface_input_source = 1,
930 cam_abs_freq_s = 21600
935 cat >! dyn_real_6
<< EOF
936 moist_adv_opt = 0, 0, 0,
937 scalar_adv_opt = 0, 0, 0,
938 chem_adv_opt = 0, 0, 0,
939 tke_adv_opt = 0, 0, 0,
942 cat >! time_real_6
<< EOF
943 auxinput1_inname = "met_em.d<domain>.<date>"
946 cat >! nest_real_6
<< EOF
947 input_from_file = .true.,.false.,.false.
950 cat >! damp_real_6
<< EOF
952 zdamp = 5000., 5000., 5000.,
953 dampcoef = 0.05, 0.05, 0.05
956 cat >! phys_real_7
<< EOF
957 mp_physics = 8, 8, 8,
958 ra_lw_physics = 3, 3, 3,
959 ra_sw_physics = 3, 3, 3,
961 sf_sfclay_physics = 2, 2, 2,
962 sf_surface_physics = 2, 2, 2,
963 bl_pbl_physics = 2, 2, 2,
965 cu_physics = 99, 99, 0,
970 sf_urban_physics = 1, 1, 1,
971 surface_input_source = 1,
981 cam_abs_freq_s = 21600
986 cat >! dyn_real_7
<< EOF
987 moist_adv_opt = 0, 0, 0,
988 scalar_adv_opt = 0, 0, 0,
989 chem_adv_opt = 0, 0, 0,
990 tke_adv_opt = 0, 0, 0,
993 cat >! time_real_7
<< EOF
994 auxinput1_inname = "met_em.d<domain>.<date>"
997 cat >! nest_real_7
<< EOF
998 input_from_file = .true.,.false.,.false.
1001 cat >! damp_real_7
<< EOF
1003 zdamp = 5000., 5000., 5000.,
1004 dampcoef = 0.05, 0.05, 0.05
1007 if ( $GLOBAL == TRUE
) then
1008 sed -e 's/ cam_abs_dim2 *= [0-9][0-9]/ cam_abs_dim2 = 41/g' phys_real_5
>! phys_foo
1009 mv phys_foo phys_real_7
1010 cp dyn_real_SAFE dyn_real_1
1011 cp dyn_real_SAFE dyn_real_2
1012 cp dyn_real_SAFE dyn_real_3
1013 cp dyn_real_SAFE dyn_real_4
1014 cp dyn_real_SAFE dyn_real_5
1015 cp dyn_real_SAFE dyn_real_6
1016 cp dyn_real_SAFE dyn_real_7
1019 cat >! fdda_real_1
<< EOF
1020 grid_fdda = 1, 1, 1,
1021 gfdda_inname = "wrffdda_d<domain>",
1022 gfdda_end_h = 24, 24, 24,
1023 gfdda_interval_m = 360, 360, 360,
1025 if_no_pbl_nudging_uv = 0, 0, 1,
1026 if_no_pbl_nudging_t = 0, 0, 1,
1027 if_no_pbl_nudging_q = 0, 0, 1,
1028 if_zfac_uv = 0, 0, 1,
1029 k_zfac_uv = 10, 10, 1,
1030 if_zfac_t = 0, 0, 1,
1031 k_zfac_t = 10, 10, 1,
1032 if_zfac_q = 0, 0, 1,
1033 k_zfac_q = 10, 10, 1,
1034 guv = 0.0003, 0.0003, 0.0003,
1035 gt = 0.0003, 0.0003, 0.0003,
1036 gq = 0.0003, 0.0003, 0.0003,
1042 cat >! fdda_real_time_1
<< EOF
1045 cat >! fdda_real_2
<< EOF
1046 obs_nudge_opt = 1,1,1,1,1
1048 obs_nudge_wind = 1,1,1,1,1
1049 obs_coef_wind = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1050 obs_nudge_temp = 1,1,1,1,1
1051 obs_coef_temp = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1052 obs_nudge_mois = 1,1,1,1,1
1053 obs_coef_mois = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1054 obs_rinxy = 240.,240.,180.,180,180
1061 obs_ipf_errob = .true.
1062 obs_ipf_nudob = .true.
1063 obs_ipf_in4dob = .true.
1066 cat >! fdda_real_time_2
<< EOF
1067 auxinput11_interval_s = 180
1068 auxinput11_end_h = 6
1071 cat >! fdda_real_3
<< EOF
1072 grid_fdda = 1, 1, 1,
1073 gfdda_inname = "wrffdda_d<domain>",
1074 gfdda_end_h = 24, 24, 24,
1075 gfdda_interval_m = 360, 360, 360,
1077 if_no_pbl_nudging_uv = 0, 0, 1,
1078 if_no_pbl_nudging_t = 0, 0, 1,
1079 if_no_pbl_nudging_q = 0, 0, 1,
1080 if_zfac_uv = 0, 0, 1,
1081 k_zfac_uv = 10, 10, 1,
1082 if_zfac_t = 0, 0, 1,
1083 k_zfac_t = 10, 10, 1,
1084 if_zfac_q = 0, 0, 1,
1085 k_zfac_q = 10, 10, 1,
1086 guv = 0.0003, 0.0003, 0.0003,
1087 gt = 0.0003, 0.0003, 0.0003,
1088 gq = 0.0003, 0.0003, 0.0003,
1092 obs_nudge_opt = 1,1,1,1,1
1094 obs_nudge_wind = 1,1,1,1,1
1095 obs_coef_wind = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1096 obs_nudge_temp = 1,1,1,1,1
1097 obs_coef_temp = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1098 obs_nudge_mois = 1,1,1,1,1
1099 obs_coef_mois = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1100 obs_rinxy = 240.,240.,180.,180,180
1107 obs_ipf_errob = .true.
1108 obs_ipf_nudob = .true.
1109 obs_ipf_in4dob = .true.
1112 cat >! fdda_real_time_3
<< EOF
1113 auxinput11_interval_s = 180
1114 auxinput11_end_h = 6
1117 # Tested options for ideal case em_b_wave. Modifying these
1118 # parameters is acceptable. Adding to these requires changes
1119 # to the ideal namelist build below.
1121 cat >! phys_b_wave_1a
<< EOF
1126 cat >! phys_b_wave_1b
<< EOF
1127 mp_physics = 1, 1, 1,
1129 cat >! phys_b_wave_1c
<< EOF
1130 non_hydrostatic = .true., .true., .true.,
1132 cat >! phys_b_wave_1d
<< EOF
1133 input_from_file = .true.,.false.,.false.
1136 cat >! phys_b_wave_2a
<< EOF
1141 cat >! phys_b_wave_2b
<< EOF
1142 mp_physics = 1, 1, 1,
1144 cat >! phys_b_wave_2c
<< EOF
1145 non_hydrostatic = .false., .false., .false.,
1147 cat >! phys_b_wave_2d
<< EOF
1148 input_from_file = .true.,.false.,.false.
1151 cat >! phys_b_wave_3a
<< EOF
1156 cat >! phys_b_wave_3b
<< EOF
1157 mp_physics = 2, 2, 2,
1159 cat >! phys_b_wave_3c
<< EOF
1160 non_hydrostatic = .false., .false., .false.,
1162 cat >! phys_b_wave_3d
<< EOF
1163 input_from_file = .true.,.false.,.false.
1166 # Tested options for ideal case em_quarter_ss. Modifying these
1167 # parameters is acceptable. Adding to these requires changes
1168 # to the ideal namelist build below.
1170 cat >! phys_quarter_ss_1a
<< EOF
1175 cat >! phys_quarter_ss_1b
<< EOF
1176 mp_physics = 1, 1, 1,
1178 cat >! phys_quarter_ss_1c
<< EOF
1179 moist_adv_opt = 1, 1, 1,
1180 scalar_adv_opt = 1, 1, 1,
1181 chem_adv_opt = 1, 1, 1,
1182 tke_adv_opt = 1, 1, 1,
1183 non_hydrostatic = .true., .true., .true.,
1185 cat >! phys_quarter_ss_1d
<< EOF
1186 input_from_file = .true.,.false.,.false.
1188 cat >! phys_quarter_ss_1e
<< EOF
1189 periodic_x = .false.,.false.,.false.,
1190 open_xs = .true., .false.,.false.,
1191 open_xe = .true., .false.,.false.,
1192 periodic_y = .false.,.false.,.false.,
1193 open_ys = .true., .false.,.false.,
1194 open_ye = .true., .false.,.false.,
1196 cat >! phys_quarter_ss_1f
<< EOF
1197 sf_sfclay_physics = 0, 0, 0,
1200 cat >! phys_quarter_ss_2a
<< EOF
1205 cat >! phys_quarter_ss_2b
<< EOF
1206 mp_physics = 1, 1, 1,
1208 cat >! phys_quarter_ss_2c
<< EOF
1209 moist_adv_opt = 2, 2, 2,
1210 scalar_adv_opt = 2, 2, 2,
1211 chem_adv_opt = 2, 2, 2,
1212 tke_adv_opt = 2, 2, 2,
1213 non_hydrostatic = .true., .true., .true.,
1215 cat >! phys_quarter_ss_2d
<< EOF
1216 input_from_file = .true.,.false.,.false.
1218 cat >! phys_quarter_ss_2e
<< EOF
1219 periodic_x = .false.,.false.,.false.,
1220 open_xs = .true., .false.,.false.,
1221 open_xe = .true., .false.,.false.,
1222 periodic_y = .false.,.false.,.false.,
1223 open_ys = .true., .false.,.false.,
1224 open_ye = .true., .false.,.false.,
1226 cat >! phys_quarter_ss_2f
<< EOF
1227 sf_sfclay_physics = 1, 1, 1,
1230 cat >! phys_quarter_ss_3a
<< EOF
1235 cat >! phys_quarter_ss_3b
<< EOF
1236 mp_physics = 2, 2, 2,
1238 cat >! phys_quarter_ss_3c
<< EOF
1239 moist_adv_opt = 1, 1, 1,
1240 scalar_adv_opt = 1, 1, 1,
1241 chem_adv_opt = 1, 1, 1,
1242 tke_adv_opt = 1, 1, 1,
1243 non_hydrostatic = .false., .false., .false.,
1245 cat >! phys_quarter_ss_3d
<< EOF
1246 input_from_file = .true.,.false.,.false.
1248 cat >! phys_quarter_ss_3e
<< EOF
1249 periodic_x = .true., .false.,.false.,
1250 open_xs = .false.,.false.,.false.,
1251 open_xe = .false.,.false.,.false.,
1252 periodic_y = .true., .false.,.false.,
1253 open_ys = .false.,.false.,.false.,
1254 open_ye = .false.,.false.,.false.,
1256 cat >! phys_quarter_ss_3f
<< EOF
1257 sf_sfclay_physics = 1, 1, 1,
1260 if ( $IO_FORM_WHICH[$IO_FORM] == IO
) then
1261 cat >! io_format
<< EOF
1262 io_form_history = $IO_FORM
1263 io_form_restart = $IO_FORM
1264 io_form_input = $IO_FORM
1265 io_form_boundary = $IO_FORM
1267 else if ( $IO_FORM_WHICH[$IO_FORM] == I
) then
1268 cat >! io_format
<< EOF
1271 io_form_input = $IO_FORM
1272 io_form_boundary = $IO_FORM
1274 else if ( $IO_FORM_WHICH[$IO_FORM] == O
) then
1275 cat >! io_format
<< EOF
1276 io_form_history = $IO_FORM
1279 io_form_boundary = 2
1284 if ( $dataset == jun01
) then
1285 set filetag_real
=2001-06-11_12:00:00
1286 else if ( $dataset == jan00
) then
1287 set filetag_real
=2000-01-24_12:00:00
1288 else if ( $dataset == chem
) then
1289 set filetag_real
= ( 2006-04-06_00:00:00 2006-04-06_12:00:00 )
1290 else if ( $dataset == global
) then
1291 set filetag_real
=2008-01-02_12:00:00
1294 set filetag_ideal
=0001-01-01_00:00:00
1295 #DAVE###################################################
1296 echo did phys
, set date to
$filetag_real
1299 #DAVE###################################################
1301 #####################################################################
1303 # Set up info for particular architectures
1305 set ARCH
= ( `uname` )
1307 set ZAP_SERIAL
= FALSE
1308 set ZAP_OPENMP
= FALSE
1309 set SERIALRUNCOMMAND
=
1311 set MPIRUNCOMMANDPOST
=
1314 if ( $ARCH[1] == AIX
) then
1316 set TMPDIR
= /ptmp
/$user
1317 # keep stuff out of $HOME and /ptmp/$USER
1318 # this allows multiple regressions tests to run simultaneously
1319 # extend this to other machines later
1320 if ( ( `hostname | cut -c 1-2` == bs
) && ( ! $?LOADL_JOB_NAME
) ) then
1321 echo "${0}: ERROR:: This batch script must be submitted via"
1322 echo "${0}: LoadLeveler on an AIX machine\!"
1324 else if ( `hostname | cut -c 1-2` == bs
) then
1325 set job_id
= `echo ${LOADL_JOB_NAME} | cut -f2 -d'.'`
1326 set DEF_DIR
= /ptmp
/$user/wrf_regression.
${job_id}
1327 set TMPDIR
= $DEF_DIR
1328 if ( -d $DEF_DIR ) then
1329 echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it"
1333 echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results"
1335 set CUR_DIR
= ${LOADL_STEP_INITDIR}
1336 else if ( ( `hostname | cut -c 1-2` == bv
) ||
( `hostname | cut -c 1-2` == be
) ) then
1337 set job_id
= $LSB_JOBID
1338 set DEF_DIR
= /ptmp
/$user/wrf_regression.
${job_id}
1339 set TMPDIR
= $DEF_DIR
1340 if ( -d $DEF_DIR ) then
1341 echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it"
1345 echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results"
1347 else if ( ( ( `hostname | cut -c 1-2` != be
) && ( `hostname | cut -c 1-2` != bv
) ) && ( ! $?LOADL_JOB_NAME
) ) then
1348 echo "${0}: ERROR:: This batch script must be submitted via"
1349 echo "${0}: LoadLeveler on an AIX machine\!"
1351 else if ( ( `hostname | cut -c 1-2` != be
) && ( `hostname | cut -c 1-2` != bv
) ) then
1352 set job_id
= `echo ${LOADL_JOB_NAME} | cut -f2 -d'.'`
1353 set DEF_DIR
= /ptmp
/$user/wrf_regression.
${job_id}
1354 set TMPDIR
= $DEF_DIR
1355 if ( -d $DEF_DIR ) then
1356 echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it"
1360 echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results"
1362 set CUR_DIR
= ${LOADL_STEP_INITDIR}
1364 if ( ! -d $TMPDIR ) mkdir
$TMPDIR
1365 set MAIL
= /usr
/bin
/mailx
1366 set COMPOPTS
= ( 1 2 3 )
1367 set COMPOPTS_NO_NEST
= 0
1368 set COMPOPTS_NEST_STATIC
= 1
1369 set COMPOPTS_NEST_PRESCRIBED
= 2
1370 if ( $HWRF == TRUE
) then
1371 set COMPOPTS
= ( 1 2 3 )
1374 set OPENMP
= $Num_Procs
1375 setenv MP_PROCS
$Num_Procs
1377 if ( `hostname | cut -c 1-2` == bs
) then
1378 set MPIRUNCOMMAND
= poe
1379 else if ( `hostname | cut -c 1-2` == bv
) then
1380 set MPIRUNCOMMAND
= mpirun.lsf
1381 else if ( `hostname | cut -c 1-2` == be
) then
1382 set MPIRUNCOMMAND
= /contrib
/mpiruns
/be
/mpirun.lsf
1383 else if ( ( `hostname | cut -c 1-2` != bs
) && \
1384 ( `hostname | cut -c 1-2` != bv
) && ( `hostname | cut -c 1-2` != be
) ) then
1385 set MPIRUNCOMMAND
= poe
1387 if ( $CHEM == TRUE
) then
1388 set ZAP_OPENMP
= TRUE
1389 else if ( $CHEM == FALSE
) then
1390 set ZAP_OPENMP
= FALSE
1392 # check compiler version, JM
1393 lslpp
-i |
grep xlf |
grep ' xlfcmp ' |
head -1
1394 set xlfvers
=`lslpp -i | grep xlf | grep ' xlfcmp ' | head -1 | awk '{print $2}' | sed 's/\...*$//'`
1395 if ( ( $xlfvers > 9 ) && ( $NESTED == TRUE
) ) then
1396 # set ZAP_OPENMP = TRUE
1398 # end of compiler check, JM
1399 echo "Compiler version info: " >! version_info
1400 echo "FORTRAN: " `lslpp -l | grep xlfrte | head -1 | awk '{print $1 " " $2}'` >>! version_info
1401 echo " " >>! version_info
1402 echo "OS version info: " >>! version_info
1403 echo "AIX: " `lslpp -l | grep bos.mp | head -1 | awk '{print $1 " " $2}'` >>! version_info
1404 echo " " >>! version_info
1405 setenv MP_SHARED_MEMORY
yes
1406 else if ( $ARCH[1] == Darwin
) then
1407 if ( ( `hostname` == stink
) && ( -d /stink
/gill
/Regression_Tests
) ) then
1408 set DEF_DIR
= /stink
/gill
/Regression_Tests
/wrf_regression
1411 echo "We at least need a directory from which to do stuff"
1415 set MAIL
= /usr
/bin
/mailx
1416 if ( $LINUX_COMP == PGI
) then
1417 set COMPOPTS
= ( 1 2 3 )
1418 set ZAP_OPENMP
= FALSE
1419 else if ( $LINUX_COMP == G95
) then
1420 set COMPOPTS
= ( 13 0 14 )
1421 set ZAP_OPENMP
= TRUE
1423 set COMPOPTS_NO_NEST
= 0
1424 set COMPOPTS_NEST_STATIC
= 1
1425 set COMPOPTS_NEST_PRESCRIBED
= 2
1428 cat >! `pwd`/machfile
<< EOF
1434 set Mach
= `pwd`/machfile
1435 set SERIALRUNCOMMAND
=
1437 echo "Compiler version info: " >! version_info
1438 if ( $LINUX_COMP == PGI
) then
1439 set MPIRUNCOMMAND
= ( /usr
/local
/mpich2-1.0
.6p1-pgi
/bin
/mpirun
-np $Num_Procs )
1440 pgf90
-V |
head -2 |
tail -1 >>&! version_info
1441 else if ( $LINUX_COMP == G95
) then
1442 set MPIRUNCOMMAND
= ( /stink
/gill
/local
/bin
/mpirun
-np $Num_Procs )
1443 g95
-v |
& grep gcc
>>&! version_info
1445 echo " " >>! version_info
1446 echo "OS version info: " >>! version_info
1447 uname
-a >>&! version_info
1448 echo " " >>! version_info
1449 ps
-A |
grep mpd |
grep -v grep >& /dev
/null
1451 if ( $ok != 0 ) then
1452 echo starting an mpd process
1455 else if ( $ARCH[1] == OSF1
&& $clrm == 1 ) then
1456 set DEF_DIR
= /`hostname | cut -d. -f1`/$user
1457 set TMPDIR
= /mmmtmp
/$user
1458 set MAIL
= /usr
/bin
/mailx
1459 if ( ( $NESTED == TRUE
) && ( $RSL_LITE != TRUE
) ) then
1460 set COMPOPTS
= ( 2 4 6 )
1461 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE != TRUE
) ) then
1462 set COMPOPTS
= ( 1 3 6 )
1463 else if ( ( $NESTED == TRUE
) && ( $RSL_LITE == TRUE
) ) then
1464 set COMPOPTS
= ( 2 4 5 )
1465 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE == TRUE
) ) then
1466 set COMPOPTS
= ( 1 3 5 )
1470 set ZAP_OPENMP
= TRUE
1471 cat >! $TMPDIR/machfile
<< EOF
1477 set Mach
= $TMPDIR/machfile
1478 set MPIRUNCOMMAND
= ( mpirun
-np $Num_Procs -machinefile $Mach )
1479 echo "Compiler version info: " >! version_info
1480 f90
-version >>&! version_info
1481 echo " " >>! version_info
1482 echo "OS version info: " >>! version_info
1483 uname
-a >>&! version_info
1484 echo " " >>! version_info
1485 else if ( ( $ARCH[1] == Linux
) && ( `hostname` == bay-mmm
) ) then
1486 set DEF_DIR
= /data
3/mp
/${user}/`hostname`
1487 if ( ! -d $DEF_DIR ) mkdir
$DEF_DIR
1489 set MAIL
= /bin
/mail
1490 if ( $LINUX_COMP == PGI
) then
1491 if ( ( $NESTED == TRUE
) && ( $RSL_LITE != TRUE
) ) then
1492 set COMPOPTS
= ( 2 4 5 )
1493 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE != TRUE
) ) then
1494 set COMPOPTS
= ( 1 3 5 )
1495 else if ( ( $NESTED == TRUE
) && ( $RSL_LITE == TRUE
) ) then
1496 set COMPOPTS
= ( 2 4 6 )
1497 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE == TRUE
) ) then
1498 set COMPOPTS
= ( 1 3 6 )
1500 else if ( $LINUX_COMP == INTEL
) then
1501 if ( $NESTED == TRUE
) then
1502 set COMPOPTS
= ( 8 10 11 )
1503 else if ( $NESTED != TRUE
) then
1504 set COMPOPTS
= ( 7 9 11 )
1508 set OPENMP
= $Num_Procs
1509 cat >! machfile
<< EOF
1515 set Mach
= `pwd`/machfile
1516 if ( $CHEM == TRUE
) then
1517 set ZAP_OPENMP
= TRUE
1518 else if ( $CHEM == FALSE
) then
1519 set ZAP_OPENMP
= FALSE
1521 if ( $LINUX_COMP == INTEL
) then
1522 set ZAP_OPENMP
= TRUE
1524 set MPIRUNCOMMAND
= ( mpirun
-np $Num_Procs -machinefile $Mach )
1525 echo "Compiler version info: " >! version_info
1526 if ( $LINUX_COMP == PGI
) then
1527 pgf90
-V >>&! version_info
1528 else if ( $LINUX_COMP == INTEL
) then
1529 ifort
-v >>&! version_info
1531 echo " " >>! version_info
1532 echo "OS version info: " >>! version_info
1533 uname
-a >>&! version_info
1534 echo " " >>! version_info
1535 else if ( ( $ARCH[1] == Linux
) && ( `hostname | cut -c 1-2` == ln ) ) then
1536 set DEF_DIR
= /ptmp
/${user}/wrf_regtest
1537 if ( ! -d $DEF_DIR ) mkdir
$DEF_DIR
1539 set MAIL
= /bin
/mail
1540 if ( $LINUX_COMP == PGI
) then
1541 if ( ( $NESTED == TRUE
) && ( $RSL_LITE != TRUE
) ) then
1542 set COMPOPTS
= ( 4 2 3 )
1543 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE != TRUE
) ) then
1544 set COMPOPTS
= ( 1 2 3 )
1549 cat >! machfile
<< EOF
1555 set Mach
= `pwd`/machfile
1556 set ZAP_OPENMP
= TRUE
1557 set MPIRUNCOMMAND
= mpirun.lsf
1558 echo "Compiler version info: " >! version_info
1559 if ( $LINUX_COMP == PGI
) then
1560 pgf90
-V >>&! version_info
1561 else if ( $LINUX_COMP == INTEL
) then
1562 ifort
-v >>&! version_info
1564 echo " " >>! version_info
1565 echo "OS version info: " >>! version_info
1566 uname
-a >>&! version_info
1567 echo " " >>! version_info
1568 else if ( ( $ARCH[1] == Linux
) && ( `hostname` == loquat
) ) then
1570 set DEF_DIR
= /loquat
2/$user/wrf_regression.
${job_id}
1571 set TMPDIR
= $DEF_DIR
1572 if ( -d $DEF_DIR ) then
1573 echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it"
1577 echo "See directory ${DEF_DIR}/ for wrftest.output and other test results"
1579 set MAIL
= /bin
/mail
1580 if ( $LINUX_COMP == PGI
) then
1581 if ( ( $NESTED == TRUE
) && ( $RSL_LITE != TRUE
) ) then
1582 set COMPOPTS
= ( 2 4 5 )
1583 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE != TRUE
) ) then
1584 set COMPOPTS
= ( 1 3 5 )
1585 else if ( ( $NESTED == TRUE
) && ( $RSL_LITE == TRUE
) ) then
1586 set COMPOPTS
= ( 2 4 6 )
1587 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE == TRUE
) ) then
1588 set COMPOPTS
= ( 1 3 6 )
1590 else if ( $LINUX_COMP == INTEL
) then
1591 if ( $NESTED == TRUE
) then
1592 set COMPOPTS
= ( 8 10 11 )
1593 else if ( $NESTED != TRUE
) then
1594 set COMPOPTS
= ( 7 9 11 )
1598 set OPENMP
= $Num_Procs
1599 cat >! machfile
<< EOF
1605 set Mach
= `pwd`/machfile
1606 if ( $CHEM == TRUE
) then
1607 set ZAP_OPENMP
= TRUE
1608 else if ( $CHEM == FALSE
) then
1609 set ZAP_OPENMP
= FALSE
1611 if ( $LINUX_COMP == INTEL
) then
1612 set ZAP_OPENMP
= TRUE
1614 set MPIRUNCOMMAND
= ( mpirun
-np $Num_Procs -machinefile $Mach )
1615 echo "Compiler version info: " >! version_info
1616 if ( $LINUX_COMP == PGI
) then
1617 pgf90
-V >>&! version_info
1618 else if ( $LINUX_COMP == INTEL
) then
1619 ifort
-v >>&! version_info
1621 echo " " >>! version_info
1622 echo "OS version info: " >>! version_info
1623 uname
-a >>&! version_info
1624 echo " " >>! version_info
1625 else if ( `hostname` == tempest
) then
1626 set DEF_DIR
= /ptmp
/${user}/wrf_regtest.
${QSUB_REQID}
1627 if ( ! -d $DEF_DIR ) mkdir
$DEF_DIR
1629 set MAIL
= /usr
/sbin
/Mail
1630 set COMPOPTS
= ( 1 2 3 )
1632 set OPENMP
= $Num_Procs
1633 set Mach
= `pwd`/machfile
1634 set ZAP_OPENMP
= TRUE
1635 set MPIRUNCOMMAND
= ( mpirun
-np $Num_Procs )
1636 echo "Compiler version info: " >! version_info
1637 f90
-version >>&! version_info
1638 echo " " >>! version_info
1639 echo "OS version info: " >>! version_info
1640 uname
-a >>&! version_info
1641 echo " " >>! version_info
1642 else if ( ( $ARCH[1] == Linux
) && ( `hostname` == master
) ) then
1643 set DEF_DIR
= /big
6/gill
/DO_NOT_REMOVE_DIR
1645 set MAIL
= /bin
/mail
1646 if ( $LINUX_COMP == PGI
) then
1647 if ( $NESTED == TRUE
) then
1648 set COMPOPTS
= ( 2 4 5 )
1649 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE == TRUE
) ) then
1650 set COMPOPTS
= ( 1 3 6 )
1651 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE != TRUE
) ) then
1652 set COMPOPTS
= ( 1 3 5 )
1654 else if ( $LINUX_COMP == INTEL
) then
1655 if ( $NESTED == TRUE
) then
1656 set COMPOPTS
= ( 8 10 11 )
1657 else if ( $NESTED != TRUE
) then
1658 set COMPOPTS
= ( 7 9 11 )
1663 cat >! machfile
<< EOF
1669 set Mach
= `pwd`/machfile
1670 if ( $CHEM == TRUE
) then
1671 set ZAP_OPENMP
= TRUE
1672 else if ( $CHEM == FALSE
) then
1673 set ZAP_OPENMP
= FALSE
1675 if ( $LINUX_COMP == INTEL
) then
1676 set ZAP_OPENMP
= TRUE
1678 set MPIRUNCOMMAND
= ( mpirun
-v -np $Num_Procs -machinefile $Mach -nolocal )
1679 set MPIRUNCOMMANDPOST
= "< /dev/null"
1680 echo "Compiler version info: " >! version_info
1681 if ( $LINUX_COMP == PGI
) then
1682 pgf90
-V >>&! version_info
1683 else if ( $LINUX_COMP == INTEL
) then
1684 ifort
-v >>&! version_info
1686 echo " " >>! version_info
1687 echo "OS version info: " >>! version_info
1688 uname
-a >>&! version_info
1689 echo " " >>! version_info
1691 echo "Unrecognized architecture for regression test" >! error_message
1692 echo `uname` >> error_message
1693 echo `hostname` >> error_message
1694 $MAIL -s "Unknown architecture $ARCH[1] " $FAIL_MAIL < error_message
1698 #####################################################################
1699 #DAVE###################################################
1700 echo did the arch specific stuff
1703 #DAVE###################################################
1705 if ( $FDDA == TRUE
) then
1706 if ( ( $PHYSOPTS_FDDA == GRID
) && ( $ZAP_OPENMP == FALSE
) ) then
1707 set ZAP_OPENMP
= FALSE
1708 else if ( $PHYSOPTS_FDDA == BOTH
) then
1709 set ZAP_OPENMP
= TRUE
1713 # First of all, in which particular directory do we start.
1717 # We want to keep the old regression stuff around
1719 if ( -d regression_test
) then
1720 if ( -d regression_test.old
) then
1721 /bin
/rm -fr regression_test.old
1723 /bin
/mv regression_test regression_test.old
1726 # Go to the regression test directory
1728 mkdir regression_test
1730 if ( $ok != 0 ) then
1731 echo "Gee, I cannot make a directory in $DEF_DIR" >! error_message
1732 echo `pwd` >> error_message
1733 echo `\ls -ls` >> error_message
1734 $MAIL -s "$DEF_DIR not writable $ARCH[1] " $FAIL_MAIL < error_message
1737 pushd regression_test
1740 if ( $acquire_from == "cvs" ) then
1742 # Checkout the most recent version of WRF from the NCAR cvs repository,
1743 # and pick up the required input data from the anonymous ftp site.
1745 cvs checkout
-D $thedate WRFV3
1746 find .
/WRFV3
-exec touch \
{\
} \
;
1747 ftp -n ftp.ucar.edu
< ftp_script_data
1750 else if ( $acquire_from == "filearg" ) then
1752 # A tar file of the WRF source was provided, so that is used, along with
1753 # the required input data files from the ftp site.
1759 ftp -n ftp.ucar.edu
< ftp_script_data
1761 else if ( $acquire_from == "environment" ) then
1763 # A tar file of WRF is assumed to be available.
1769 # And we can stick the input data where we want, the WRFV3 directory has been created.
1771 ( cd WRFV
3/test
/em_real
; ln -sf $thedataem/* .
)
1772 #( cd WRFV3/test/nmm_real ; ln -s $thedatanmm/wrf_real* . ; cp $thedatanmm/namelist.input.regtest . )
1773 ( cd WRFV
3/test
/nmm_real
; ln -s $thedatanmm/wrf_real
* .
; ln -s $thedatanmm/wrf_nest
* .
; ln -s $thedatanmm/geo_
* .
; \
1774 cp $thedatanmm/namelist.nest.regtest .
; ln -s $thedatanmm/met_nmm
* .
; \
1775 sed '/dyn_opt/d' $thedatanmm/namelist.input.regtest
>! .
/namelist.input.regtest
)
1777 ( cd WRFV
3/test
/nmm_real
; ln -s $thedatanmm/wrfinput_hwrf
* .
; ln -s $thedatanmm/nest1
* .
; \
1778 ln -s $thedatanmm/wrfbdy_hwrf
* .
; cp $thedatanmm/namelist.input.hwrf .
; )
1780 #DAVE###################################################
1781 ( cd WRFV
3/test
/em_real
; ls -ls )
1782 ( cd WRFV
3/test
/nmm_real
; ls -ls )
1785 #DAVE###################################################
1787 # John-specific stuff for maple is the else; part of the "using service machines".
1792 if ( ! -d $TMPDIR ) then
1793 echo something wrong
1
1795 if ( ! -d $TMPDIR/RUN
) then
1797 /bin
/rm -fr $TMPDIR/RUN
/*
1799 if ( -d $TMPDIR/RUN
) then
1800 tar cf
- .
/WRFV
3/test .
/WRFV
3/main |
( cd $TMPDIR/RUN
; tar xvf
- )
1803 echo something wrong
2
1808 # Here we initialize our output message.
1810 if ( -e ${DEF_DIR}/wrftest.output
) rm ${DEF_DIR}/wrftest.output
1811 echo "Architecture $ARCH[1] machine: `hostname`" >>! ${DEF_DIR}/wrftest.output
1812 echo "WRFV3 source from: $acquire_from " >>! ${DEF_DIR}/wrftest.output
1813 echo "Number of OpenMP processes to use: $OPENMP" >>! ${DEF_DIR}/wrftest.output
1814 echo "Number of MPI processes to use: $Num_Procs" >>! ${DEF_DIR}/wrftest.output
1815 if ( $ARCH[1] == Darwin
) then
1816 set name
= `finger $user | grep "Name:" | awk '{print $4 " " $5}'`
1818 set name
= ( `grep ^${user}: /etc/passwd | cut -d: -f5` )
1820 echo "Test conducted by $name" >>! ${DEF_DIR}/wrftest.output
1821 echo " " >>! ${DEF_DIR}/wrftest.output
1822 echo "Test run from directory ${CUR_DIR}" >>! ${DEF_DIR}/wrftest.output
1823 echo " " >>! ${DEF_DIR}/wrftest.output
1824 if ( $?LOADL_JOB_NAME
) then
1825 echo "Loadlever job name = ${LOADL_JOB_NAME}" >>! ${DEF_DIR}/wrftest.output
1826 echo " " >>! ${DEF_DIR}/wrftest.output
1828 echo "Real data case for EM is from $dataset " >>! ${DEF_DIR}/wrftest.output
1829 echo " " >>! ${DEF_DIR}/wrftest.output
1830 echo "The em real and ideal forecasts will be nested: $NESTED " >>! ${DEF_DIR}/wrftest.output
1831 echo " " >>! ${DEF_DIR}/wrftest.output
1832 if ( $REG_TYPE == BIT4BIT
) then
1833 echo "This is a bit-wise (traditional) regression test. " >>! ${DEF_DIR}/wrftest.output
1834 echo " " >>! ${DEF_DIR}/wrftest.output
1835 else if ( $REG_TYPE == OPTIMIZED
) then
1836 echo "This is a fully optimized regression test. " >>! ${DEF_DIR}/wrftest.output
1837 echo "No inter-comparisons are made. " >>! ${DEF_DIR}/wrftest.output
1838 echo " " >>! ${DEF_DIR}/wrftest.output
1840 if ( $REAL8 == TRUE
) then
1841 echo "Floating point precision is 8-bytes" >>! ${DEF_DIR}/wrftest.output
1842 echo " " >>! ${DEF_DIR}/wrftest.output
1844 if ( ( $CHEM == TRUE
) && ( $KPP != TRUE
) ) then
1845 echo "WRF_CHEM tests run for em_real core only" >>! ${DEF_DIR}/wrftest.output
1846 echo " " >>! ${DEF_DIR}/wrftest.output
1847 else if ( ( $CHEM == TRUE
) && ( $KPP == TRUE
) ) then
1848 echo "WRF_CHEM KPP tests run for em_real core only" >>! ${DEF_DIR}/wrftest.output
1849 echo " " >>! ${DEF_DIR}/wrftest.output
1851 if ( $ADAPTIVE == TRUE
) then
1852 echo "Adaptive time step for em_real core only" >>! ${DEF_DIR}/wrftest.output
1853 echo " " >>! ${DEF_DIR}/wrftest.output
1855 if ( $GLOBAL == TRUE
) then
1856 echo "Global tests run for em_real core only" >>! ${DEF_DIR}/wrftest.output
1857 echo " " >>! ${DEF_DIR}/wrftest.output
1859 if ( $ESMF_LIB == TRUE
) then
1860 echo "A separately installed version of the latest ESMF library" >>! ${DEF_DIR}/wrftest.output
1861 echo "(NOT the ESMF library included in the WRF tarfile) will" >>! ${DEF_DIR}/wrftest.output
1862 echo "be used for MPI tests" >>! ${DEF_DIR}/wrftest.output
1863 echo " " >>! ${DEF_DIR}/wrftest.output
1865 if ( $QUILT == TRUE
) then
1866 echo "One WRF output quilt server will be used for some tests" >>! ${DEF_DIR}/wrftest.output
1867 echo " " >>! ${DEF_DIR}/wrftest.output
1869 if ( $FDDA == TRUE
) then
1870 if ( $PHYSOPTS_FDDA == GRID
) then
1871 echo "Running FDDA tests (grid nudging only)" >>! ${DEF_DIR}/wrftest.output
1872 echo " " >>! ${DEF_DIR}/wrftest.output
1873 else if ( $PHYSOPTS_FDDA == BOTH
) then
1874 echo "Running FDDA tests (grid=1, obs=2, grid+obs=3)" >>! ${DEF_DIR}/wrftest.output
1875 echo " " >>! ${DEF_DIR}/wrftest.output
1878 if ( $HWRF == TRUE
) then
1879 echo "Running HWRF specific NMM-core only" >>! ${DEF_DIR}/wrftest.output
1880 echo " " >>! ${DEF_DIR}/wrftest.output
1882 if ( $GENERATE_BASELINE != FALSE
) then
1883 echo "WRF output will be archived in baseline directory ${GENERATE_BASELINE} for some tests" >>! \
1884 ${DEF_DIR}/wrftest.output
1885 echo " " >>! ${DEF_DIR}/wrftest.output
1887 if ( $COMPARE_BASELINE != FALSE
) then
1888 echo "WRF output will be compared with files in baseline directory ${COMPARE_BASELINE} for some tests" >>! \
1889 ${DEF_DIR}/wrftest.output
1890 echo " " >>! ${DEF_DIR}/wrftest.output
1892 echo "The selected I/O option is $IO_FORM ($IO_FORM_NAME[$IO_FORM])" >>! ${DEF_DIR}/wrftest.output
1893 if ( $IO_FORM_WHICH[$IO_FORM] == IO
) then
1894 echo "This option is for both input and history files" >>! ${DEF_DIR}/wrftest.output
1895 echo " " >>! ${DEF_DIR}/wrftest.output
1896 else if ( $IO_FORM_WHICH[$IO_FORM] == I
) then
1897 echo "This option is for input files only" >>! ${DEF_DIR}/wrftest.output
1898 echo " " >>! ${DEF_DIR}/wrftest.output
1899 else if ( $IO_FORM_WHICH[$IO_FORM] == O
) then
1900 echo "This option is for history files only" >>! ${DEF_DIR}/wrftest.output
1901 echo " " >>! ${DEF_DIR}/wrftest.output
1904 cat ${CUR_DIR}/version_info
>>! ${DEF_DIR}/wrftest.output
1906 # There are three WRF em executables to be considered that can run in threaded and
1907 # distributed memory. The 2d hills and 2d squall lines cannot be parallelized with
1908 # MPI, and are therefore not considered in this shell. The nmm is only run with
1909 # distributed memory (1 vs 4 procs).
1911 set first_time_in
= TRUE
1912 foreach core
( $CORES )
1913 #DAVE###################################################
1914 echo doing core
$core
1917 #DAVE###################################################
1919 # Some sleight of hand is required for the chemistry tests because we need to
1920 # build it twice. But normally, we only build with different real vs ideal, or em vs nmm.
1921 # What to do, what to do? Well, we ask for em_real TWICE. The first time we build without chemistry
1922 # activated, the second time with it activated. The first time, we do a single
1923 # test, the second time through, we do the other 5 tests.
1925 if ( ( $CHEM == TRUE
) && ( ${#CORES} == 2 ) && ( $first_time_in == TRUE
) ) then
1927 set PHYSOPTS
= ( 1 )
1928 set first_time_in
= FALSE
1929 else if ( ( $CHEM == TRUE
) && ( $KPP != TRUE
) && ( ${#CORES} == 2 ) && ( $first_time_in != TRUE
) ) then
1931 set PHYSOPTS
= ( 2 3 4 5 6 )
1932 else if ( ( $CHEM == TRUE
) && ( $KPP == TRUE
) && ( ${#CORES} == 2 ) && ( $first_time_in != TRUE
) ) then
1934 set PHYSOPTS
= ( 2 3 )
1939 set ZAP_SERIAL_FOR_THIS_CORE
= FALSE
1940 set ZAP_OPENMP_FOR_THIS_CORE
= FALSE
1941 if ( `echo $core | cut -c 1-2` == em
) then
1942 setenv WRF_EM_CORE
1
1943 setenv WRF_NMM_CORE
0
1944 setenv WRF_COAMPS_CORE
0
1945 setenv WRF_EXP_CORE
0
1946 set ZAP_SERIAL_FOR_THIS_CORE
= FALSE
1947 set ZAP_OPENMP_FOR_THIS_CORE
= FALSE
1948 else if ( `echo $core | cut -c 1-3` == nmm
) then
1949 setenv WRF_EM_CORE
0
1950 setenv WRF_NMM_CORE
1
1951 setenv WRF_NMM_NEST
1
1952 setenv WRF_COAMPS_CORE
0
1953 setenv WRF_EXP_CORE
0
1954 set ZAP_SERIAL_FOR_THIS_CORE
= TRUE
1955 set ZAP_OPENMP_FOR_THIS_CORE
= TRUE
1956 if ( ($HWRF == TRUE
) ) then
1961 # Here we are looping over all of the various compilation configurations,
1962 # such as serial only, OpenMP only, MPI only, etc. Each architecture
1963 # has its own list of these options. We build each of the executables for
1964 # this particular ${core}.
1966 foreach compopt
( $COMPOPTS )
1967 #DAVE###################################################
1968 echo doing compile option
$compopt
1971 #DAVE###################################################
1973 # We sometimes are interested in bypassing the OpenMP option.
1975 if ( $compopt == $COMPOPTS[2] ) then
1976 if ( $ZAP_OPENMP == TRUE ||
$ZAP_OPENMP_FOR_THIS_CORE == TRUE
) then
1981 # NMM only runs parallel
1982 if ( $compopt == $COMPOPTS[1] ) then
1983 if ( $ZAP_SERIAL == TRUE ||
$ZAP_SERIAL_FOR_THIS_CORE == TRUE
) then
1988 if ( `uname` == AIX
) goto BUILD_REGARDLESS
1990 # Did we already build this one?
1992 if ( $core == em_real
) then
1993 if ( ( $compopt == $COMPOPTS[1] ) && \
1994 ( -e main
/wrf_
${core}.exe.
$compopt ) && \
1995 ( -e main
/real_
${core}.exe
.1 ) && \
1996 ( -e ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
) ) then
1998 else if ( ( $compopt != $COMPOPTS[1] ) && \
1999 ( -e main
/wrf_
${core}.exe.
$compopt ) && \
2000 ( -e ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
) ) then
2004 if ( ( $compopt == $COMPOPTS[1] ) && \
2005 ( -e main
/wrf_
${core}.exe.
$compopt ) && \
2006 ( -e main
/ideal_
${core}.exe
.1 ) && \
2007 ( -e ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
) ) then
2009 else if ( ( $compopt != $COMPOPTS[1] ) && \
2010 ( -e main
/wrf_
${core}.exe.
$compopt ) && \
2011 ( -e ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
) ) then
2018 # The WRF configuration file works with a single integer
2019 # input, which is the compiler option. By convention, option $COMPOPTS[1] is
2020 # serial, $COMPOPTS[2] is OMP, and $COMPOPTS[3] is MPI.
2022 # Print info about use of separately installed ESMF library.
2023 set esmf_lib_str
= " - - - - - - - - - - - - - "
2024 if ( $ESMF_LIB == TRUE
) then
2025 # only test ESMF with MPI
2026 if ( $compopt == $COMPOPTS[3] ) then
2027 echo "A separately installed version of the latest ESMF library" >>! ${DEF_DIR}/wrftest.output
2028 echo "(NOT the ESMF library included in the WRF tarfile) is" >>! ${DEF_DIR}/wrftest.output
2029 echo "being used for this test of $core parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
2030 set esmf_lib_str
= "using separate ESMF library"
2031 echo "Setting ESMFLIB = ${ESMFLIBSAVE}" >>! ${DEF_DIR}/wrftest.output
2032 echo "Setting ESMFINC = ${ESMFINCSAVE}" >>! ${DEF_DIR}/wrftest.output
2033 setenv ESMFLIB
$ESMFLIBSAVE
2034 setenv ESMFINC
$ESMFINCSAVE
2041 #DAVE###################################################
2042 echo start build mechanism
2045 #DAVE###################################################
2048 # Edit build command for either bit-wise comparison or full optimization.
2050 if ( $REG_TYPE == BIT4BIT
) then
2056 # Edit build command. If this is a nested run, then either static nest
2057 # (idealized) or prescribed move (em_real). If not nested, then shut off
2058 # the nesting build option.
2060 if ( $NESTED == TRUE
) then
2061 if ( $core == em_real
) then
2062 set compopts_nest
= $COMPOPTS_NEST_PRESCRIBED
2064 set compopts_nest
= $COMPOPTS_NEST_STATIC
2067 set compopts_nest
= $COMPOPTS_NO_NEST
2070 .
/configure
$DEBUG_FLAG << EOF
2074 cp configure.wrf configure.wrf.core
=${core}_build
=${compopt}
2076 # The configure.wrf file needs to be adjusted as to whether we are requesting real*4 or real*8
2077 # as the default floating precision.
2079 if ( $REAL8 == TRUE
) then
2080 sed -e '/^RWORDSIZE/s/\$(NATIVE_RWORDSIZE)/8/' configure.wrf
> ! foo
; /bin
/mv foo configure.wrf
2083 # Fix the OpenMP default for IBM regression testing - noopt required for bit-wise comparison.
2085 if ( ( $compopt == $COMPOPTS[2] ) && ( `uname` == AIX
) ) then
2086 sed -e '/^OMP/s/-qsmp=noauto/-qsmp=noauto:noopt/' configure.wrf
> ! foo
; /bin
/mv foo configure.wrf
2089 # Save the configure file.
2091 cp configure.wrf configure.wrf.core
=${core}_build
=${compopt}
2093 #DAVE###################################################
2094 echo configure built with optim mods removed
, ready to compile
2097 #DAVE###################################################
2099 # The WRF_SRC_ROOT_DIR hack is only used by the OSF1 build.
2100 # It works around the annoying fact that in OSF1 $(PWD) does
2101 # not change during execution of regtest.csh, despite the "cd"
2102 # and "pushd" commands.
2103 setenv WRF_SRC_ROOT_DIR
"${DEF_DIR}/regression_test/WRFV3"
2104 # Build this executable
2106 .
/compile
$core >&! compile_
${core}_build
=${compopt}.log
2107 #DAVE###################################################
2111 #DAVE###################################################
2113 # Did the compile work? Check the expected executable names and locations.
2116 if ( ! -x main
/wrf.exe
) set ok
= 1
2118 if ( ( $core == em_real
) && ( $compopt == $COMPOPTS[1] ) ) then
2119 if ( ! -e main
/real.exe
) set ok
= 1
2120 else if ( ( $core == nmm_real
) && ( $compopt == $COMPOPTS[3] ) ) then
2121 if ( ! -e main
/real_nmm.exe
) set ok
= 1
2122 else if ( $compopt == $COMPOPTS[1] ) then
2123 if ( ! -e main
/ideal.exe
) set ok
= 1
2126 if ( ! -x external
/io_netcdf
/diffwrf
) set ok
= 1
2127 # if ( ! -x external/io_int/diffwrf ) set ok = 1
2129 if ( $ok != 0 ) then
2130 echo "SUMMARY compilation for $core parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2131 $MAIL -s "REGRESSION FAILURE $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2134 echo "SUMMARY compilation for $core parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
2135 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2136 mv main
/wrf.exe main
/wrf_
${core}.exe.
$compopt
2137 if ( ( $core == em_real
) && ( $compopt == $COMPOPTS[1] ) ) then
2138 mv main
/real.exe main
/real_
${core}.exe
.1
2139 else if ( ( $core == nmm_real
) && ( $compopt == $COMPOPTS[3] ) ) then
2140 mv main
/real_nmm.exe main
/real_
${core}.exe.
$COMPOPTS[3]
2141 else if ( $compopt == $COMPOPTS[1] ) then
2142 mv main
/ideal.exe main
/ideal_
${core}.exe
.1
2144 #DAVE###################################################
2149 #DAVE###################################################
2155 cp main
/*exe
* $TMPDIR/RUN
/WRFV
3/main
2161 pushd $TMPDIR/RUN
/WRFV3
2164 # We have all of the executables built, now we run'em. This is a loop
2165 # over all of the various physics options for this particular
2166 # ${core}. Inside the physics loop, we loop over the parallel options.
2167 # This allows us to use the same WRF input files for each of the parallel
2168 # choices for a single physics loop index.
2170 foreach phys_option
( $PHYSOPTS )
2171 #DAVE###################################################
2172 echo which phys option
$phys_option
2175 #DAVE###################################################
2177 # For each of the executables, we need to run several physics
2180 if ( $core == em_real
) then
2182 if ( $CHEM != TRUE
) then
2183 set filetag
=$filetag_real
2184 else if ( $CHEM == TRUE
) then
2185 if ( $phys_option <= 3 ) then
2186 set filetag
=$filetag_real[1]
2188 set filetag
=$filetag_real[2]
2192 foreach compopt
( $COMPOPTS )
2193 #DAVE###################################################
2194 echo real
if filetag is
$filetag
2195 echo compopt
= $compopt
2198 #DAVE###################################################
2200 # We sometimes are interested in bypassing the OpenMP option.
2202 if ( $compopt == $COMPOPTS[2] ) then
2203 if ( $ZAP_OPENMP == TRUE ||
$ZAP_OPENMP_FOR_THIS_CORE == TRUE
) then
2204 goto BYPASS_COMP_LOOP_REAL
2208 if ( $compopt == $COMPOPTS[1] ) then
2209 if ( $ZAP_SERIAL == TRUE ||
$ZAP_SERIAL_FOR_THIS_CORE == TRUE
) then
2210 goto BYPASS_COMP_LOOP_REAL
2217 # Create the correct namelist.input file for real data cases.
2220 if ( $CHEM != TRUE
) then
2221 cp ${CUR_DIR}/phys_real_
${phys_option} phys_opt
2222 if ( $NESTED != TRUE
) then
2223 cp ${CUR_DIR}/dyn_real_
${phys_option} dyn_opt
2225 cp ${CUR_DIR}/dyn_real_SAFE dyn_opt
2227 cp ${CUR_DIR}/time_real_
${phys_option} time_opt
2228 cp ${CUR_DIR}/dom_real dom_real
2229 cp ${CUR_DIR}/nest_real_
${phys_option} nest_input_opt
2230 cp ${CUR_DIR}/damp_real_
${phys_option} damp_real
2231 if ( -e fdda_opt
) rm fdda_opt
2232 cat " grid_fdda=0" > fdda_opt
2233 if ( -e fdda_time
) rm fdda_time
2235 if ( $FDDA == TRUE
) then
2236 cp ${CUR_DIR}/fdda_real_
${phys_option} fdda_opt
2237 cp ${CUR_DIR}/fdda_real_time_
${phys_option} fdda_time
2240 set time_step
= `awk ' /^ time_step /{ print $3 } ' namelist.input.$dataset | cut -d, -f1`
2242 # Wanna do more/less time steps on the real cases? Easy. Those last two numbers
2243 # in the eqns are all you need. Their product must be 60. So, instead of 3 and 20,
2244 # (3 coarse grid timesteps), you could use 20 and 3 (20 coarse grid time steps).
2246 if ( $NESTED == TRUE
) then
2247 @ run_seconds
= $time_step * 3
2248 @ history_interval
= $time_step / 20
2249 else if ( $NESTED != TRUE
) then
2250 @ run_seconds
= $time_step * 10
2251 @ history_interval
= $time_step / 6
2253 rm ed_in namelist.input.temp
2255 g/run_seconds/s/[0-9]/$run_seconds
2256 g/history_interval/s/[0-9][0-9][0-9]/$history_interval
2257 w namelist.input.temp
2260 ed namelist.input.
$dataset < ed_in
2262 cp ${CUR_DIR}/io_format io_format
2263 sed -e '/^ mp_physics/,/ensdim/d' -e '/^ &physics/r ./phys_opt' \
2264 -e '/^ moist_adv_opt/,/scalar_adv_opt/d' -e '/^ non_hydrostatic/r ./dyn_opt' \
2265 -e '/^ auxinput1_inname/d' -e '/^ debug_level/r ./time_opt' \
2266 -e '/^ input_from_file/d' -e '/^ interval_seconds/r ./nest_input_opt' \
2267 -e '/^ time_step /,/^ smooth_option/d' -e '/^ &domains/r ./dom_real' \
2268 -e '/^ damp_opt /,/^ dampcoef/d' -e '/^ base_temp/r ./damp_real' \
2269 -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
2270 -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 200/g' \
2271 -e 's/ run_days *= [0-9][0-9]*/ run_days = 0/g' \
2272 -e 's/ run_hours *= [0-9][0-9]*/ run_hours = 0/g' \
2273 -e 's/ run_minutes *= [0-9][0-9]*/ run_minutes = 0/g' \
2274 -e '/^ &fdda/r fdda_opt' \
2275 -e '/^ debug_level/r fdda_time' \
2277 namelist.input.temp
>! namelist.input
2279 # The chem run has its own namelist, due to special input files (io_form not tested for chem)
2281 else if ( $CHEM == TRUE
) then
2282 if ( ( $KPP == TRUE
) && ( $phys_option >= 3 ) ) then
2283 sed -e '/dyn_opt/d' \
2284 -e 's/^ chem_opt *= [0-9]/ chem_opt = '${CHEM_OPT}'/' \
2285 namelist.input.chem_test_
${phys_option} >! namelist.input
2287 sed -e '/dyn_opt/d' \
2288 namelist.input.chem_test_
${phys_option} >! namelist.input
2291 if ( -e met_em.d01.
${filetag} ) then
2294 if ( ${phys_option} <= 3 ) then
2302 # WRF output quilt servers are only tested for MPI configuration.
2303 # Currently, only one WRF output quilt server is used.
2305 if ( $QUILT == TRUE
) then
2306 if ( $compopt == $COMPOPTS[3] ) then
2307 # For now, test only one group of one output quilt servers.
2308 sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \
2309 -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \
2310 namelist.input
>! namelist.input.temp
2311 mv -f namelist.input.temp namelist.input
2312 echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled."
2313 echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
2317 /bin
/cp namelist.input
$TMPDIR/namelist.input.
$core.
${phys_option}.
$compopt
2318 #DAVE###################################################
2319 echo built namelist
$TMPDIR/namelist.input.
$core.
${phys_option}.
$compopt
2320 cat $TMPDIR/namelist.input.
$core.
${phys_option}.
$compopt
2321 echo need
history interval to be
30
2324 #DAVE###################################################
2325 #DAVE###################################################
2326 echo skipped link of data files
, we push them elsewhere
2330 #DAVE###################################################
2332 # If this is the serial code, generate the IC and BC. The real.exe program is not
2333 # parallelized, so the data is generated and saved for the rest of the parallel tests.
2334 # This data is necessarily updated for each of the physics tests.
2336 if ( $compopt == $COMPOPTS[1] ) then
2338 # Zap any old input data laying around.
2340 rm wrfinput_d01
>& /dev
/null
2341 rm wrfbdy_d01
>& /dev
/null
2343 if ( $NESTED == TRUE
) then
2344 setenv OMP_NUM_THREADS
1
2345 if ( `uname` == AIX
) then
2346 setenv XLSMPOPTS
"parthds=1"
2348 $SERIALRUNCOMMAND ..
/..
/main
/real_
${core}.exe.1 >! print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt}
2349 else if ( $NESTED != TRUE
) then
2350 ..
/..
/main
/real_
${core}.exe.1 >! print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt}
2352 #DAVE###################################################
2356 #DAVE###################################################
2358 grep "SUCCESS COMPLETE" print.out.real_
${core}_Phys=${phys_option}_Parallel=${compopt} >& /dev
/null
2359 set success
= $status
2361 # Did making the IC BC files work?
2363 if ( $GLOBAL == FALSE
) then
2364 if ( ( -e wrfinput_d01
) && ( -e wrfbdy_d01
) && ( $success == 0 ) ) then
2365 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
2366 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2368 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2369 $MAIL -s "WRF FAIL making IC/BC $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2370 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 4 )
2371 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2373 else if ( $GLOBAL == TRUE
) then
2374 if ( ( -e wrfinput_d01
) && ( $success == 0 ) ) then
2375 echo "SUMMARY generate IC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
2376 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2378 echo "SUMMARY generate IC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2379 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2380 $MAIL -s "WRF FAIL making IC $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2381 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 41 )
2384 #DAVE###################################################
2385 echo IC BC must be OK
2387 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
2388 ncdump
-v Times wrfb
* |
tail -20
2392 #DAVE###################################################
2395 # Run the forecast for this core, physics package and parallel option
2397 rm $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$compopt >& /dev
/null
2399 # The chem run has its own set of namelists, due to special input files.
2401 if ( $CHEM == TRUE
) then
2403 # WRF output quilt servers are only tested for MPI configuration.
2404 # Currently, only one WRF output quilt server is used.
2406 if ( $QUILT == TRUE
) then
2407 if ( $compopt == $COMPOPTS[3] ) then
2408 # For now, test only one group of one output quilt servers.
2409 sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \
2410 -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \
2411 namelist.input
>! namelist.input.temp
2412 mv -f namelist.input.temp namelist.input
2413 echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled."
2414 echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
2419 if ( $compopt == $COMPOPTS[1] ) then
2420 setenv OMP_NUM_THREADS
1
2421 if ( `uname` == AIX
) then
2422 setenv XLSMPOPTS
"parthds=1"
2424 if ( $NESTED == TRUE
) then
2425 $SERIALRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}
2426 else if ( $NESTED != TRUE
) then
2427 ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}
2429 else if ( $compopt == $COMPOPTS[2] ) then
2430 setenv OMP_NUM_THREADS
$OPENMP
2431 if ( `uname` == AIX
) then
2432 setenv XLSMPOPTS
"parthds=${OPENMP}"
2434 if ( $NESTED == TRUE
) then
2435 $OMPRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}
2436 else if ( $NESTED != TRUE
) then
2437 ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}
2439 else if ( $compopt == $COMPOPTS[3] ) then
2440 setenv OMP_NUM_THREADS
1
2441 if ( `uname` == AIX
) then
2442 setenv XLSMPOPTS
"parthds=1"
2444 $MPIRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.
$compopt $MPIRUNCOMMANDPOST
2445 mv rsl.error
.0000 print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}
2447 #DAVE###################################################
2448 echo ran wrf fcst compopt
= $compopt
2451 #DAVE###################################################
2453 grep "SUCCESS COMPLETE" print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}
2454 set success
= $status
2456 # Did making the forecast work, by that, we mean "is there an output file created", and "are there 2 times periods".
2458 if ( ( -e wrfout_d01_
${filetag} ) && ( $success == 0 ) ) then
2459 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
2460 ncdump
-h wrfout_d01_
${filetag} |
grep Time |
grep UNLIMITED |
grep currently |
grep -q 2
2463 if ( `uname` == AIX
) then
2464 ncdump wrfout_d01_
${filetag} |
grep NaN
>& /dev
/null
2465 set found_nans
= $status
2466 else if ( `uname` == OSF1
) then
2467 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
2468 # set found_nans = $status
2469 else if ( `uname` == Linux
) then
2470 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
2471 set found_nans
= $status
2473 if ( $found_nans == 0 ) then
2478 else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1
) then
2479 # set joe_times = `../../external/io_grib1/wgrib -s -4yr wrfout_d01_${filetag} | grep -v ":anl:" | wc -l`
2480 # if ( $joe_times >= 100 ) then
2481 set joe_times
= `../../external/io_grib1/wgrib -s -4yr wrfout_d01_${filetag} | grep "UGRD:10 m" | wc -l`
2482 if ( $joe_times == 2 ) then
2488 if ( $ok == 0 ) then
2489 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
2490 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2492 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2493 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2494 $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2495 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 5 )
2498 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2499 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2500 $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2501 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 6 )
2503 #DAVE###################################################
2504 echo success or failure of fcst
2505 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
2506 ncdump
-v Times wrfout_d01_
${filetag} |
tail -20
2510 #DAVE###################################################
2512 # We have to save this output file for our biggy comparison after all of the
2513 # parallel options have been considered.
2515 mv wrfout_d01_
${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.
$compopt
2517 # To save space, we move the executables after we are finished with them.
2519 if ( $phys_option == $PHYSOPTS[${#PHYSOPTS}] ) then
2520 mv ..
/..
/main
/wrf_
${core}.exe.
$compopt $TMPDIR/wrf_
${core}.exe.
$compopt
2525 BYPASS_COMP_LOOP_REAL
:
2529 else if ( $core == nmm_real
&& ( $HWRF == FALSE
) ) then
2530 #DAVE###################################################
2531 echo doing nmm pre no-nest
2534 #DAVE###################################################
2536 set compopt
= $COMPOPTS[3] # ! parallel only
2537 set filetag
= 2005-01-23_00:00:00
2541 #DAVE###################################################
2543 echo $filetag $phys_option
2546 #DAVE###################################################
2548 # Build NMM namelist
2550 cp ${CUR_DIR}/io_format io_format
2551 sed -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
2552 namelist.input.regtest
>! namelist.input.temp
2554 # A fairly short forecast, 10 time steps
2556 sed -e 's/^ run_days *= *[0-9]*/ run_days = 0 /' \
2557 -e 's/^ run_seconds *= *[0-9]*/ run_seconds = 1800 /' \
2558 -e 's/^ history_interval *= *[0-9][0-9]*/ history_interval = 30,30 /' \
2559 -e 's/^ frames_per_outfile *= [0-9]*/ frames_per_outfile = 200/g' \
2560 namelist.input.temp
>! namelist.input
2562 #DAVE###################################################
2563 echo did
cp of namelist no-nest
2564 ls -ls namelist.input
2568 #DAVE###################################################
2570 # Generate IC/BC for NMM run
2572 set RUNCOMMAND
= `echo $MPIRUNCOMMAND | sed "s/$Num_Procs/1/"`
2574 # Zap any old input data laying around.
2576 rm wrfinput_d01
>& /dev
/null
2577 rm wrfbdy_d01
>& /dev
/null
2579 $RUNCOMMAND ..
/..
/main
/real_
${core}.exe.$COMPOPTS[3] >! print.out.real_${core}_Phys=${phys_option}_Parallel
=$COMPOPTS[3]
2580 #DAVE###################################################
2581 echo finished real no-nest
2584 #DAVE###################################################
2586 mv rsl.out
.0000 print.out.real_
${core}_Phys=${phys_option}_Parallel=${compopt}
2587 grep "SUCCESS COMPLETE" print.out.real_
${core}_Phys=${phys_option}_Parallel=${compopt} >& /dev
/null
2588 set success
= $status
2590 # Did making the IC BC files work?
2592 if ( ( -e wrfinput_d01
) && ( -e wrfbdy_d01
) && ( $success == 0 ) ) then
2593 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
2594 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2596 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2597 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2598 $MAIL -s "WRF FAIL making IC/BC $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2599 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 4 )
2601 #DAVE###################################################
2602 echo IC BC must be OK no-nest
2603 ls -lsL wrfinput
* wrfb
*
2604 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
2605 ncdump
-v Times wrfb
* |
tail -20
2609 #DAVE###################################################
2611 # Run on 1 and then on Num_Procs processors
2613 foreach n
( 1 $Num_Procs )
2614 #DAVE###################################################
2615 echo running nmm on
$n procs no-nest
2618 #DAVE###################################################
2620 if ( ( $n != 1 ) && ( $QUILT != TRUE
) ) then
2621 @ nmm_proc
= $Num_Procs
2622 cat >! nproc_xy
<< EOF
2626 sed -e '/^ numtiles/r nproc_xy' namelist.input
>! file.foo
2627 mv file.foo namelist.input
2628 else if ( ( $n != 1 ) && ( $QUILT == TRUE
) ) then
2629 @ nmm_proc
= $Num_Procs - 1
2630 cat >! nproc_xy
<< EOF
2634 sed -e '/^ numtiles/r nproc_xy' namelist.input
>! file.foo
2635 mv file.foo namelist.input
2638 if ( `uname` == AIX
) then
2639 set RUNCOMMAND
= $MPIRUNCOMMAND
2641 set RUNCOMMAND
= `echo $MPIRUNCOMMAND | sed "s/$Num_Procs/$n/"`
2644 # WRF output quilt servers are only tested for MPI configuration.
2645 # Currently, only one WRF output quilt server is used.
2647 if ( ( $QUILT == TRUE
) && ( $n == $Num_Procs ) ) then
2648 if ( $compopt == $COMPOPTS[3] ) then
2649 # For now, test only one group of one output quilt servers.
2650 sed -e 's/ nio_tasks_per_group *= *[0-9]*/ nio_tasks_per_group = 1/g' \
2651 -e 's/ nio_groups *= *[0-9]*/ nio_groups = 1/g' \
2652 namelist.input
>! namelist.input.temp
2653 mv -f namelist.input.temp namelist.input
2654 echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled."
2655 echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
2659 # NMM can fail on spurious fp exceptions that don't affect soln. Retry if necessary.
2662 while ( $tries < 2 )
2663 #DAVE###################################################
2664 echo try attempt
$tries allowed to be
less than
2
2667 #DAVE###################################################
2668 @ tries
= $tries + 1
2669 $RUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.
$compopt $MPIRUNCOMMANDPOST
2670 mv rsl.error
.0000 print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}_${n}p
2671 grep "SUCCESS COMPLETE" print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}_${n}p
2672 set success
= $status
2674 if ( ( -e wrfout_d01_
${filetag} ) && ( $success == 0 ) ) then
2675 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
2676 ncdump
-h wrfout_d01_
${filetag} |
grep Time |
grep UNLIMITED |
grep currently |
grep -q 2
2679 if ( `uname` == AIX
) then
2680 ncdump wrfout_d01_
${filetag} |
grep NaN
>& /dev
/null
2681 set found_nans
= $status
2682 else if ( `uname` == OSF1
) then
2683 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
2684 # set found_nans = $status
2685 else if ( `uname` == Linux
) then
2686 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
2687 set found_nans
= $status
2689 if ( $found_nans == 0 ) then
2694 else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1
) then
2695 ..
/..
/external
/io_grib
1/wgrib
-s -4yr wrfout_d01_
${filetag} |
grep "UGRD:10 m above gnd:3600 sec fcst"
2698 if ( $ok == 0 ) then
2699 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
2700 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2701 set tries
=2 # success, bail from loop
2703 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2704 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2705 $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2706 if ( if ( $KEEP_ON_RUNNING == FALSE
) && ( $tries == 2 ) )exit ( 5 )
2709 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2710 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2711 $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2712 if ( if ( $KEEP_ON_RUNNING == FALSE
) && ( $tries == 2 ) ) exit ( 6 )
2714 mv wrfout_d01_
${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.${compopt}_${n}p
2715 #DAVE###################################################
2716 echo did nmm fcst no-nest
2717 ls -ls $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.${compopt}_${n}p
2720 #DAVE###################################################
2726 #DAVE###################################################
2727 echo doing nmm pre nesting
2730 #DAVE###################################################
2732 set compopt
= $COMPOPTS[3] # ! parallel only
2733 set filetag
= 2008-03-06_00:00:00
2737 #DAVE###################################################
2739 echo $filetag $phys_option
2742 #DAVE###################################################
2744 # Build NMM namelist
2746 cp ${CUR_DIR}/io_format io_format
2747 sed -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
2748 namelist.nest.regtest
>! namelist.input.temp
2750 # A fairly short forecast, 10 time steps
2752 sed -e 's/^ run_hours *= *[0-9]*/ run_hours = 0 /' \
2753 -e 's/^ run_seconds *= *[0-9]*/ run_seconds = 1800 /' \
2754 -e 's/^ history_interval *= *[0-9][0-9]*/ history_interval = 30,30 /' \
2755 -e 's/^ frames_per_outfile *= [0-9]*/ frames_per_outfile = 200/g' \
2756 namelist.input.temp
>! namelist.input
2758 #DAVE###################################################
2759 echo did
cp of namelist nesting
2760 ls -ls namelist.input
2764 #DAVE###################################################
2766 # Generate IC/BC for NMM run
2768 set RUNCOMMAND
= `echo $MPIRUNCOMMAND | sed "s/$Num_Procs/1/"`
2770 # Zap any old input data laying around.
2772 rm wrfinput_d01
>& /dev
/null
2773 rm wrfbdy_d01
>& /dev
/null
2775 $RUNCOMMAND ..
/..
/main
/real_
${core}.exe.$COMPOPTS[3] >! print.out.real_${core}_Phys=${phys_option}_Parallel_Nest
=$COMPOPTS[3]
2776 #DAVE###################################################
2777 echo finished real nesting
2780 #DAVE###################################################
2782 mv rsl.out
.0000 print.out.real_
${core}_Phys=${phys_option}_Parallel=${compopt}
2783 grep "SUCCESS COMPLETE" print.out.real_
${core}_Phys=${phys_option}_Parallel=${compopt} >& /dev
/null
2784 set success
= $status
2786 # Did making the IC BC files work?
2788 if ( ( -e wrfinput_d01
) && ( -e wrfbdy_d01
) && ( $success == 0 ) ) then
2789 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel nest $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
2790 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2792 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel nest $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2793 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2794 $MAIL -s "WRF FAIL making IC/BC $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2795 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 4 )
2797 #DAVE###################################################
2798 echo IC BC must be OK nesting
2799 ls -lsL wrfinput
* wrfb
*
2800 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
2801 ncdump
-v Times wrfb
* |
tail -20
2805 #DAVE###################################################
2807 # Run on 1 and then on Num_Procs processors
2810 foreach n
( 1 $Num_Procs )
2811 #DAVE###################################################
2812 echo running nmm on
$n procs nesting
2815 #DAVE###################################################
2817 if ( ( $n != 1 ) && ( $QUILT != TRUE
) ) then
2818 @ nmm_proc
= $Num_Procs
2820 cat >! nproc_xy
<< EOF
2824 sed -e '/^ numtiles/r nproc_xy' namelist.input
>! file.foo
2825 mv file.foo namelist.input
2826 else if ( ( $n != 1 ) && ( $QUILT == TRUE
) ) then
2827 @ nmm_proc
= $Num_Procs - 1
2829 cat >! nproc_xy
<< EOF
2833 sed -e '/^ numtiles/r nproc_xy' namelist.input
>! file.foo
2834 mv file.foo namelist.input
2837 if ( `uname` == AIX
) then
2838 set RUNCOMMAND
= $MPIRUNCOMMAND
2840 set RUNCOMMAND
= `echo $MPIRUNCOMMAND | sed "s/$Num_Procs/$n/"`
2843 # WRF output quilt servers are only tested for MPI configuration.
2844 # Currently, only one WRF output quilt server is used.
2846 if ( ( $QUILT == TRUE
) && ( $n == $Num_Procs ) ) then
2847 if ( $compopt == $COMPOPTS[3] ) then
2848 # For now, test only one group of one output quilt servers.
2849 sed -e 's/ nio_tasks_per_group *= *[0-9]*/ nio_tasks_per_group = 1/g' \
2850 -e 's/ nio_groups *= *[0-9]*/ nio_groups = 1/g' \
2851 namelist.input
>! namelist.input.temp
2852 mv -f namelist.input.temp namelist.input
2853 echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled."
2854 echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
2858 # NMM can fail on spurious fp exceptions that don't affect soln. Retry if necessary.
2861 while ( $tries < 2 )
2862 #DAVE###################################################
2863 echo try attempt
$tries allowed to be
less than
2
2866 #DAVE###################################################
2867 @ tries
= $tries + 1
2868 $RUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.
$compopt $MPIRUNCOMMANDPOST
2870 mv rsl.error
.0000 print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}_${n}p
2871 grep "SUCCESS COMPLETE" print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}_${n}p
2872 set success
= $status
2874 if ( ( -e wrfout_d01_
${filetag} ) && ( $success == 0 ) ) then
2875 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
2876 ncdump
-h wrfout_d01_
${filetag} |
grep Time |
grep UNLIMITED |
grep currently |
grep -q 2
2879 if ( `uname` == AIX
) then
2880 ncdump wrfout_d01_
${filetag} |
grep NaN
>& /dev
/null
2881 set found_nans
= $status
2882 else if ( `uname` == OSF1
) then
2883 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
2884 # set found_nans = $status
2885 else if ( `uname` == Linux
) then
2886 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
2887 set found_nans
= $status
2889 if ( $found_nans == 0 ) then
2894 else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1
) then
2895 ..
/..
/external
/io_grib
1/wgrib
-s -4yr wrfout_d01_
${filetag} |
grep "UGRD:10 m above gnd:3600 sec fcst"
2898 if ( $ok == 0 ) then
2899 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
2900 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2901 set tries
=2 # success, bail from loop
2903 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2904 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2905 $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2906 if ( if ( $KEEP_ON_RUNNING == FALSE
) && ( $tries == 2 ) )exit ( 5 )
2909 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2910 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2911 $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2912 if ( if ( $KEEP_ON_RUNNING == FALSE
) && ( $tries == 2 ) ) exit ( 6 )
2914 mv wrfout_d01_
${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.${compopt}_${n}p
2915 /bin
/cp namelist.input
$TMPDIR/namelist.input.
$core.
${phys_option}.
$compopt
2916 #DAVE###################################################
2917 echo did nmm fcst with nesting
2918 ls -ls $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.${compopt}_${n}p
2921 #DAVE###################################################
2927 else if ( $core == nmm_real
&& ( $HWRF == TRUE
) ) then
2928 #DAVE###################################################
2929 echo doing hwrf-nmm pre
2932 #DAVE###################################################
2934 set compopt
= $COMPOPTS[3] # ! parallel only
2935 set filetag
= 2008-09-09_00:00:00
2939 #DAVE###################################################
2941 echo $filetag $phys_option
2944 #DAVE###################################################
2946 # Build NMM namelist
2948 cp ${CUR_DIR}/io_format io_format
2949 sed -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
2950 namelist.input.hwrf
>! namelist.input.temp
2952 # A fairly short forecast, 10 time steps
2954 sed -e 's/^ run_hours *= *[0-9]*/ run_hours = 0 /' \
2955 -e 's/^ run_seconds *= *[0-9]*/ run_seconds = 1800 /' \
2956 -e 's/^ history_interval *= *[0-9][0-9]*/ history_interval = 30,30 /' \
2957 -e 's/^ frames_per_outfile *= [0-9]*/ frames_per_outfile = 200/g' \
2958 namelist.input.temp
>! namelist.input
2960 ln -s wrfinput_hwrf_d01.
${filetag} wrfinput_d01
;
2961 ln -s wrfbdy_hwrf_d01.
${filetag} wrfbdy_d01
;
2962 #DAVE###################################################
2963 echo did
cp of namelist hwrf
2964 ls -ls namelist.input
2968 #DAVE###################################################
2971 # Run on 1 and then on Num_Procs processors
2973 foreach n
( 1 $Num_Procs )
2974 #DAVE###################################################
2975 echo running hwrf on
$n procs
2978 #DAVE###################################################
2980 if ( ( $n != 1 ) && ( $QUILT != TRUE
) ) then
2981 @ nmm_proc
= $Num_Procs
2983 cat >! nproc_xy
<< EOF
2987 sed -e '/^ numtiles/r nproc_xy' namelist.input
>! file.foo
2988 mv file.foo namelist.input
2989 else if ( ( $n != 1 ) && ( $QUILT == TRUE
) ) then
2990 @ nmm_proc
= $Num_Procs - 1
2992 cat >! nproc_xy
<< EOF
2996 sed -e '/^ numtiles/r nproc_xy' namelist.input
>! file.foo
2997 mv file.foo namelist.input
3000 if ( `uname` == AIX
) then
3001 set RUNCOMMAND
= $MPIRUNCOMMAND
3003 set RUNCOMMAND
= `echo $MPIRUNCOMMAND | sed "s/$Num_Procs/$n/"`
3006 # WRF output quilt servers are only tested for MPI configuration.
3007 # Currently, only one WRF output quilt server is used.
3009 if ( ( $QUILT == TRUE
) && ( $n == $Num_Procs ) ) then
3010 if ( $compopt == $COMPOPTS[3] ) then
3011 # For now, test only one group of one output quilt servers.
3012 sed -e 's/ nio_tasks_per_group *= *[0-9]*/ nio_tasks_per_group = 1/g' \
3013 -e 's/ nio_groups *= *[0-9]*/ nio_groups = 1/g' \
3014 namelist.input
>! namelist.input.temp
3015 mv -f namelist.input.temp namelist.input
3016 echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled."
3017 echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
3021 # NMM can fail on spurious fp exceptions that don't affect soln. Retry if necessary.
3024 while ( $tries < 2 )
3025 #DAVE###################################################
3026 echo try attempt
$tries allowed to be
less than
2
3029 #DAVE###################################################
3030 @ tries
= $tries + 1
3031 $RUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.
$compopt $MPIRUNCOMMANDPOST
3033 mv rsl.error
.0000 print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}_${n}p
3034 grep "SUCCESS COMPLETE" print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}_${n}p
3035 set success
= $status
3037 if ( ( -e wrfout_d01_
${filetag} ) && ( $success == 0 ) ) then
3038 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
3039 ncdump
-h wrfout_d01_
${filetag} |
grep Time |
grep UNLIMITED |
grep currently |
grep -q 2
3042 if ( `uname` == AIX
) then
3043 ncdump wrfout_d01_
${filetag} |
grep NaN
>& /dev
/null
3044 set found_nans
= $status
3045 else if ( `uname` == OSF1
) then
3046 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
3047 # set found_nans = $status
3048 else if ( `uname` == Linux
) then
3049 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
3050 set found_nans
= $status
3052 if ( $found_nans == 0 ) then
3057 else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1
) then
3058 ..
/..
/external
/io_grib
1/wgrib
-s -4yr wrfout_d01_
${filetag} |
grep "UGRD:10 m above gnd:3600 sec fcst"
3061 if ( $ok == 0 ) then
3062 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3063 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3064 set tries
=2 # success, bail from loop
3066 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3067 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3068 $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3069 if ( if ( $KEEP_ON_RUNNING == FALSE
) && ( $tries == 2 ) )exit ( 5 )
3072 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3073 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3074 $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3075 if ( if ( $KEEP_ON_RUNNING == FALSE
) && ( $tries == 2 ) ) exit ( 6 )
3077 mv wrfout_d01_
${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.${compopt}_${n}p
3078 /bin
/cp namelist.input
$TMPDIR/namelist.input.
$core.
${phys_option}.
$compopt
3079 #DAVE###################################################
3081 ls -ls $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.${compopt}_${n}p
3084 #DAVE###################################################
3092 #DAVE###################################################
3093 echo doing ideal runs
3096 #DAVE###################################################
3097 # The ideal cases have different physics tests than the real cases. If this is
3098 # more that the total number of ideal physics experiments that we were led to
3099 # believe would exist, jump to the end of the physics loop.
3101 if ( $phys_option > $Max_Ideal_Physics_Options ) then
3102 goto BOTTOM_OF_PHYSICS_LOOP
3105 set filetag
=$filetag_ideal
3107 foreach compopt
( $COMPOPTS )
3108 #DAVE###################################################
3109 echo doing compopt
= $compopt
3110 echo filetag
= $filetag
3113 #DAVE###################################################
3116 # We sometimes are interested in bypassing the OpenMP option.
3118 if ( $compopt == $COMPOPTS[2] ) then
3119 if ( $ZAP_OPENMP == TRUE
) then
3120 goto BYPASS_COMP_LOOP_IDEAL
3126 if ( ! -e namelist.input.template
) cp namelist.input namelist.input.template
3128 # Create the correct namelist.input file.
3130 cp ${CUR_DIR}/dom_ideal dom_ideal
3131 if ( $core == em_quarter_ss
) then
3132 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}a phys_tke
3133 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}b phys_mp
3134 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}c phys_nh
3135 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}d phys_nest
3136 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}e phys_bc
3137 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}f phys_sfclay
3138 else if ( $core == em_b_wave
) then
3139 cp ${CUR_DIR}/phys_b_wave_
${phys_option}a phys_tke
3140 cp ${CUR_DIR}/phys_b_wave_
${phys_option}b phys_mp
3141 cp ${CUR_DIR}/phys_b_wave_
${phys_option}c phys_nh
3142 cp ${CUR_DIR}/phys_b_wave_
${phys_option}d phys_nest
3145 cp ${CUR_DIR}/io_format io_format
3146 if ( $NESTED == TRUE
) then
3147 if ( $core == em_quarter_ss
) then
3148 sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \
3149 -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 1/g' \
3150 -e 's/ run_seconds *= *[0-9][0-9]*/ run_seconds = 0/g' \
3151 -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 1/g' \
3152 -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \
3153 -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \
3154 -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
3155 -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \
3156 -e '/^ sf_sfclay_physics/d' -e '/^ radt/r ./phys_sfclay' \
3157 -e '/^ moist_adv_opt/,/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \
3158 -e '/^ periodic_x /,/^ open_ye/d' \
3159 -e '/^ &bdy_control/r ./phys_bc' \
3160 -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \
3161 .
/namelist.input.template
>! namelist.input
3162 else if ( $core == em_b_wave
) then
3163 sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \
3164 -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 20/g' \
3165 -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 20/g' \
3166 -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \
3167 -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \
3168 -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
3169 -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \
3170 -e '/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \
3171 -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \
3172 .
/namelist.input.template
>! namelist.input
3174 else if ( $NESTED != TRUE
) then
3175 if ( $core == em_quarter_ss
) then
3176 sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \
3177 -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 2/g' \
3178 -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 2/g' \
3179 -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \
3180 -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \
3181 -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
3182 -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \
3183 -e '/^ sf_sfclay_physics/d' -e '/^ radt/r ./phys_sfclay' \
3184 -e '/^ moist_adv_opt/,/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \
3185 -e '/^ periodic_x/d' -e '/^ open_xs/d' -e '/^ open_xe/d' \
3186 -e '/^ periodic_y/d' -e '/^ open_ys/d' -e '/^ open_ye/d' \
3187 -e '/^ &bdy_control/r ./phys_bc' \
3188 -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \
3189 .
/namelist.input.template
>! namelist.input
3190 else if ( $core == em_b_wave
) then
3191 sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \
3192 -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 100/g' \
3193 -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 100/g' \
3194 -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \
3195 -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \
3196 -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
3197 -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \
3198 -e '/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \
3199 -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \
3200 .
/namelist.input.template
>! namelist.input
3204 # WRF output quilt servers are only tested for MPI configuration.
3205 # Currently, only one WRF output quilt server is used.
3207 if ( $QUILT == TRUE
) then
3208 if ( $compopt == $COMPOPTS[3] ) then
3209 # For now, test only one group of one output quilt servers.
3210 sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \
3211 -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \
3212 namelist.input
>! namelist.input.temp
3213 mv -f namelist.input.temp namelist.input
3214 echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled."
3215 echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
3219 /bin
/cp namelist.input
$TMPDIR/namelist.input.
$core.
${phys_option}.
$compopt
3220 #DAVE###################################################
3222 ls -ls namelist.input
3225 #DAVE###################################################
3227 # If this is the serial code, generate the IC and BC. The ideal.exe program is not
3228 # parallelized, so the data is generated and saved for the rest of the parallel tests.
3230 if ( $compopt == $COMPOPTS[1] ) then
3232 # Zap any old input data laying around.
3234 rm wrfinput_d01
>& /dev
/null
3235 rm wrfbdy_d01
>& /dev
/null
3237 ..
/..
/main
/ideal_
${core}.exe.1 >! print.out.ideal_${core}_Parallel=${compopt}
3238 #DAVE###################################################
3243 #DAVE###################################################
3245 grep "SUCCESS COMPLETE" print.out.ideal_
${core}_Parallel
=${compopt} >& /dev
/null
3246 set success
= $status
3248 # Did making the IC BC files work?
3250 if ( ( -e wrfinput_d01
) && ( $success == 0 ) ) then
3251 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3252 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3254 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3255 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3256 $MAIL -s "WRF FAIL making IC/BC $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3257 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 7 )
3261 # Run the forecast for this core and parallel option
3263 rm $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$compopt >& /dev
/null
3265 if ( $compopt == $COMPOPTS[1] ) then
3266 setenv OMP_NUM_THREADS
1
3267 if ( `uname` == AIX
) then
3268 setenv XLSMPOPTS
"parthds=1"
3270 if ( $NESTED == TRUE
) then
3271 $SERIALRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}
3272 else if ( $NESTED != TRUE
) then
3273 ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}
3275 else if ( $compopt == $COMPOPTS[2] ) then
3276 setenv OMP_NUM_THREADS
$OPENMP
3277 if ( `uname` == AIX
) then
3278 setenv XLSMPOPTS
"parthds=${OPENMP}"
3280 if ( $NESTED == TRUE
) then
3281 $OMPRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}
3282 else if ( $NESTED != TRUE
) then
3283 ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}
3285 else if ( $compopt == $COMPOPTS[3] ) then
3286 setenv OMP_NUM_THREADS
1
3287 if ( `uname` == AIX
) then
3288 setenv XLSMPOPTS
"parthds=1"
3290 $MPIRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.
$compopt $MPIRUNCOMMANDPOST
3291 mv rsl.error
.0000 print.out.wrf_
${core}_Parallel
=${compopt}
3293 #DAVE###################################################
3297 #DAVE###################################################
3299 grep "SUCCESS COMPLETE" print.out.wrf_
${core}_Parallel
=${compopt}
3300 set success
= $status
3302 # Did making the forecast work, by that, we mean "is there an output file created?"
3304 if ( ( -e wrfout_d01_
${filetag} ) && ( $success == 0 ) ) then
3305 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
3306 ncdump
-h wrfout_d01_
${filetag} |
grep Time |
grep UNLIMITED |
grep currently |
grep -q 2
3309 if ( `uname` == AIX
) then
3310 ncdump wrfout_d01_
${filetag} |
grep NaN
>& /dev
/null
3311 set found_nans
= $status
3312 else if ( `uname` == OSF1
) then
3313 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
3314 # set found_nans = $status
3315 else if ( `uname` == Linux
) then
3316 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
3317 set found_nans
= $status
3319 if ( $found_nans == 0 ) then
3324 else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1
) then
3325 # set joe_times = `../../external/io_grib1/wgrib -s -4yr wrfout_d01_${filetag} | grep -v ":anl:" | wc -l`
3326 # if ( $joe_times >= 100 ) then
3327 set joe_times
= `../../external/io_grib1/wgrib -s -4yr wrfout_d01_${filetag} | grep "UGRD:10 m" | wc -l`
3328 if ( $joe_times == 2 ) then
3334 if ( $ok == 0 ) then
3335 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3336 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3338 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3339 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3340 $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3341 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 8 )
3344 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3345 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3346 $MAIL -s "WRF FAIL FCST $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3347 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 9 )
3350 # We have to save this output file for our biggy comparison after all of the
3351 # parallel options have been considered.
3353 mv wrfout_d01_
${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.
$compopt
3355 # To save space, we move the executables after we are finished with them.
3357 if ( $phys_option == $Max_Ideal_Physics_Options ) then
3358 mv ..
/..
/main
/wrf_
${core}.exe.
$compopt $TMPDIR/wrf_
${core}.exe.
$compopt
3360 #DAVE###################################################
3361 echo fcst was a success
3362 ls -ls $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$compopt
3363 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
3364 ncdump
-v Times
$TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$compopt |
tail -20
3368 #DAVE###################################################
3372 BYPASS_COMP_LOOP_IDEAL
:
3378 # OK, once more, we gotta check if this is a BIT4BIT run. If so then there
3379 # are a number of comparisons to do. If this is a an OPTIMIZED run, then the
3380 # comparisons will fail the bit-wise comparisons.
3382 if ( $REG_TYPE == BIT4BIT
) then
3384 if ( $core == nmm_real
) then
3386 pushd ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3387 set DIFFWRF
= ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
3389 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3]_1p
) && \
3390 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p
) ) then
3391 set foo1
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_1p `)
3392 set foo2
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p `)
3393 set size1
= $foo1[6]
3394 set size2
= $foo2[6]
3395 if ( $size1 == $size2 ) then
3396 set RIGHT_SIZE
= TRUE
3398 set RIGHT_SIZE
= FALSE
3401 set RIGHT_SIZE
= FALSE
3404 # 1p vs Num_Procs MPI
3406 rm fort
.88 fort
.98 >& /dev
/null
3407 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3]_1p
) && \
3408 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p
) && \
3409 ( $RIGHT_SIZE == TRUE
) ) then
3410 $DIFFWRF $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3]_1p \
3411 $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p
>& /dev
/null
3413 touch fort
.88 fort
.98
3415 if ( ! -e fort
.88 ) then
3416 echo "SUMMARY 1 vs $Num_Procs MPI for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3417 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3419 echo "SUMMARY 1 vs $Num_Procs MPI for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3420 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3425 else if ( ${#COMPOPTS} != 1 ) then
3427 # If there is only a single parallel option, then we are just trying to
3428 # build the serial code. That implies no comparisons are needed.
3430 # All of the forecasts for this set of physics and core have been
3431 # generated. We now compare the WRF model output files to see
3432 # if they are S^2D^2.
3434 pushd ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3435 set DIFFWRF
= ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
3437 # Are we skipping the OpenMP runs?
3439 if ( $ZAP_OPENMP == TRUE
) then
3440 goto BYPASS_OPENMP_SUMMARY1
3443 # Are the files the same size? If not, then only the initial times
3444 # will be compared. That means, on a failure to run a forecast, the
3445 # diffwrf will give a pass. We need to root out this evil.
3447 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] ) && \
3448 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[2] ) ) then
3449 set foo1
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] `)
3450 set foo2
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[2] `)
3451 set size1
= $foo1[6]
3452 set size2
= $foo2[6]
3453 if ( $size1 == $size2 ) then
3454 set RIGHT_SIZE_OMP
= TRUE
3456 set RIGHT_SIZE_OMP
= FALSE
3459 set RIGHT_SIZE_OMP
= FALSE
3462 BYPASS_OPENMP_SUMMARY1
:
3464 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] ) && \
3465 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3] ) ) then
3466 set foo1
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] `)
3467 set foo3
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] `)
3468 set size1
= $foo1[6]
3469 set size3
= $foo3[6]
3470 if ( $size1 == $size3 ) then
3471 set RIGHT_SIZE_MPI
= TRUE
3473 set RIGHT_SIZE_MPI
= FALSE
3476 set RIGHT_SIZE_MPI
= FALSE
3479 # Are we skipping the OpenMP runs?
3481 if ( $ZAP_OPENMP == TRUE
) then
3482 goto BYPASS_OPENMP_SUMMARY2
3487 rm fort
.88 fort
.98 >& /dev
/null
3488 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] ) && \
3489 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[2] ) && \
3490 ( $RIGHT_SIZE_OMP == TRUE
) ) then
3491 $DIFFWRF $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] \
3492 $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[2] >& /dev
/null
3494 touch fort
.88 fort
.98
3496 if ( ! -e fort
.88 ) then
3497 echo "SUMMARY serial vs OMP for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3498 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3500 echo "SUMMARY serial vs OMP for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3501 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3504 BYPASS_OPENMP_SUMMARY2
:
3508 rm fort
.88 fort
.98 >& /dev
/null
3509 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] ) && \
3510 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3] ) && \
3511 ( $RIGHT_SIZE_MPI == TRUE
) ) then
3512 $DIFFWRF $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] \
3513 $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3] >& /dev
/null
3515 touch fort
.88 fort
.98
3517 if ( ! -e fort
.88 ) then
3518 echo "SUMMARY serial vs MPI for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3519 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3521 echo "SUMMARY serial vs MPI for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3522 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3529 # Generate and archive baseline or compare against baseline
3531 if ( $core != nmm_real
) then
3532 if ( $GENERATE_BASELINE != FALSE
) then
3533 if ( ! -d $GENERATE_BASELINE ) then
3534 echo "ERROR: Baseline directory ${GENERATE_BASELINE} does not exist" >>! \
3535 ${DEF_DIR}/wrftest.output
3538 # Archive serial output file to baseline
3539 pushd ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3540 set basefilenm
= wrfout_d01_
${filetag}.${core}.${phys_option}
3541 set basefile
= ${GENERATE_BASELINE}/${basefilenm}
3542 set outfile
= $TMPDIR/${basefilenm}.
$COMPOPTS[1]
3543 if ( -e $outfile ) then
3544 cp $outfile $basefile || \
3545 ( echo "ERROR: cannot copy ${outfile} to ${basefile}" >>! \
3546 ${DEF_DIR}/wrftest.output
; exit 10 )
3548 echo "ERROR: Cannot archive baseline, file $outfile does not exist" >>! \
3549 ${DEF_DIR}/wrftest.output
3550 echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option FAIL" >>! \
3551 ${DEF_DIR}/wrftest.output
3552 echo "-------------------------------------------------------------" >> \
3553 ${DEF_DIR}/wrftest.output
3556 echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option PASS" >>! \
3557 ${DEF_DIR}/wrftest.output
3558 echo "-------------------------------------------------------------" >> \
3559 ${DEF_DIR}/wrftest.output
3563 if ( $COMPARE_BASELINE != FALSE
) then
3564 if ( ! -d $COMPARE_BASELINE ) then
3565 echo "${0}: ERROR:: Baseline directory ${COMPARE_BASELINE} does not exist" >>! \
3566 ${DEF_DIR}/wrftest.output
3569 # Compare against baseline output file
3570 set basefilenm
= wrfout_d01_
${filetag}.${core}.${phys_option}
3571 set basefile
= ${COMPARE_BASELINE}/${basefilenm}
3572 set DIFFWRF
= ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
3573 set testdir
= ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3575 foreach compopt
( $COMPOPTS )
3576 set cmpfile
= $TMPDIR/${basefilenm}.
$compopt
3577 rm fort
.88 fort
.98 >& /dev
/null
3578 if ( ( -e ${basefile} ) && ( -e ${cmpfile} ) ) then
3579 # Are the files the same size? If not, then only the initial times
3580 # will be compared. That means, on a failure to run a forecast, the
3581 # diffwrf will give a pass. We need to root out this evil.
3582 set foob
= ( ` \ls -ls ${basefile} `)
3583 set fooc
= ( ` \ls -ls ${cmpfile} `)
3584 set sizeb
= $foob[6]
3585 set sizec
= $fooc[6]
3586 if ( $sizeb == $sizec ) then
3587 $DIFFWRF ${basefile} ${cmpfile} >& /dev
/null
3588 if ( -e fort
.88 ) then
3589 echo "FAIL: Baseline comparison, file ${cmpfile} did not match ${basefile} according to diffwrf" >>! \
3590 ${DEF_DIR}/wrftest.output
3593 touch fort
.88 fort
.98
3594 echo "FAIL: Baseline comparison, files ${cmpfile} and ${basefile} have different sizes" >>! \
3595 ${DEF_DIR}/wrftest.output
3598 echo "FAIL: Baseline comparison, either ${cmpfile} or ${basefile} does not exist" >>! \
3599 ${DEF_DIR}/wrftest.output
3600 touch fort
.88 fort
.98
3602 if ( ! -e fort
.88 ) then
3603 echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str PASS" >>! \
3604 ${DEF_DIR}/wrftest.output
3605 echo "-------------------------------------------------------------" >> \
3606 ${DEF_DIR}/wrftest.output
3608 echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str FAIL" >>! \
3609 ${DEF_DIR}/wrftest.output
3610 echo "-------------------------------------------------------------" >> \
3611 ${DEF_DIR}/wrftest.output
3617 else if ( $core == nmm_real
) then
3618 if ( $GENERATE_BASELINE != FALSE
) then
3619 if ( ! -d $GENERATE_BASELINE ) then
3620 echo "ERROR: Baseline directory ${GENERATE_BASELINE} does not exist" >>! \
3621 ${DEF_DIR}/wrftest.output
3624 # Archive serial output file to baseline
3625 pushd ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3626 set basefilenm
= wrfout_d01_
${filetag}.${core}.${phys_option}
3627 set basefile
= ${GENERATE_BASELINE}/${basefilenm}
3628 set outfile
= $TMPDIR/${basefilenm}.
$COMPOPTS[3]_1p
3629 if ( -e $outfile ) then
3630 cp $outfile $basefile || \
3631 ( echo "ERROR: cannot copy ${outfile} to ${basefile}" >>! \
3632 ${DEF_DIR}/wrftest.output
; exit 10 )
3634 echo "ERROR: Cannot archive baseline, file $outfile does not exist" >>! \
3635 ${DEF_DIR}/wrftest.output
3636 echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option FAIL" >>! \
3637 ${DEF_DIR}/wrftest.output
3638 echo "-------------------------------------------------------------" >> \
3639 ${DEF_DIR}/wrftest.output
3642 echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option PASS" >>! \
3643 ${DEF_DIR}/wrftest.output
3644 echo "-------------------------------------------------------------" >> \
3645 ${DEF_DIR}/wrftest.output
3649 if ( $COMPARE_BASELINE != FALSE
) then
3650 if ( ! -d $COMPARE_BASELINE ) then
3651 echo "${0}: ERROR:: Baseline directory ${COMPARE_BASELINE} does not exist" >>! \
3652 ${DEF_DIR}/wrftest.output
3655 # Compare against baseline output file
3656 set basefilenm
= wrfout_d01_
${filetag}.${core}.${phys_option}
3657 set basefile
= ${COMPARE_BASELINE}/${basefilenm}
3658 set DIFFWRF
= ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
3659 set testdir
= ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3661 set compopt
= $COMPOPTS[3]
3662 foreach proc
( 1p
4p
)
3663 set cmpfile
= $TMPDIR/${basefilenm}.${compopt}_${proc}
3664 rm fort
.88 fort
.98 >& /dev
/null
3665 if ( ( -e ${basefile} ) && ( -e ${cmpfile} ) ) then
3666 # Are the files the same size? If not, then only the initial times
3667 # will be compared. That means, on a failure to run a forecast, the
3668 # diffwrf will give a pass. We need to root out this evil.
3669 set foob
= ( ` \ls -ls ${basefile} `)
3670 set fooc
= ( ` \ls -ls ${cmpfile} `)
3671 set sizeb
= $foob[6]
3672 set sizec
= $fooc[6]
3673 if ( $sizeb == $sizec ) then
3674 $DIFFWRF ${basefile} ${cmpfile} >& /dev
/null
3675 if ( -e fort
.88 ) then
3676 echo "FAIL: Baseline comparison, file ${cmpfile} did not match ${basefile} according to diffwrf" >>! \
3677 ${DEF_DIR}/wrftest.output
3680 touch fort
.88 fort
.98
3681 echo "FAIL: Baseline comparison, files ${cmpfile} and ${basefile} have different sizes" >>! \
3682 ${DEF_DIR}/wrftest.output
3685 echo "FAIL: Baseline comparison, either ${cmpfile} or ${basefile} does not exist" >>! \
3686 ${DEF_DIR}/wrftest.output
3687 touch fort
.88 fort
.98
3689 if ( ! -e fort
.88 ) then
3690 echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str PASS" >>! \
3691 ${DEF_DIR}/wrftest.output
3692 echo "-------------------------------------------------------------" >> \
3693 ${DEF_DIR}/wrftest.output
3695 echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str FAIL" >>! \
3696 ${DEF_DIR}/wrftest.output
3697 echo "-------------------------------------------------------------" >> \
3698 ${DEF_DIR}/wrftest.output
3704 goto ALL_SHE_WROTE_FOR_NMM
3706 # End of generate and archive baseline or compare against baseline
3710 BOTTOM_OF_PHYSICS_LOOP
:
3714 ALL_SHE_WROTE_FOR_NMM
:
3716 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3725 # How long did this take.
3727 set end
= ( `date` )
3728 echo "Start WRF Regression: $start " >> ${DEF_DIR}/wrftest.output
3729 echo "End WRF Regression: $end " >> ${DEF_DIR}/wrftest.output
3731 # We have done all of the tests, and placed the PASS FAIL labels in the
3732 # output file. If there are any FAIL messages, we are in trouble.
3734 grep FAIL
${DEF_DIR}/wrftest.output
3737 # Send email of the status.
3739 if ( $ok == 0 ) then
3740 $MAIL -s "REGRESSION FAILURE $ARCH[1] " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3742 $MAIL -s "REGRESSION SUCCESS $ARCH[1] " $GOOD_MAIL < ${DEF_DIR}/wrftest.output
3745 # Clean left up detritus
3749 rm -rf damp_
*eal
>& /dev
/null
3750 rm -rf dom_
*eal
>& /dev
/null
3751 rm -rf phys_real_
* >& /dev
/null
3752 rm -rf nest_real_
* >& /dev
/null
3753 rm -rf phys_quarter_
* >& /dev
/null
3754 rm -rf phys_b_wave_
* >& /dev
/null
3755 rm -rf version_info
>& /dev
/null
3756 rm -rf machfile
>& /dev
/null
3757 rm -rf fdda_real
* >& /dev
/null
3758 rm -rf time_real_
* >& /dev
/null
3759 rm -rf dyn_real_
* >& /dev
/null
3760 rm -rf damp_
* >& /dev
/null
3761 rm -rf io_format
>& /dev
/null