3 #BSUB -a poe # at NCAR: bluevista
4 #BSUB -R "span[ptile=32]" # how many tasks per node (up to 8)
5 #BSUB -n 4 # number of total tasks
6 #BSUB -o reg.out # output filename (%J to add job id)
7 #BSUB -e reg.err # error filename
8 #BSUB -J regtest1 # job name
10 #BSUB -W 6:00 # wallclock time
14 # This is a script to test the bit-for-bit reproducibility of
15 # the WRF model, when comparing single processor serial runs to
16 # OpenMP and MPI parallel runs. There are several regression tests
17 # that are performed. Failed comparisons get reported, but don't
18 # stop the script. Failed builds force an exit from the script.
22 set WHERE_AM_I
= `pwd`
24 if ( `uname` == AIX
) then
26 set USE_SPECIAL_XLF
= TRUE
28 if ( $USE_SPECIAL_XLF == TRUE
) then
30 source ~gill
/sourceme_modules
31 #module load xlf/12.01.0000.0005.091127
32 #module load xlf/12.01.0000.0005
36 set VERSION
= `xlf -qversion | grep AIX | cut -f2 -d, | cut -f2 -dV | cut -f1 -d.`
37 if ( $VERSION != 12 ) then
38 echo wrong xlf version
$VERSION
41 echo right xlf version
$VERSION
46 if ( ! -d /ptmp
/${USER}/${tdir} ) then
47 mkdir
/ptmp
/${USER}/${tdir}
51 # Do we keep running even when there are BAD failures?
53 set KEEP_ON_RUNNING
= FALSE
54 set KEEP_ON_RUNNING
= TRUE
56 # These need to be changed for your particular set of runs. This is
57 # where email gets sent.
59 if ( ( `uname` == AIX
) && ( ( `hostname | cut -c 1-2` != bs
) && \
60 ( `hostname | cut -c 1-2` != bv
) && ( `hostname | cut -c 1-2` != be
) ) ) then
61 set FAIL_MAIL
= ( ${user}@noaa.gov
)
62 set GOOD_MAIL
= ( ${user}@noaa.gov
)
64 setenv MP_EAGER_LIMIT
65536
65 setenv MP_SHARED_MEMORY
yes
66 setenv MP_SINGLE_THREAD
yes
68 setenv MP_STDOUTMODE ordered
70 setenv OMP_NUM_THREADS
4
71 setenv XLSMPOPTS
"parthds=4:spins=0:yields=0:stack=128000000:schedule=static"
72 setenv AIXTHREAD_SCOPE S
73 setenv AIXTHREAD_MNRATIO
1:1
74 setenv SPINLOOPTIME
1000
75 setenv YIELDLOOPTIME
1000
77 set FAIL_MAIL
= ( ${user}@ucar.edu
)
78 set GOOD_MAIL
= ( ${user}@ucar.edu
)
81 unalias cd cp rm ls pushd popd mv
82 if ( ( `uname` == Linux
) ||
( `uname` == Darwin
) ) alias banner echo
84 # Get the command line input
89 set clrm
= 0 # compile local run mmmtmp, for using clsroom cluster and local disk
91 # If this is a batch job (NCAR's IBMs or FSL's Intel and Alpha), we need to muck with the "input"
94 if ( ( `uname` == AIX
) ||
( `hostname` == tempest
) ||
( `hostname | cut -c 1-2` == ln ) ) then
97 set argv
= ( -D today
)
99 set WRFREGFILE
= /mmm
/users
/gill
/wrf.
tar
100 if ( ( `uname` == AIX
) && ( ( `hostname | cut -c 1-2` != bs
) && \
101 ( `hostname | cut -c 1-2` != bv
) && ( `hostname | cut -c 1-2` != be
) ) ) then
102 set argv
= ( -f /nbns
/meso
/wx22tb
/regression_tests
/wrf.
tar )
104 set argv
= ( -f wrf.
tar )
108 # Where is the input data located - for a few known NCAR/MMM machines.
110 if ( ( `hostname` == master
) ||
(`hostname | cut -c 1-4` == node
) ) then
111 set WRFREGDATAEM
= /big
/users
/gill
/WRF-data-EM
112 set WRFREGDATANMM
= /big
/users
/gill
/WRF-data-NMM
113 else if ( `hostname` == jacaranda
) then
114 set WRFREGDATAEM
= /jacaranda
/users
/gill
/WRF-data-EM
115 set WRFREGDATANMM
= /jacaranda
/users
/gill
/WRF-data-NMM
116 else if ( `hostname` == basswood
) then
117 set WRFREGDATAEM
= /basswood
/gill
/Regression_Tests
/WRF_regression_data
/processed
118 set WRFREGDATANMM
= /basswood
/gill
/Regression_Tests
/WRF_regression_data
/WRF-data-NMM_new
119 else if ( `hostname` == stink
) then
120 set WRFREGDATAEM
= /stink
/gill
/Regression_Tests
/WRF_regression_data
/processed
121 set WRFREGDATANMM
= /stink
/gill
/Regression_Tests
/WRF_regression_data
/WRF-data-NMM_new
122 else if ( `hostname` == cape
) then
123 set WRFREGDATAEM
= /cape
/users
/michalak
/WRF-data-EM
124 set WRFREGDATANMM
= /cape
/users
/michalak
/WRF-data-NMM
125 else if ( (`hostname | cut -c 1-6` == joshua
) || \
126 ( `hostname` == maple
) ||
(`hostname | cut -c 1-7` == service
) ) then
127 set WRFREGDATAEM
= /users
/gill
/WRF-data-EM
128 set WRFREGDATANMM
= /users
/gill
/WRF-data-NMM
129 else if ( ( `hostname | cut -c 1-2` == bs
) ||
( `hostname` == tempest
) ||
( `hostname | cut -c 1-2` == ln ) || \
130 ( `hostname | cut -c 1-2` == bv
) ||
( `hostname | cut -c 1-2` == be
) ) then
131 set WRFREGDATAEM
= /mmm
/users
/gill
/WRF-data-EM
132 set WRFREGDATAEM
= /mmm
/users
/gill
/WRF_regression_data
/processed
133 set WRFREGDATANMM
= /mmm
/users
/gill
/WRF-data-NMM_new
134 else if ( ( `uname` == AIX
) && ( ( `hostname | cut -c 1-2` != bs
) && \
135 ( `hostname | cut -c 1-2` != bv
) && ( `hostname | cut -c 1-2` != be
) ) ) then
136 set WRFREGDATAEM
= /nbns
/meso
/wx22tb
/regression_tests
/WRF-data-EM
137 set WRFREGDATANMM
= /nbns
/meso
/wx22tb
/regression_tests
/WRF-data-NMM
139 if ( ( -d /users
/gill
/WRF-data-EM
) && ( -d /users
/gill
/WRF-data-NMM
) ) then
140 set WRFREGDATAEM
= /users
/gill
/WRF-data-EM
141 set WRFREGDATANMM
= /users
/gill
/WRF-data-NMM
142 else if ( ( -d /mmm
/users
/gill
/WRF-data-EM
) && ( -d /mmm
/users
/gill
/WRF-data-NMM
) ) then
143 set WRFREGDATAEM
= /mmm
/users
/gill
/WRF-data-EM
144 set WRFREGDATANMM
= /mmm
/users
/gill
/WRF-data-NMM
146 echo "stick the WRF em and nmm data somewhere, and then fill in the shell vars"
147 echo "inside this script, you NEED WRFREGDATAEM and WRFREGDATANMM set"
151 #DAVE###################################################
152 echo DAVE em data is located
at $WRFREGDATAEM
154 echo DAVE nmm data is located
at $WRFREGDATANMM
155 ls -ls $WRFREGDATANMM
158 #DAVE###################################################
160 if ( $#argv == 0 ) then
161 echo "Please enter either a date for cvs checkout. ex regtest.csh -D date"
162 echo " or a file name containing WRF. ex regtest.csh -f tarfile"
163 echo " or the -ftp flag for the script to pick code off anon ftp"
169 if ( "$a" == "-D" ) then
171 rsh -n maple.mmm.ucar.edu w
>& /dev
/null
173 echo "Cannot execute a remote shell on maple.mmm.ucar.edu, where the"
174 echo "WRF code resides."
175 echo "Please check that it is up and that you have permission to rsh"
176 echo "to this host. (Create a .rhosts file)."
177 ping -c 1 maple.mmm.ucar.edu
180 setenv CVSROOT maple.mmm.ucar.edu
:/data
3/mp
/wrfhelp
/WRF
182 set acquire_from
= "cvs"
183 set thedate
= $argv[2]
187 if ( "$a" == "-f" ) then
189 set thefile
= $argv[2]
190 # Check for absolute path, if not, make it absolute
191 echo $thefile |
grep '^/' > /dev
/null
192 if ( $status != 0 ) set thefile
= `pwd`/$thefile
193 set acquire_from
= "filearg"
197 if ( "$a" == "-ftp" ) then
198 set acquire_from
= "ftp"
199 echo "anon ftp temporarily disabled"
203 if ( "$a" == "-here" ) then
204 set acquire_from
= "here"
207 if ( "$a" == "-env" ) then
208 set acquire_from
= "environment"
209 set thefile
= $WRFREGFILE
213 # Start recording everything - for debug purposes.
218 # And to tell us how long we've spent on this whole regression test,
219 # we should remember when we started.
221 set start
= ( `date` )
223 #####################################################################
225 # Initial set up values
227 # Is this a single domain regression test or is this nested. Well, a nested one
228 # is a bit special. It can only run on machines that have the WRF RSL_LITE-but-no-MPI
237 if ( ( $NESTED1 == TRUE
) ||
( $NESTED2 == TRUE
) ) then
238 echo DOING a NESTED TEST
244 # Use the adaptive time step option
249 if ( $ADAPTIVE == TRUE
) then
250 set STEP_TO_OUTPUT_TIME
= .TRUE.
251 set USE_ADAPTIVE_TIME_STEP
= .TRUE.
253 set STEP_TO_OUTPUT_TIME
= .FALSE.
254 set USE_ADAPTIVE_TIME_STEP
= .FALSE.
257 # We can choose to do grid and obs nudging tests.
265 if ( $FDDA2 == TRUE
) then
269 # The default floating point precision is either 4 bytes or 8 bytes.
270 # We assume that it is 4 (or the default for the architecture) unless
271 # REAL8 is set to TRUE.
276 # Are we shooting for a bit-for-bit run (serial vs OpenMP, serial vs MPI), or not?
277 # If you want to do a performance-only run, the forecasts are still short, but you
278 # get to insure that the optimized code builds and runs.
280 set REG_TYPE
= OPTIMIZED
281 set REG_TYPE
= BIT4BIT
283 # For a Mac/Intel, we can run either g95 or PGI.
285 if ( ( `uname` == Darwin
) ||
( `uname` == Linux
) ) then
290 # We can choose to do a global test
292 if ( $NESTED != TRUE
) then
295 else if ( $NESTED == TRUE
) then
299 # Is this a WRF chem test?
300 # if CHEM = TRUE, then chemistry run
301 # if KPP = TRUE, then chemistry with KPP run (CHEM set to true)
303 if ( $NESTED != TRUE
) then
308 if ( $KPP == TRUE
) then
311 else if ( $NESTED == TRUE
) then
315 if ( $CHEM == TRUE
) then
317 else if ( $CHEM == FALSE
) then
320 if ( $KPP == TRUE
) then
322 setenv FLEX_LIB_DIR
/usr
/local
/lib
323 setenv YACC
"/usr/bin/yacc -d"
325 else if ( $KPP == FALSE
) then
328 setenv YACC
"/usr/bin/yacc -d"
332 # For the real data case, we can run either one of two data cases. If this is
333 # a chemistry run, we are forced to use that data.
337 if ( $CHEM == TRUE
) then
340 if ( $GLOBAL == TRUE
) then
344 # Yet another local variable to change the name of where the data is located.
346 set thedataem
= ${WRFREGDATAEM}/${dataset}
347 set thedatanmm
= $WRFREGDATANMM
349 # A separately installed version of the latest ESMF library (NOT the
350 # ESMF library included in the WRF tarfile) can be tested by setting
351 # "ESMF_LIB" to "TRUE" below. This test is not supported on all
357 # serial and OMP are not tested with ESMF so always start with env vars cleared
361 if ( $ESMF_LIB == TRUE
) then
362 if ( ( `uname` == AIX
) && ( ( `hostname | cut -c 1-2` == bv
) ||
( `hostname | cut -c 1-2` == be
) ) ) then
363 echo "A separately installed version of the latest ESMF library"
364 echo "(NOT the ESMF library included in the WRF tarfile) will"
365 echo "be used for MPI tests"
366 setenv OBJECT_MODE
64
367 # set ESMFLIBSAVE = /home/bluevista/hender/esmf/esmf_2_2_2r/lib/libO/AIX.default.64.mpi.default
368 # set ESMFINCSAVE = /home/bluevista/hender/esmf/esmf_2_2_2r/mod/modO/AIX.default.64.mpi.default
370 if ( $NEVER == TRUE
) then
371 setenv ESMF_DIR
/mmm
/users
/michalak
/esmf
374 setenv ESMF_INSTALL_PREFIX
$ESMF_DIR/..
/esmf_install
375 setenv ESMFLIB
$ESMF_INSTALL_PREFIX/lib
/libg
/AIX.default
.64.mpi.default
376 setenv ESMFINC
$ESMF_INSTALL_PREFIX/mod
/modg
/AIX.default
.64.mpi.default
378 source ~michalak
/sourceme_esmf
380 set ESMFLIBSAVE
= $ESMFLIB
381 set ESMFINCSAVE
= $ESMFINC
382 echo "Using ESMFLIB = ${ESMFLIBSAVE}"
383 echo "Using ESMFINC = ${ESMFINCSAVE}"
385 echo "Only the ESMF library included in the WRF tarfile is"
386 echo "tested on this machine"
389 if ( $NESTED == TRUE
) then
390 echo "The ESMF library does not work with nesting."
395 # A single WRF output "quilt" server can be tested by setting "QUILT" to
396 # "TRUE" below. At the moment, testing of I/O quilt servers is not supported
402 if ( $QUILT == TRUE
) then
403 echo "One WRF output quilt server will be used for some tests"
406 # Baseline data sets can be generated and archived or compared against.
407 # - To generate and archive, set GENERATE_BASELINE to a pathname that can
408 # be created by this script via "mkdir -p $GENERATE_BASELINE". This
409 # directory must not already exist.
410 # Set GENERATE_BASELINE = FALSE to avoid baseline generation.
411 # - To compare with a previously archived baseline, set COMPARE_BASELINE
412 # to an existing directory that contains an archived baseline.
413 # Set COMPARE_BASELINE = FALSE to avoid baseline comparison.
414 set GENERATE_BASELINE
= FALSE
415 set COMPARE_BASELINE
= FALSE
417 # Baseline generation and comparison are only done when BIT4BIT is set.
418 if ( $GENERATE_BASELINE != FALSE
) then
419 if ( $REG_TYPE != BIT4BIT
) then
420 echo "ERROR: Baseline generation can only be done during BIT4BIT tests."
423 if ( -d $GENERATE_BASELINE ) then
424 echo "ERROR: Baseline directory ${GENERATE_BASELINE} already exists."
427 # Archive serial output file to baseline
428 mkdir
-p $GENERATE_BASELINE ||
( echo "ERROR: cannot mkdir ${GENERATE_BASELINE}"; exit 3 )
431 if ( $COMPARE_BASELINE != FALSE
) then
432 if ( $REG_TYPE != BIT4BIT
) then
433 echo "Baseline comparison can only be done during BIT4BIT tests."
436 if ( ! -d $COMPARE_BASELINE ) then
437 echo "${0}: ERROR: Baseline directory ${COMPARE_BASELINE} does not exist"
442 # Set the input/output format type (currently 1, 2 or 5 OK).
443 # Binary NetCDF PHDF, IBM GriB, history only
447 set IO_FORM_NAME
= ( io_bin io_netcdf io_dummy io_phdf5 io_grib1
)
448 set IO_FORM_WHICH
=( IO IO IO IO O
)
450 # There is a breakdown of cores to test depending on the various
451 # options that the user is testing.
452 # nested: cannot test NMM
453 # rsl_lite: cannot test anything with y periodic bc
455 # esmf_lib: cannot test NMM
456 # grib output: cannot test NMM
458 if ( $NESTED1 == TRUE
) then
459 set CORES
= ( em_real
)
460 else if ( $NESTED2 == TRUE
) then
461 set CORES
= ( em_b_wave em_quarter_ss
)
462 else if ( $NESTED != TRUE
) then
463 set CORES
= ( em_real em_b_wave em_quarter_ss nmm_real
)
464 if ( $CHEM == TRUE
) then
465 set CORES
= ( em_real em_real
)
467 if ( $GLOBAL == TRUE
) then
468 set CORES
= ( em_real
)
470 if ( $ADAPTIVE == TRUE
) then
471 set CORES
= ( em_real
)
473 if ( $ESMF_LIB == TRUE
) then
474 set CORES
= ( em_real em_b_wave em_quarter_ss
)
476 if ( $IO_FORM_NAME[$IO_FORM] == io_grib1
) then
477 set CORES
= ( em_real em_b_wave em_quarter_ss
)
479 if ( $FDDA == TRUE
) then
480 set CORES
= ( em_real
)
484 # The b_wave case has binary input (4-byte only), the nmm
485 # core has raw MPI calls, skip them if we are doing real*8 floats.
487 if ( $REAL8 == TRUE
) then
488 set CORES
= ( em_real em_quarter_ss
)
491 if ( ( $CHEM != TRUE
) && ( $FDDA != TRUE
) && ( $REAL8 != TRUE
) && ( $GLOBAL != TRUE
) && ( $ADAPTIVE != TRUE
) ) then
492 set PHYSOPTS
= ( 1 2 3 4 5 6 7 8 10 11 13 14 15 )
493 else if ( $ADAPTIVE == TRUE
) then
494 set PHYSOPTS
= ( 1 2 3 5 7 8 9 10 12 13 15 )
495 else if ( ( $CHEM != TRUE
) && ( $FDDA != TRUE
) && ( ( $REAL8 == TRUE
) ||
( $GLOBAL == TRUE
) ) ) then
496 set PHYSOPTS
= ( 1 2 3 4 5 6 )
497 else if ( ( $CHEM != TRUE
) && ( $FDDA == TRUE
) ) then
498 if ( $FDDA2 == TRUE
) then
499 set PHYSOPTS_FDDA
= BOTH
501 set PHYSOPTS_FDDA
= GRID
503 if ( $PHYSOPTS_FDDA == GRID
) then
506 set PHYSOPTS
= ( 1 2 3 4 5 )
508 else if ( $CHEM == TRUE
) then
509 set PHYSOPTS
= ( 1 2 3 4 5 6 )
512 # This is selecting the ideal physics options - mostly selecting BC options.
513 # With no nesting, run all three ideal physics options.
515 if ( $NESTED == TRUE
) then
516 set Max_Ideal_Physics_Options
= 5
517 else if ( $NESTED != TRUE
) then
518 set Max_Ideal_Physics_Options
= 5
523 # How many domains to run (nest tests). Only em_real and ideals use this.
524 # The max is 3 due to the number of columns in the namelist that are
525 # currently filled in.
527 if ( $NESTED == TRUE
) then
528 if ( $dataset == jan00
) then
529 cat >! dom_real
<< EOF
531 time_step_fract_num = 0,
532 time_step_fract_den = 1,
540 p_top_requested = 5000,
541 num_metgrid_levels = 27,
542 num_metgrid_soil_levels = 4,
543 dx = 30000, 10000, 3333.333333,
544 dy = 30000, 10000, 3333.333333,
547 i_parent_start = 0, 31, 11,
548 j_parent_start = 0, 17, 11,
549 parent_grid_ratio = 1, 3, 3,
550 parent_time_step_ratio = 1, 3, 3,
555 move_interval = 3 , 6 , 9
556 move_cd_x = 1 , 1 , 1
557 move_cd_y = 1 , 1 , 1
558 use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
559 step_to_output_time = $STEP_TO_OUTPUT_TIME
561 else if ( $dataset == jun01
) then
562 cat >! dom_real
<< EOF
564 time_step_fract_num = 0,
565 time_step_fract_den = 1,
573 p_top_requested = 5000,
574 num_metgrid_levels = 27,
575 num_metgrid_soil_levels = 4,
576 dx = 10000, 3333.333333, 1111.111111,
577 dy = 10000, 3333.333333, 1111.111111,
580 i_parent_start = 0, 30, 11,
581 j_parent_start = 0, 20, 11,
582 parent_grid_ratio = 1, 3, 3,
583 parent_time_step_ratio = 1, 3, 3,
588 move_interval = 1 , 2 , 3
589 move_cd_x = 1 , 1 , 1
590 move_cd_y = 1 , 1 , 1
591 use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
592 step_to_output_time = $STEP_TO_OUTPUT_TIME
595 cat >! dom_ideal
<< EOF
598 else if ( $NESTED != TRUE
) then
599 if ( $dataset == jan00
) then
600 cat >! dom_real
<< EOF
602 time_step_fract_num = 0,
603 time_step_fract_den = 1,
611 p_top_requested = 5000,
612 num_metgrid_levels = 27,
613 num_metgrid_soil_levels = 4,
614 dx = 30000, 10000, 3333,
615 dy = 30000, 10000, 3333,
618 i_parent_start = 0, 31, 30,
619 j_parent_start = 0, 17, 30,
620 parent_grid_ratio = 1, 3, 3,
621 parent_time_step_ratio = 1, 3, 3,
624 use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
625 step_to_output_time = $STEP_TO_OUTPUT_TIME
627 else if ( $dataset == jun01
) then
628 cat >! dom_real
<< EOF
630 time_step_fract_num = 0,
631 time_step_fract_den = 1,
639 p_top_requested = 5000,
640 num_metgrid_levels = 27,
641 num_metgrid_soil_levels = 4,
642 dx = 10000, 3333.333333, 1111.111111,
643 dy = 10000, 3333.333333, 1111.111111,
646 i_parent_start = 0, 30, 11,
647 j_parent_start = 0, 20, 11,
648 parent_grid_ratio = 1, 3, 3,
649 parent_time_step_ratio = 1, 3, 3,
652 use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
653 step_to_output_time = $STEP_TO_OUTPUT_TIME
655 else if ( $dataset == global
) then
656 cat >! dom_real
<< EOF
658 time_step_fract_num = 00
659 time_step_fract_den = 112
667 p_top_requested = 5000,
668 num_metgrid_levels = 27,
669 num_metgrid_soil_levels = 4,
670 dx = 625373.288,20000, 4000,
671 dy = 625373.288,20000, 4000,
672 p_top_requested = 5000
675 i_parent_start = 0, 17, 17,
676 j_parent_start = 0, 33, 33,
677 parent_grid_ratio = 1, 5, 5,
678 parent_time_step_ratio = 1, 5, 5,
683 cat >! dom_ideal
<< EOF
688 # The em_real entire physics namelist. Change what you want.
690 cat >! phys_real_1
<< EOF
691 mp_physics = 1, 1, 1,
692 ra_lw_physics = 1, 1, 1,
693 ra_sw_physics = 1, 1, 1,
695 sf_sfclay_physics = 1, 1, 1,
696 sf_surface_physics = 1, 1, 1,
697 bl_pbl_physics = 1, 1, 1,
699 cu_physics = 1, 1, 0,
705 topo_shading = 0, 0, 0,
709 surface_input_source = 1,
714 cat >! dyn_real_SAFE
<< EOF
715 moist_adv_opt = 0, 0, 0,
716 scalar_adv_opt = 0, 0, 0,
717 chem_adv_opt = 0, 0, 0,
718 tke_adv_opt = 0, 0, 0,
721 cat >! dyn_real_1
<< EOF
722 moist_adv_opt = 1, 1, 1,
723 scalar_adv_opt = 1, 1, 1,
724 chem_adv_opt = 0, 0, 0,
725 tke_adv_opt = 0, 0, 0,
728 cat >! time_real_1
<< EOF
729 auxinput1_inname = "met_em.d<domain>.<date>"
732 cat >! nest_real_1
<< EOF
733 input_from_file = .true.,.false.,.false.
736 cat >! damp_real_1
<< EOF
738 zdamp = 5000., 5000., 5000.,
739 dampcoef = 0.05, 0.05, 0.05
742 cat >! phys_real_2
<< EOF
743 mp_physics = 2, 2, 2,
744 ra_lw_physics = 3, 3, 3,
745 ra_sw_physics = 3, 3, 3,
747 sf_sfclay_physics = 2, 2, 2,
748 sf_surface_physics = 2, 2, 2,
749 bl_pbl_physics = 2, 2, 2,
751 cu_physics = 2, 2, 0,
759 surface_input_source = 1,
761 sf_urban_physics = 2, 2, 2,
765 cam_abs_freq_s = 21600
770 cat >! dyn_real_2
<< EOF
771 moist_adv_opt = 1, 1, 1,
772 scalar_adv_opt = 1, 1, 1,
773 chem_adv_opt = 0, 0, 0,
774 tke_adv_opt = 0, 0, 0,
777 if ( $GLOBAL == TRUE
) then
778 cp dyn_real_SAFE dyn_real_2
781 cat >! time_real_2
<< EOF
782 auxinput1_inname = "met_em.d<domain>.<date>"
785 cat >! nest_real_2
<< EOF
786 input_from_file = .true.,.false.,.false.
789 cat >! damp_real_2
<< EOF
791 zdamp = 5000., 5000., 5000.,
792 dampcoef = 0.05, 0.05, 0.05
795 cat >! phys_real_3
<< EOF
796 mp_physics = 3, 3, 3,
797 ra_lw_physics = 4, 4, 4,
798 ra_sw_physics = 4, 4, 4,
800 sf_sfclay_physics = 4, 4, 4,
801 sf_surface_physics = 1, 1, 1,
802 bl_pbl_physics = 4, 4, 4,
804 cu_physics = 3, 3, 0,
809 surface_input_source = 1,
819 cat >! dyn_real_3
<< EOF
820 moist_adv_opt = 2, 2, 2,
821 scalar_adv_opt = 2, 2, 2,
822 chem_adv_opt = 0, 0, 0,
823 tke_adv_opt = 0, 0, 0,
826 cat >! time_real_3
<< EOF
827 auxinput1_inname = "met_em.d<domain>.<date>"
830 cat >! nest_real_3
<< EOF
831 input_from_file = .true.,.false.,.false.
834 cat >! damp_real_3
<< EOF
836 zdamp = 5000., 5000., 5000.,
837 dampcoef = 0.05, 0.05, 0.05
840 cat >! phys_real_4
<< EOF
841 mp_physics = 4, 4, 4,
842 ra_lw_physics = 1, 1, 1,
843 ra_sw_physics = 2, 2, 2,
845 sf_sfclay_physics = 5, 5, 5,
846 sf_surface_physics = 2, 2, 2,
847 bl_pbl_physics = 5, 5, 5,
849 cu_physics = 4, 4, 0,
854 surface_input_source = 1,
856 sf_urban_physics = 1, 1, 1,
860 cat >! dyn_real_4
<< EOF
861 moist_adv_opt = 2, 2, 2,
862 scalar_adv_opt = 2, 2, 2,
863 chem_adv_opt = 0, 0, 0,
864 tke_adv_opt = 0, 0, 0,
867 cat >! time_real_4
<< EOF
868 auxinput1_inname = "met_em.d<domain>.<date>"
871 cat >! nest_real_4
<< EOF
872 input_from_file = .true.,.false.,.false.
875 cat >! damp_real_4
<< EOF
877 zdamp = 5000., 5000., 5000.,
878 dampcoef = 0.05, 0.05, 0.05
881 cat >! phys_real_5
<< EOF
882 mp_physics = 5, 5, 5,
883 ra_lw_physics = 5, 5, 5,
884 ra_sw_physics = 5, 5, 5,
886 sf_sfclay_physics = 7, 7, 7,
887 sf_surface_physics = 7, 7, 7,
888 bl_pbl_physics = 7, 7, 7,
890 cu_physics = 5, 5, 0,
895 surface_input_source = 1,
901 cat >! dyn_real_5
<< EOF
902 moist_adv_opt = 1, 1, 1,
903 scalar_adv_opt = 1, 1, 1,
904 chem_adv_opt = 0, 0, 0,
905 tke_adv_opt = 0, 0, 0,
908 cat >! time_real_5
<< EOF
909 auxinput1_inname = "met_em.d<domain>.<date>"
912 cat >! nest_real_5
<< EOF
913 input_from_file = .true.,.true.,.false.
916 cat >! damp_real_5
<< EOF
918 zdamp = 5000., 5000., 5000.,
919 dampcoef = 0.05, 0.05, 0.05
922 cat >! phys_real_6
<< EOF
923 mp_physics = 6, 6, 6,
924 ra_lw_physics = 4, 4, 4,
925 ra_sw_physics = 4, 4, 4,
927 sf_sfclay_physics = 2, 2, 2,
928 sf_surface_physics = 1, 1, 1,
929 bl_pbl_physics = 8, 8, 8,
931 cu_physics = 6, 6, 0,
939 surface_input_source = 1,
944 cat >! dyn_real_6
<< EOF
945 moist_adv_opt = 1, 1, 1,
946 scalar_adv_opt = 1, 1, 1,
947 chem_adv_opt = 0, 0, 0,
948 tke_adv_opt = 0, 0, 0,
951 cat >! time_real_6
<< EOF
952 auxinput1_inname = "met_em.d<domain>.<date>"
955 cat >! nest_real_6
<< EOF
956 input_from_file = .true.,.false.,.false.
959 cat >! damp_real_6
<< EOF
961 zdamp = 5000., 5000., 5000.,
962 dampcoef = 0.05, 0.05, 0.05
965 cat >! phys_real_7
<< EOF
966 mp_physics = 7, 7, 7,
967 ra_lw_physics = 1, 1, 1,
968 ra_sw_physics = 1, 1, 1,
970 sf_sfclay_physics =10, 10, 10,
971 sf_surface_physics = 2, 2, 2,
972 bl_pbl_physics =10, 10, 10,
974 cu_physics =14, 14, 0,
980 topo_shading = 0, 0, 0,
984 surface_input_source = 1,
989 cat >! dyn_real_7
<< EOF
990 moist_adv_opt = 2, 2, 2,
991 scalar_adv_opt = 2, 2, 2,
992 chem_adv_opt = 0, 0, 0,
993 tke_adv_opt = 0, 0, 0,
996 cat >! time_real_7
<< EOF
997 auxinput1_inname = "met_em.d<domain>.<date>"
1000 cat >! nest_real_7
<< EOF
1001 input_from_file = .true.,.false.,.false.
1004 cat >! damp_real_7
<< EOF
1006 zdamp = 5000., 5000., 5000.,
1007 dampcoef = 0.05, 0.05, 0.05
1010 cat >! phys_real_8
<< EOF
1011 mp_physics = 8, 8, 8,
1012 ra_lw_physics = 5, 5, 5,
1013 ra_sw_physics = 5, 5, 5,
1015 sf_sfclay_physics = 2, 2, 2,
1016 sf_surface_physics = 3, 3, 3,
1017 bl_pbl_physics = 9, 9, 9,
1019 cu_physics = 7, 7, 0,
1024 surface_input_source = 1,
1025 num_soil_layers = 6,
1029 cat >! dyn_real_8
<< EOF
1030 moist_adv_opt = 2, 2, 2,
1031 scalar_adv_opt = 2, 2, 2,
1032 chem_adv_opt = 0, 0, 0,
1033 tke_adv_opt = 0, 0, 0,
1036 cat >! time_real_8
<< EOF
1037 auxinput1_inname = "met_em.d<domain>.<date>"
1040 cat >! nest_real_8
<< EOF
1041 input_from_file = .true.,.false.,.false.
1044 cat >! damp_real_8
<< EOF
1046 zdamp = 5000., 5000., 5000.,
1047 dampcoef = 0.05, 0.05, 0.05
1050 cat >! phys_real_9
<< EOF
1051 mp_physics = 9, 9, 9,
1052 ra_lw_physics = 3, 3, 3,
1053 ra_sw_physics = 3, 3, 3,
1055 sf_sfclay_physics = 5, 5, 5,
1056 sf_surface_physics = 3, 3, 3,
1057 bl_pbl_physics = 6, 6, 6,
1059 cu_physics = 1, 1, 0,
1064 surface_input_source = 1,
1065 num_soil_layers = 6,
1069 cam_abs_freq_s = 21600
1074 cat >! dyn_real_9
<< EOF
1075 moist_adv_opt = 1, 1, 1,
1076 scalar_adv_opt = 1, 1, 1,
1077 chem_adv_opt = 0, 0, 0,
1078 tke_adv_opt = 0, 0, 0,
1081 cat >! time_real_9
<< EOF
1082 auxinput1_inname = "met_em.d<domain>.<date>"
1085 cat >! nest_real_9
<< EOF
1086 input_from_file = .true.,.false.,.false.
1089 cat >! damp_real_9
<< EOF
1091 zdamp = 5000., 5000., 5000.,
1092 dampcoef = 0.05, 0.05, 0.05
1095 cat >! phys_real_10
<< EOF
1096 mp_physics = 10, 10, 10,
1097 ra_lw_physics = 1, 1, 1,
1098 ra_sw_physics = 2, 2, 2,
1100 sf_sfclay_physics = 4, 4, 4,
1101 sf_surface_physics = 7, 7, 7,
1102 bl_pbl_physics = 4, 4, 4,
1104 cu_physics = 2, 2, 0,
1109 surface_input_source = 1,
1110 num_soil_layers = 2,
1114 cat >! dyn_real_10
<< EOF
1115 moist_adv_opt = 1, 1, 1,
1116 scalar_adv_opt = 1, 1, 1,
1117 chem_adv_opt = 0, 0, 0,
1118 tke_adv_opt = 0, 0, 0,
1121 cat >! time_real_10
<< EOF
1122 auxinput1_inname = "met_em.d<domain>.<date>"
1125 cat >! nest_real_10
<< EOF
1126 input_from_file = .true.,.true.,.false.
1129 cat >! damp_real_10
<< EOF
1131 zdamp = 5000., 5000., 5000.,
1132 dampcoef = 0.05, 0.05, 0.05
1135 cat >! phys_real_11
<< EOF
1136 mp_physics = 14, 14, 14,
1137 ra_lw_physics = 3, 3, 3,
1138 ra_sw_physics = 3, 3, 3,
1140 sf_sfclay_physics = 7, 7, 7,
1141 sf_surface_physics = 1, 1, 1,
1142 bl_pbl_physics = 7, 7, 7,
1144 cu_physics = 4, 4, 0,
1149 surface_input_source = 1,
1150 num_soil_layers = 5,
1154 cam_abs_freq_s = 21600
1159 cat >! dyn_real_11
<< EOF
1160 moist_adv_opt = 2, 2, 2,
1161 scalar_adv_opt = 2, 2, 2,
1162 chem_adv_opt = 0, 0, 0,
1163 tke_adv_opt = 0, 0, 0,
1166 cat >! time_real_11
<< EOF
1167 auxinput1_inname = "met_em.d<domain>.<date>"
1170 cat >! nest_real_11
<< EOF
1171 input_from_file = .true.,.false.,.false.
1174 cat >! damp_real_11
<< EOF
1176 zdamp = 5000., 5000., 5000.,
1177 dampcoef = 0.05, 0.05, 0.05
1180 cat >! phys_real_12
<< EOF
1181 mp_physics = 16, 16, 16,
1182 ra_lw_physics = 4, 4, 4,
1183 ra_sw_physics = 4, 4, 4,
1185 sf_sfclay_physics = 1, 1, 1,
1186 sf_surface_physics = 2, 2, 2,
1187 bl_pbl_physics = 8, 8, 8,
1189 cu_physics = 3, 3, 0,
1194 sf_urban_physics = 3, 3, 3,
1195 num_urban_layers = 1040
1196 surface_input_source = 1,
1197 num_soil_layers = 4,
1206 cat >! dyn_real_12
<< EOF
1207 moist_adv_opt = 2, 2, 2,
1208 scalar_adv_opt = 2, 2, 2,
1209 chem_adv_opt = 0, 0, 0,
1210 tke_adv_opt = 0, 0, 0,
1213 cat >! time_real_12
<< EOF
1214 auxinput1_inname = "met_em.d<domain>.<date>"
1217 cat >! nest_real_12
<< EOF
1218 input_from_file = .true.,.false.,.false.
1221 cat >! damp_real_12
<< EOF
1223 zdamp = 5000., 5000., 5000.,
1224 dampcoef = 0.05, 0.05, 0.05
1227 cat >! phys_real_13
<< EOF
1228 mp_physics =13, 13, 13,
1229 ra_lw_physics = 1, 1, 1,
1230 ra_sw_physics = 1, 1, 1,
1232 sf_sfclay_physics = 2, 2, 2,
1233 sf_surface_physics = 3, 3, 3,
1234 bl_pbl_physics = 9, 9, 9,
1236 cu_physics = 7, 7, 0,
1238 slope_rad = 1, 1, 1,
1239 topo_shading = 0, 0, 0,
1243 surface_input_source = 1,
1244 num_soil_layers = 6,
1248 cat >! dyn_real_13
<< EOF
1249 moist_adv_opt = 2, 2, 2,
1250 scalar_adv_opt = 2, 2, 2,
1251 chem_adv_opt = 0, 0, 0,
1252 tke_adv_opt = 0, 0, 0,
1255 cat >! time_real_13
<< EOF
1256 auxinput1_inname = "met_em.d<domain>.<date>"
1259 cat >! nest_real_13
<< EOF
1260 input_from_file = .true.,.false.,.false.
1263 cat >! damp_real_13
<< EOF
1266 zdamp = 5000., 5000., 5000.,
1267 dampcoef = 0.05, 0.05, 0.05
1270 cat >! phys_real_14
<< EOF
1271 mp_physics = 3, 3, 3,
1272 ra_lw_physics = 3, 3, 3,
1273 ra_sw_physics = 3, 3, 3,
1275 sf_sfclay_physics = 4, 4, 4,
1276 sf_surface_physics = 3, 3, 3,
1277 bl_pbl_physics = 4, 4, 4,
1279 cu_physics = 6, 6, 0,
1284 surface_input_source = 1,
1285 num_soil_layers = 6,
1289 cam_abs_freq_s = 21600
1294 cat >! dyn_real_14
<< EOF
1295 moist_adv_opt = 2, 2, 2,
1296 scalar_adv_opt = 2, 2, 2,
1297 chem_adv_opt = 0, 0, 0,
1298 tke_adv_opt = 0, 0, 0,
1301 cat >! time_real_14
<< EOF
1302 auxinput1_inname = "met_em.d<domain>.<date>"
1305 cat >! nest_real_14
<< EOF
1306 input_from_file = .true.,.false.,.false.
1309 cat >! damp_real_14
<< EOF
1311 zdamp = 5000., 5000., 5000.,
1312 dampcoef = 0.05, 0.05, 0.05
1315 cat >! phys_real_15
<< EOF
1316 mp_physics = 4, 4, 4,
1317 ra_lw_physics = 5, 5, 5,
1318 ra_sw_physics = 5, 5, 5,
1320 sf_sfclay_physics =10, 10, 10,
1321 sf_surface_physics = 7, 7, 7,
1322 bl_pbl_physics =10, 10, 10,
1324 cu_physics =14, 14, 0,
1329 surface_input_source = 1,
1330 num_soil_layers = 2,
1334 cat >! dyn_real_15
<< EOF
1335 moist_adv_opt = 2, 2, 2,
1336 scalar_adv_opt = 2, 2, 2,
1337 chem_adv_opt = 0, 0, 0,
1338 tke_adv_opt = 0, 0, 0,
1341 cat >! time_real_15
<< EOF
1342 auxinput1_inname = "met_em.d<domain>.<date>"
1345 cat >! nest_real_15
<< EOF
1346 input_from_file = .true.,.true.,.false.
1349 cat >! damp_real_15
<< EOF
1351 zdamp = 5000., 5000., 5000.,
1352 dampcoef = 0.05, 0.05, 0.05
1355 if ( $GLOBAL == TRUE
) then
1356 foreach exp
( 2 9 11 14 )
1357 sed -e 's/ cam_abs_dim2 *= [0-9][0-9]/ cam_abs_dim2 = 41/g' phys_real_
$exp >! phys_foo
; mv phys_foo phys_real_
$exp
1359 cp dyn_real_SAFE dyn_real_1
1360 cp dyn_real_SAFE dyn_real_2
1361 cp dyn_real_SAFE dyn_real_3
1362 cp dyn_real_SAFE dyn_real_4
1363 cp dyn_real_SAFE dyn_real_5
1364 cp dyn_real_SAFE dyn_real_6
1365 cp dyn_real_SAFE dyn_real_7
1366 cp dyn_real_SAFE dyn_real_8
1367 cp dyn_real_SAFE dyn_real_9
1368 cp dyn_real_SAFE dyn_real_10
1369 cp dyn_real_SAFE dyn_real_11
1370 cp dyn_real_SAFE dyn_real_12
1371 cp dyn_real_SAFE dyn_real_13
1372 cp dyn_real_SAFE dyn_real_14
1375 cat >! fdda_real_1
<< EOF
1376 grid_sfdda = 1, 1, 1,
1377 sgfdda_inname = "wrfsfdda_d<domain>",
1378 sgfdda_end_h = 24, 24, 24,
1379 sgfdda_interval_m = 360, 360, 360,
1381 guv_sfc = 0.0003, 0.0003, 0.0003,
1382 gt_sfc = 0.0003, 0.0003, 0.0003,
1383 gq_sfc = 0.0003, 0.0003, 0.0003,
1385 grid_fdda = 1, 1, 1,
1386 gfdda_inname = "wrffdda_d<domain>",
1387 gfdda_end_h = 24, 24, 24,
1388 gfdda_interval_m = 360, 360, 360,
1390 if_no_pbl_nudging_uv = 0, 0, 1,
1391 if_no_pbl_nudging_t = 0, 0, 1,
1392 if_no_pbl_nudging_q = 0, 0, 1,
1393 if_zfac_uv = 0, 0, 1,
1394 k_zfac_uv = 10, 10, 1,
1395 if_zfac_t = 0, 0, 1,
1396 k_zfac_t = 10, 10, 1,
1397 if_zfac_q = 0, 0, 1,
1398 k_zfac_q = 10, 10, 1,
1399 guv = 0.0003, 0.0003, 0.0003,
1400 gt = 0.0003, 0.0003, 0.0003,
1401 gq = 0.0003, 0.0003, 0.0003,
1407 cat >! fdda_real_time_1
<< EOF
1410 cat >! fdda_real_2
<< EOF
1411 obs_nudge_opt = 1,1,1,1,1
1413 obs_nudge_wind = 1,1,1,1,1
1414 obs_coef_wind = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1415 obs_nudge_temp = 1,1,1,1,1
1416 obs_coef_temp = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1417 obs_nudge_mois = 1,1,1,1,1
1418 obs_coef_mois = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1419 obs_rinxy = 240.,240.,180.,180,180
1426 obs_ipf_errob = .true.
1427 obs_ipf_nudob = .true.
1428 obs_ipf_in4dob = .true.
1431 cat >! fdda_real_time_2
<< EOF
1432 auxinput11_interval_s = 180
1433 auxinput11_end_h = 6
1436 cat >! fdda_real_3
<< EOF
1437 grid_sfdda = 1, 1, 1,
1438 sgfdda_inname = "wrfsfdda_d<domain>",
1439 sgfdda_end_h = 24, 24, 24,
1440 sgfdda_interval_m = 360, 360, 360,
1442 guv_sfc = 0.0003, 0.0003, 0.0003,
1443 gt_sfc = 0.0003, 0.0003, 0.0003,
1444 gq_sfc = 0.0003, 0.0003, 0.0003,
1446 grid_fdda = 1, 1, 1,
1447 gfdda_inname = "wrffdda_d<domain>",
1448 gfdda_end_h = 24, 24, 24,
1449 gfdda_interval_m = 360, 360, 360,
1451 if_no_pbl_nudging_uv = 0, 0, 1,
1452 if_no_pbl_nudging_t = 0, 0, 1,
1453 if_no_pbl_nudging_q = 0, 0, 1,
1454 if_zfac_uv = 0, 0, 1,
1455 k_zfac_uv = 10, 10, 1,
1456 if_zfac_t = 0, 0, 1,
1457 k_zfac_t = 10, 10, 1,
1458 if_zfac_q = 0, 0, 1,
1459 k_zfac_q = 10, 10, 1,
1460 guv = 0.0003, 0.0003, 0.0003,
1461 gt = 0.0003, 0.0003, 0.0003,
1462 gq = 0.0003, 0.0003, 0.0003,
1466 obs_nudge_opt = 0,0,0,0,0
1468 obs_nudge_wind = 1,1,1,1,1
1469 obs_coef_wind = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1470 obs_nudge_temp = 1,1,1,1,1
1471 obs_coef_temp = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1472 obs_nudge_mois = 1,1,1,1,1
1473 obs_coef_mois = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1474 obs_rinxy = 240.,240.,180.,180,180
1481 obs_ipf_errob = .true.
1482 obs_ipf_nudob = .true.
1483 obs_ipf_in4dob = .true.
1486 cat >! fdda_real_time_3
<< EOF
1487 auxinput11_interval_s = 180
1488 auxinput11_end_h = 6
1491 cat >! fdda_real_4
<< EOF
1492 grid_sfdda = 1, 1, 1,
1493 sgfdda_inname = "wrfsfdda_d<domain>",
1494 sgfdda_end_h = 24, 24, 24,
1495 sgfdda_interval_m = 360, 360, 360,
1497 guv_sfc = 0.0003, 0.0003, 0.0003,
1498 gt_sfc = 0.0003, 0.0003, 0.0003,
1499 gq_sfc = 0.0003, 0.0003, 0.0003,
1501 grid_fdda = 1, 1, 1,
1502 gfdda_inname = "wrffdda_d<domain>",
1503 gfdda_end_h = 24, 24, 24,
1504 gfdda_interval_m = 360, 360, 360,
1506 if_no_pbl_nudging_uv = 0, 0, 1,
1507 if_no_pbl_nudging_t = 0, 0, 1,
1508 if_no_pbl_nudging_q = 0, 0, 1,
1509 if_zfac_uv = 0, 0, 1,
1510 k_zfac_uv = 10, 10, 1,
1511 if_zfac_t = 0, 0, 1,
1512 k_zfac_t = 10, 10, 1,
1513 if_zfac_q = 0, 0, 1,
1514 k_zfac_q = 10, 10, 1,
1515 guv = 0.0003, 0.0003, 0.0003,
1516 gt = 0.0003, 0.0003, 0.0003,
1517 gq = 0.0003, 0.0003, 0.0003,
1521 obs_nudge_opt = 1,1,1,1,1
1523 obs_nudge_wind = 1,1,1,1,1
1524 obs_coef_wind = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1525 obs_nudge_temp = 1,1,1,1,1
1526 obs_coef_temp = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1527 obs_nudge_mois = 1,1,1,1,1
1528 obs_coef_mois = 6.E-4,6.E-4,6.E-4,6.E-4,6.E-4
1529 obs_rinxy = 240.,240.,180.,180,180
1536 obs_ipf_errob = .true.
1537 obs_ipf_nudob = .true.
1538 obs_ipf_in4dob = .true.
1541 cat >! fdda_real_time_4
<< EOF
1542 auxinput11_interval_s = 180
1543 auxinput11_end_h = 6
1546 cat >! fdda_real_5
<< EOF
1547 grid_fdda = 2, 2, 2,
1548 gfdda_inname = "wrffdda_d<domain>",
1549 gfdda_end_h = 24, 24, 24,
1550 gfdda_interval_m = 360, 360, 360,
1553 if_no_pbl_nudging_uv = 0, 0, 0,
1554 if_no_pbl_nudging_t = 0, 0, 0,
1555 if_no_pbl_nudging_ph = 0, 0, 0,
1556 if_no_pbl_nudging_q = 0, 0, 0,
1557 if_zfac_uv = 0, 0, 0,
1558 k_zfac_uv = 10, 10, 10,
1559 if_zfac_t = 0, 0, 0,
1560 k_zfac_t = 10, 10, 10,
1561 if_zfac_ph = 0, 0, 0,
1562 k_zfac_ph = 10, 10, 10,
1563 if_zfac_q = 0, 0, 0,
1564 k_zfac_q = 10, 10, 10,
1565 dk_zfac_uv = 1, 1, 1,
1566 dk_zfac_t = 1, 1, 1,
1567 dk_zfac_ph = 1, 1, 1,
1568 guv = 0.0003, 0.0003, 0.0003,
1569 gt = 0.0003, 0.0003, 0.0003,
1570 gph = 0.0003, 0.0003, 0.0003,
1571 gq = 0.0003, 0.0003, 0.0003,
1579 cat >! fdda_real_time_5
<< EOF
1582 # Tested options for ideal case em_b_wave. Modifying these
1583 # parameters is acceptable. Adding to these requires changes
1584 # to the ideal namelist build below.
1586 cat >! phys_b_wave_1a
<< EOF
1591 cat >! phys_b_wave_1b
<< EOF
1592 mp_physics = 1, 1, 1,
1594 cat >! phys_b_wave_1c
<< EOF
1595 non_hydrostatic = .true., .true., .true.,
1597 cat >! phys_b_wave_1d
<< EOF
1598 input_from_file = .true.,.false.,.false.
1601 cat >! phys_b_wave_2a
<< EOF
1606 cat >! phys_b_wave_2b
<< EOF
1607 mp_physics = 1, 1, 1,
1609 cat >! phys_b_wave_2c
<< EOF
1610 non_hydrostatic = .false., .false., .false.,
1612 cat >! phys_b_wave_2d
<< EOF
1613 input_from_file = .true.,.false.,.false.
1616 cat >! phys_b_wave_3a
<< EOF
1621 cat >! phys_b_wave_3b
<< EOF
1622 mp_physics = 2, 2, 2,
1624 cat >! phys_b_wave_3c
<< EOF
1625 non_hydrostatic = .false., .false., .false.,
1627 cat >! phys_b_wave_3d
<< EOF
1628 input_from_file = .true.,.false.,.false.
1631 cat >! phys_b_wave_4a
<< EOF
1636 cat >! phys_b_wave_4b
<< EOF
1637 mp_physics = 2, 2, 2,
1639 cat >! phys_b_wave_4c
<< EOF
1640 non_hydrostatic = .true., .true., .true.,
1642 cat >! phys_b_wave_4d
<< EOF
1643 input_from_file = .true.,.false.,.false.
1646 cat >! phys_b_wave_5a
<< EOF
1651 cat >! phys_b_wave_5b
<< EOF
1652 mp_physics = 0, 0, 0,
1654 cat >! phys_b_wave_5c
<< EOF
1655 non_hydrostatic = .false., .false., .false.,
1657 cat >! phys_b_wave_5d
<< EOF
1658 input_from_file = .true.,.false.,.false.
1661 # Tested options for ideal case em_quarter_ss. Modifying these
1662 # parameters is acceptable. Adding to these requires changes
1663 # to the ideal namelist build below.
1665 cat >! phys_quarter_ss_1a
<< EOF
1670 cat >! phys_quarter_ss_1b
<< EOF
1671 mp_physics = 1, 1, 1,
1673 cat >! phys_quarter_ss_1c
<< EOF
1674 moist_adv_opt = 1, 1, 1,
1675 scalar_adv_opt = 1, 1, 1,
1676 chem_adv_opt = 1, 1, 1,
1677 tke_adv_opt = 1, 1, 1,
1678 non_hydrostatic = .true., .true., .true.,
1680 cat >! phys_quarter_ss_1d
<< EOF
1681 input_from_file = .true.,.false.,.false.
1683 cat >! phys_quarter_ss_1e
<< EOF
1684 periodic_x = .false.,.false.,.false.,
1685 open_xs = .true., .false.,.false.,
1686 open_xe = .true., .false.,.false.,
1687 periodic_y = .false.,.false.,.false.,
1688 open_ys = .true., .false.,.false.,
1689 open_ye = .true., .false.,.false.,
1691 cat >! phys_quarter_ss_1f
<< EOF
1692 sf_sfclay_physics = 0, 0, 0,
1695 cat >! phys_quarter_ss_2a
<< EOF
1700 cat >! phys_quarter_ss_2b
<< EOF
1701 mp_physics = 1, 1, 1,
1703 cat >! phys_quarter_ss_2c
<< EOF
1704 moist_adv_opt = 2, 2, 2,
1705 scalar_adv_opt = 2, 2, 2,
1706 chem_adv_opt = 2, 2, 2,
1707 tke_adv_opt = 2, 2, 2,
1709 non_hydrostatic = .true., .true., .true.,
1711 cat >! phys_quarter_ss_2d
<< EOF
1712 input_from_file = .true.,.false.,.false.
1714 cat >! phys_quarter_ss_2e
<< EOF
1715 periodic_x = .false.,.false.,.false.,
1716 open_xs = .true., .false.,.false.,
1717 open_xe = .true., .false.,.false.,
1718 periodic_y = .false.,.false.,.false.,
1719 open_ys = .true., .false.,.false.,
1720 open_ye = .true., .false.,.false.,
1722 cat >! phys_quarter_ss_2f
<< EOF
1723 sf_sfclay_physics = 1, 1, 1,
1726 cat >! phys_quarter_ss_3a
<< EOF
1731 cat >! phys_quarter_ss_3b
<< EOF
1732 mp_physics = 1, 1, 1,
1734 cat >! phys_quarter_ss_3c
<< EOF
1735 moist_adv_opt = 2, 2, 2,
1736 scalar_adv_opt = 2, 2, 2,
1737 chem_adv_opt = 2, 2, 2,
1738 tke_adv_opt = 2, 2, 2,
1740 non_hydrostatic = .true., .true., .true.,
1742 cat >! phys_quarter_ss_3d
<< EOF
1743 input_from_file = .true.,.false.,.false.
1745 cat >! phys_quarter_ss_3e
<< EOF
1746 periodic_x = .false.,.false.,.false.,
1747 open_xs = .true., .false.,.false.,
1748 open_xe = .true., .false.,.false.,
1749 periodic_y = .false.,.false.,.false.,
1750 open_ys = .true., .false.,.false.,
1751 open_ye = .true., .false.,.false.,
1753 cat >! phys_quarter_ss_3f
<< EOF
1754 sf_sfclay_physics = 1, 1, 1,
1757 cat >! phys_quarter_ss_4a
<< EOF
1762 cat >! phys_quarter_ss_4b
<< EOF
1763 mp_physics = 2, 2, 2,
1765 cat >! phys_quarter_ss_4c
<< EOF
1766 moist_adv_opt = 1, 1, 1,
1767 scalar_adv_opt = 1, 1, 1,
1768 chem_adv_opt = 1, 1, 1,
1769 tke_adv_opt = 1, 1, 1,
1771 non_hydrostatic = .false., .false., .false.,
1773 cat >! phys_quarter_ss_4d
<< EOF
1774 input_from_file = .true.,.false.,.false.
1776 cat >! phys_quarter_ss_4e
<< EOF
1777 periodic_x = .true., .false.,.false.,
1778 open_xs = .false.,.false.,.false.,
1779 open_xe = .false.,.false.,.false.,
1780 periodic_y = .true., .false.,.false.,
1781 open_ys = .false.,.false.,.false.,
1782 open_ye = .false.,.false.,.false.,
1784 cat >! phys_quarter_ss_4f
<< EOF
1785 sf_sfclay_physics = 1, 1, 1,
1788 cat >! phys_quarter_ss_5a
<< EOF
1793 cat >! phys_quarter_ss_5b
<< EOF
1794 mp_physics = 2, 2, 2,
1796 cat >! phys_quarter_ss_5c
<< EOF
1797 moist_adv_opt = 2, 2, 2,
1798 scalar_adv_opt = 2, 2, 2,
1799 chem_adv_opt = 2, 2, 2,
1800 tke_adv_opt = 2, 2, 2,
1802 non_hydrostatic = .false., .false., .false.,
1804 cat >! phys_quarter_ss_5d
<< EOF
1805 input_from_file = .true.,.false.,.false.
1807 cat >! phys_quarter_ss_5e
<< EOF
1808 periodic_x = .true., .false.,.false.,
1809 open_xs = .false.,.false.,.false.,
1810 open_xe = .false.,.false.,.false.,
1811 periodic_y = .true., .false.,.false.,
1812 open_ys = .false.,.false.,.false.,
1813 open_ye = .false.,.false.,.false.,
1815 cat >! phys_quarter_ss_5f
<< EOF
1816 sf_sfclay_physics = 1, 1, 1,
1819 if ( $IO_FORM_WHICH[$IO_FORM] == IO
) then
1820 cat >! io_format
<< EOF
1821 io_form_history = $IO_FORM
1822 io_form_restart = $IO_FORM
1823 io_form_input = $IO_FORM
1824 io_form_boundary = $IO_FORM
1826 else if ( $IO_FORM_WHICH[$IO_FORM] == I
) then
1827 cat >! io_format
<< EOF
1830 io_form_input = $IO_FORM
1831 io_form_boundary = $IO_FORM
1833 else if ( $IO_FORM_WHICH[$IO_FORM] == O
) then
1834 cat >! io_format
<< EOF
1835 io_form_history = $IO_FORM
1838 io_form_boundary = 2
1843 if ( $dataset == jun01
) then
1844 set filetag_real
=2001-06-11_12:00:00
1845 else if ( $dataset == jan00
) then
1846 set filetag_real
=2000-01-24_12:00:00
1847 else if ( $dataset == chem
) then
1848 set filetag_real
= ( 2006-04-06_00:00:00 2006-04-06_12:00:00 )
1849 else if ( $dataset == global
) then
1850 set filetag_real
=2008-01-02_12:00:00
1853 set filetag_ideal
=0001-01-01_00:00:00
1854 #DAVE###################################################
1855 echo did phys
, set date to
$filetag_real
1858 #DAVE###################################################
1860 #####################################################################
1862 # Set up info for particular architectures
1864 set ARCH
= ( `uname` )
1866 set ZAP_SERIAL
= FALSE
1867 set ZAP_OPENMP
= FALSE
1868 set SERIALRUNCOMMAND
=
1870 set MPIRUNCOMMANDPOST
=
1873 if ( $ARCH[1] == AIX
) then
1875 set TMPDIR
= /ptmp
/$user
1876 # keep stuff out of $HOME and /ptmp/$USER
1877 # this allows multiple regressions tests to run simultaneously
1878 # extend this to other machines later
1879 if ( ( `hostname | cut -c 1-2` == bs
) && ( ! $?LOADL_JOB_NAME
) ) then
1880 echo "${0}: ERROR:: This batch script must be submitted via"
1881 echo "${0}: LoadLeveler on an AIX machine\!"
1883 else if ( `hostname | cut -c 1-2` == bs
) then
1884 set job_id
= `echo ${LOADL_JOB_NAME} | cut -f2 -d'.'`
1885 set DEF_DIR
= /ptmp
/$user/wrf_regression.
${job_id}
1886 set TMPDIR
= $DEF_DIR
1887 if ( -d $DEF_DIR ) then
1888 echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it"
1892 echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results"
1894 set CUR_DIR
= ${LOADL_STEP_INITDIR}
1895 else if ( ( `hostname | cut -c 1-2` == bv
) ||
( `hostname | cut -c 1-2` == be
) ) then
1896 set job_id
= $LSB_JOBID
1897 set DEF_DIR
= /ptmp
/$user/${tdir}/wrf_regression.
${job_id}
1898 set TMPDIR
= $DEF_DIR
1899 if ( -d $DEF_DIR ) then
1900 echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it"
1904 echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results"
1906 else if ( ( ( `hostname | cut -c 1-2` != be
) && ( `hostname | cut -c 1-2` != bv
) ) && ( ! $?LOADL_JOB_NAME
) ) then
1907 echo "${0}: ERROR:: This batch script must be submitted via"
1908 echo "${0}: LoadLeveler on an AIX machine\!"
1910 else if ( ( `hostname | cut -c 1-2` != be
) && ( `hostname | cut -c 1-2` != bv
) ) then
1911 set job_id
= `echo ${LOADL_JOB_NAME} | cut -f2 -d'.'`
1912 set DEF_DIR
= /ptmp
/$user/wrf_regression.
${job_id}
1913 set TMPDIR
= $DEF_DIR
1914 if ( -d $DEF_DIR ) then
1915 echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it"
1919 echo "See ${DEF_DIR}/wrftest.output and other files in ${DEF_DIR} for test results"
1921 set CUR_DIR
= ${LOADL_STEP_INITDIR}
1923 if ( ! -d $TMPDIR ) mkdir
$TMPDIR
1924 set MAIL
= /usr
/bin
/mailx
1925 set COMPOPTS
= ( 1 2 3 )
1926 set COMPOPTS_NO_NEST
= 0
1927 set COMPOPTS_NEST_STATIC
= 1
1928 set COMPOPTS_NEST_PRESCRIBED
= 2
1930 set OPENMP
= $Num_Procs
1931 setenv MP_PROCS
$Num_Procs
1933 if ( `hostname | cut -c 1-2` == bs
) then
1934 set MPIRUNCOMMAND
= poe
1935 else if ( `hostname | cut -c 1-2` == bv
) then
1936 set MPIRUNCOMMAND
= mpirun.lsf
1937 else if ( `hostname | cut -c 1-2` == be
) then
1938 set MPIRUNCOMMAND
= /contrib
/mpiruns
/be
/mpirun.lsf
1939 else if ( ( `hostname | cut -c 1-2` != bs
) && \
1940 ( `hostname | cut -c 1-2` != bv
) && ( `hostname | cut -c 1-2` != be
) ) then
1941 set MPIRUNCOMMAND
= poe
1943 if ( $CHEM == TRUE
) then
1944 set ZAP_OPENMP
= TRUE
1945 else if ( $CHEM == FALSE
) then
1946 set ZAP_OPENMP
= FALSE
1948 # check compiler version, JM
1949 lslpp
-i |
grep xlf |
grep ' xlfcmp ' |
head -1
1950 set xlfvers
=`lslpp -i | grep xlf | grep ' xlfcmp ' | head -1 | awk '{print $2}' | sed 's/\...*$//'`
1951 if ( ( $xlfvers > 9 ) && ( $NESTED == TRUE
) ) then
1952 # set ZAP_OPENMP = TRUE
1954 # end of compiler check, JM
1955 echo "Compiler version info: " >! version_info
1956 echo "FORTRAN: " `lslpp -l | grep xlfrte | head -1 | awk '{print $1 " " $2}'` >>! version_info
1957 echo " " >>! version_info
1958 echo "OS version info: " >>! version_info
1959 echo "AIX: " `lslpp -l | grep bos.mp | head -1 | awk '{print $1 " " $2}'` >>! version_info
1960 echo " " >>! version_info
1961 setenv MP_SHARED_MEMORY
yes
1962 else if ( $ARCH[1] == Darwin
) then
1963 if ( ( `hostname` == stink
) && ( -d /stink
/gill
/Regression_Tests
) ) then
1964 set DEF_DIR
= /stink
/gill
/Regression_Tests
/wrf_regression
1967 echo "We at least need a directory from which to do stuff"
1971 set MAIL
= /usr
/bin
/mailx
1972 if ( $LINUX_COMP == PGI
) then
1973 set COMPOPTS
= ( 1 2 3 )
1974 set ZAP_OPENMP
= FALSE
1975 else if ( $LINUX_COMP == G95
) then
1976 set COMPOPTS
= ( 13 0 14 )
1977 set ZAP_OPENMP
= TRUE
1979 set COMPOPTS_NO_NEST
= 0
1980 set COMPOPTS_NEST_STATIC
= 1
1981 set COMPOPTS_NEST_PRESCRIBED
= 2
1984 cat >! `pwd`/machfile
<< EOF
1990 set Mach
= `pwd`/machfile
1991 set SERIALRUNCOMMAND
=
1993 echo "Compiler version info: " >! version_info
1994 if ( $LINUX_COMP == PGI
) then
1995 set MPIRUNCOMMAND
= ( /usr
/local
/mpich2-1.0
.6p1-pgi
/bin
/mpirun
-np $Num_Procs -machinefile $Mach )
1996 pgf90
-V |
head -2 |
tail -1 >>&! version_info
1997 else if ( $LINUX_COMP == G95
) then
1998 set MPIRUNCOMMAND
= ( /usr
/local
/mpich
/bin
/mpirun
-np $Num_Procs -machinefile $Mach )
1999 g95
-v |
& grep gcc
>>&! version_info
2001 echo " " >>! version_info
2002 echo "OS version info: " >>! version_info
2003 uname
-a >>&! version_info
2004 echo " " >>! version_info
2005 ps
-A |
grep mpd |
grep -v grep >& /dev
/null
2007 if ( $ok != 0 ) then
2008 echo starting an mpd process
2011 else if ( $ARCH[1] == OSF1
&& $clrm == 1 ) then
2012 set DEF_DIR
= /`hostname | cut -d. -f1`/$user
2013 set TMPDIR
= /mmmtmp
/$user
2014 set MAIL
= /usr
/bin
/mailx
2015 if ( ( $NESTED == TRUE
) && ( $RSL_LITE != TRUE
) ) then
2016 set COMPOPTS
= ( 2 4 6 )
2017 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE != TRUE
) ) then
2018 set COMPOPTS
= ( 1 3 6 )
2019 else if ( ( $NESTED == TRUE
) && ( $RSL_LITE == TRUE
) ) then
2020 set COMPOPTS
= ( 2 4 5 )
2021 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE == TRUE
) ) then
2022 set COMPOPTS
= ( 1 3 5 )
2026 set ZAP_OPENMP
= TRUE
2027 cat >! $TMPDIR/machfile
<< EOF
2033 set Mach
= $TMPDIR/machfile
2034 set MPIRUNCOMMAND
= ( mpirun
-np $Num_Procs -machinefile $Mach )
2035 echo "Compiler version info: " >! version_info
2036 f90
-version >>&! version_info
2037 echo " " >>! version_info
2038 echo "OS version info: " >>! version_info
2039 uname
-a >>&! version_info
2040 echo " " >>! version_info
2041 else if ( ( $ARCH[1] == Linux
) && ( `hostname` == bay-mmm
) ) then
2042 set DEF_DIR
= /data
3/mp
/${user}/`hostname`
2043 if ( ! -d $DEF_DIR ) mkdir
$DEF_DIR
2045 set MAIL
= /bin
/mail
2046 if ( $LINUX_COMP == PGI
) then
2047 if ( ( $NESTED == TRUE
) && ( $RSL_LITE != TRUE
) ) then
2048 set COMPOPTS
= ( 2 4 5 )
2049 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE != TRUE
) ) then
2050 set COMPOPTS
= ( 1 3 5 )
2051 else if ( ( $NESTED == TRUE
) && ( $RSL_LITE == TRUE
) ) then
2052 set COMPOPTS
= ( 2 4 6 )
2053 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE == TRUE
) ) then
2054 set COMPOPTS
= ( 1 3 6 )
2056 else if ( $LINUX_COMP == INTEL
) then
2057 if ( $NESTED == TRUE
) then
2058 set COMPOPTS
= ( 8 10 11 )
2059 else if ( $NESTED != TRUE
) then
2060 set COMPOPTS
= ( 7 9 11 )
2064 set OPENMP
= $Num_Procs
2065 cat >! machfile
<< EOF
2071 set Mach
= `pwd`/machfile
2072 if ( $CHEM == TRUE
) then
2073 set ZAP_OPENMP
= TRUE
2074 else if ( $CHEM == FALSE
) then
2075 set ZAP_OPENMP
= FALSE
2077 if ( $LINUX_COMP == INTEL
) then
2078 set ZAP_OPENMP
= TRUE
2080 set MPIRUNCOMMAND
= ( mpirun
-np $Num_Procs -machinefile $Mach )
2081 echo "Compiler version info: " >! version_info
2082 if ( $LINUX_COMP == PGI
) then
2083 pgf90
-V >>&! version_info
2084 else if ( $LINUX_COMP == INTEL
) then
2085 ifort
-v >>&! version_info
2087 echo " " >>! version_info
2088 echo "OS version info: " >>! version_info
2089 uname
-a >>&! version_info
2090 echo " " >>! version_info
2091 else if ( ( $ARCH[1] == Linux
) && ( `hostname | cut -c 1-2` == ln ) ) then
2092 set DEF_DIR
= /ptmp
/${user}/wrf_regtest
2093 if ( ! -d $DEF_DIR ) mkdir
$DEF_DIR
2095 set MAIL
= /bin
/mail
2096 if ( $LINUX_COMP == PGI
) then
2097 if ( ( $NESTED == TRUE
) && ( $RSL_LITE != TRUE
) ) then
2098 set COMPOPTS
= ( 4 2 3 )
2099 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE != TRUE
) ) then
2100 set COMPOPTS
= ( 1 2 3 )
2105 cat >! machfile
<< EOF
2111 set Mach
= `pwd`/machfile
2112 set ZAP_OPENMP
= TRUE
2113 set MPIRUNCOMMAND
= mpirun.lsf
2114 echo "Compiler version info: " >! version_info
2115 if ( $LINUX_COMP == PGI
) then
2116 pgf90
-V >>&! version_info
2117 else if ( $LINUX_COMP == INTEL
) then
2118 ifort
-v >>&! version_info
2120 echo " " >>! version_info
2121 echo "OS version info: " >>! version_info
2122 uname
-a >>&! version_info
2123 echo " " >>! version_info
2124 else if ( ( $ARCH[1] == Linux
) && ( `hostname` == basswood
) ) then
2126 set DEF_DIR
= /basswood
/$user/Regression_Tests
/wrf_regression
2127 set TMPDIR
= $DEF_DIR
2128 if ( -d $DEF_DIR ) then
2129 echo "${0}: ERROR:: Directory ${DEF_DIR} exists, please remove it"
2133 echo "See directory ${DEF_DIR}/ for wrftest.output and other test results"
2135 set MAIL
= /bin
/mail
2136 set COMPOPTS_NO_NEST
= 0
2137 set COMPOPTS_NEST_STATIC
= 1
2138 set COMPOPTS_NEST_PRESCRIBED
= 2
2139 if ( $LINUX_COMP == PGI
) then
2140 set COMPOPTS
= ( 7 8 9 )
2141 else if ( $LINUX_COMP == G95
) then
2142 set COMPOPTS
= ( 5 5 6 )
2145 set OPENMP
= $Num_Procs
2146 cat >! machfile
<< EOF
2152 set Mach
= `pwd`/machfile
2153 if ( $CHEM == TRUE
) then
2154 set ZAP_OPENMP
= TRUE
2155 else if ( $CHEM == FALSE
) then
2156 set ZAP_OPENMP
= FALSE
2158 if ( $LINUX_COMP == G95
) then
2159 set ZAP_OPENMP
= TRUE
2161 set ZAP_OPENMP
= TRUE
2162 set MPIRUNCOMMAND
= ( mpirun
-np $Num_Procs -machinefile $Mach )
2163 echo "Compiler version info: " >! version_info
2164 if ( $LINUX_COMP == PGI
) then
2165 pgf90
-V >>&! version_info
2166 else if ( $LINUX_COMP == G95
) then
2167 g95
-v |
& grep gcc
>>&! version_info
2169 echo " " >>! version_info
2170 echo "OS version info: " >>! version_info
2171 uname
-a >>&! version_info
2172 echo " " >>! version_info
2173 else if ( `hostname` == tempest
) then
2174 set DEF_DIR
= /ptmp
/${user}/wrf_regtest.
${QSUB_REQID}
2175 if ( ! -d $DEF_DIR ) mkdir
$DEF_DIR
2177 set MAIL
= /usr
/sbin
/Mail
2178 set COMPOPTS
= ( 1 2 3 )
2180 set OPENMP
= $Num_Procs
2181 set Mach
= `pwd`/machfile
2182 set ZAP_OPENMP
= TRUE
2183 set MPIRUNCOMMAND
= ( mpirun
-np $Num_Procs )
2184 echo "Compiler version info: " >! version_info
2185 f90
-version >>&! version_info
2186 echo " " >>! version_info
2187 echo "OS version info: " >>! version_info
2188 uname
-a >>&! version_info
2189 echo " " >>! version_info
2190 else if ( ( $ARCH[1] == Linux
) && ( `hostname` == master
) ) then
2191 set DEF_DIR
= /big
6/gill
/DO_NOT_REMOVE_DIR
2193 set MAIL
= /bin
/mail
2194 if ( $LINUX_COMP == PGI
) then
2195 if ( $NESTED == TRUE
) then
2196 set COMPOPTS
= ( 2 4 5 )
2197 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE == TRUE
) ) then
2198 set COMPOPTS
= ( 1 3 6 )
2199 else if ( ( $NESTED != TRUE
) && ( $RSL_LITE != TRUE
) ) then
2200 set COMPOPTS
= ( 1 3 5 )
2202 else if ( $LINUX_COMP == INTEL
) then
2203 if ( $NESTED == TRUE
) then
2204 set COMPOPTS
= ( 8 10 11 )
2205 else if ( $NESTED != TRUE
) then
2206 set COMPOPTS
= ( 7 9 11 )
2211 cat >! machfile
<< EOF
2217 set Mach
= `pwd`/machfile
2218 if ( $CHEM == TRUE
) then
2219 set ZAP_OPENMP
= TRUE
2220 else if ( $CHEM == FALSE
) then
2221 set ZAP_OPENMP
= FALSE
2223 if ( $LINUX_COMP == INTEL
) then
2224 set ZAP_OPENMP
= TRUE
2226 set MPIRUNCOMMAND
= ( mpirun
-v -np $Num_Procs -machinefile $Mach -nolocal )
2227 set MPIRUNCOMMANDPOST
= "< /dev/null"
2228 echo "Compiler version info: " >! version_info
2229 if ( $LINUX_COMP == PGI
) then
2230 pgf90
-V >>&! version_info
2231 else if ( $LINUX_COMP == INTEL
) then
2232 ifort
-v >>&! version_info
2234 echo " " >>! version_info
2235 echo "OS version info: " >>! version_info
2236 uname
-a >>&! version_info
2237 echo " " >>! version_info
2239 echo "Unrecognized architecture for regression test" >! error_message
2240 echo `uname` >> error_message
2241 echo `hostname` >> error_message
2242 $MAIL -s "Unknown architecture $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < error_message
2246 #####################################################################
2247 #DAVE###################################################
2248 echo did the arch specific stuff
2251 #DAVE###################################################
2253 if ( $FDDA == TRUE
) then
2254 if ( ( $PHYSOPTS_FDDA == GRID
) && ( $ZAP_OPENMP == FALSE
) ) then
2255 set ZAP_OPENMP
= FALSE
2256 else if ( $PHYSOPTS_FDDA == BOTH
) then
2257 set ZAP_OPENMP
= TRUE
2261 # First of all, in which particular directory do we start.
2265 # We want to keep the old regression stuff around
2267 if ( -d regression_test
) then
2268 if ( -d regression_test.old
) then
2269 /bin
/rm -fr regression_test.old
2271 /bin
/mv regression_test regression_test.old
2274 # Go to the regression test directory
2276 mkdir regression_test
2278 if ( $ok != 0 ) then
2279 echo "Gee, I cannot make a directory in $DEF_DIR" >! error_message
2280 echo `pwd` >> error_message
2281 echo `\ls -ls` >> error_message
2282 $MAIL -s "$DEF_DIR not writable $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < error_message
2285 pushd regression_test
2288 if ( $acquire_from == "cvs" ) then
2290 # Checkout the most recent version of WRF from the NCAR cvs repository,
2291 # and pick up the required input data from the anonymous ftp site.
2293 cvs checkout
-D $thedate WRFV3
2294 find .
/WRFV3
-exec touch \
{\
} \
;
2295 ftp -n ftp.ucar.edu
< ftp_script_data
2298 else if ( $acquire_from == "filearg" ) then
2300 # A tar file of the WRF source was provided, so that is used, along with
2301 # the required input data files from the ftp site.
2307 ftp -n ftp.ucar.edu
< ftp_script_data
2309 else if ( $acquire_from == "environment" ) then
2311 # A tar file of WRF is assumed to be available.
2317 # And we can stick the input data where we want, the WRFV3 directory has been created.
2319 ( cd WRFV
3/test
/em_real
; ln -sf $thedataem/* .
)
2320 ( cd WRFV
3/test
/nmm_real
; ln -s $thedatanmm/met_nmm
* .
; \
2321 cp $thedatanmm/namelist.input.regtest .
)
2322 #DAVE###################################################
2323 ( cd WRFV
3/test
/em_real
; ls -ls )
2324 ( cd WRFV
3/test
/nmm_real
; ls -ls )
2327 #DAVE###################################################
2329 # John-specific stuff for maple is the else; part of the "using service machines".
2334 if ( ! -d $TMPDIR ) then
2335 echo something wrong
1
2337 if ( ! -d $TMPDIR/RUN
) then
2339 /bin
/rm -fr $TMPDIR/RUN
/*
2341 if ( -d $TMPDIR/RUN
) then
2342 tar cf
- .
/WRFV
3/test .
/WRFV
3/main |
( cd $TMPDIR/RUN
; tar xvf
- )
2345 echo something wrong
2
2350 # Here we initialize our output message.
2352 if ( -e ${DEF_DIR}/wrftest.output
) rm ${DEF_DIR}/wrftest.output
2353 echo "Architecture $ARCH[1] machine: `hostname`" >>! ${DEF_DIR}/wrftest.output
2354 echo "Test run from directory: ${WHERE_AM_I}" >>! ${DEF_DIR}/wrftest.output
2355 echo "WRFV3 source from: $acquire_from " >>! ${DEF_DIR}/wrftest.output
2356 echo "Number of OpenMP processes to use: $OPENMP" >>! ${DEF_DIR}/wrftest.output
2357 echo "Number of MPI processes to use: $Num_Procs" >>! ${DEF_DIR}/wrftest.output
2358 if ( $ARCH[1] == Darwin
) then
2359 set name
= `finger $user | grep "Name:" | awk '{print $4 " " $5}'`
2361 set name
= ( `grep ^${user}: /etc/passwd | cut -d: -f5` )
2363 echo "Test conducted by $name" >>! ${DEF_DIR}/wrftest.output
2364 echo " " >>! ${DEF_DIR}/wrftest.output
2365 echo "Test run from directory ${CUR_DIR}" >>! ${DEF_DIR}/wrftest.output
2366 echo " " >>! ${DEF_DIR}/wrftest.output
2367 if ( $?LOADL_JOB_NAME
) then
2368 echo "Loadlever job name = ${LOADL_JOB_NAME}" >>! ${DEF_DIR}/wrftest.output
2369 echo " " >>! ${DEF_DIR}/wrftest.output
2371 echo "Real data case for EM is from $dataset " >>! ${DEF_DIR}/wrftest.output
2372 echo " " >>! ${DEF_DIR}/wrftest.output
2373 echo "The em real and ideal forecasts will be nested: $NESTED " >>! ${DEF_DIR}/wrftest.output
2374 echo " " >>! ${DEF_DIR}/wrftest.output
2375 if ( $REG_TYPE == BIT4BIT
) then
2376 echo "This is a bit-wise (traditional) regression test. " >>! ${DEF_DIR}/wrftest.output
2377 echo " " >>! ${DEF_DIR}/wrftest.output
2378 else if ( $REG_TYPE == OPTIMIZED
) then
2379 echo "This is a fully optimized regression test. " >>! ${DEF_DIR}/wrftest.output
2380 echo "No inter-comparisons are made. " >>! ${DEF_DIR}/wrftest.output
2381 echo " " >>! ${DEF_DIR}/wrftest.output
2383 if ( $REAL8 == TRUE
) then
2384 echo "Floating point precision is 8-bytes" >>! ${DEF_DIR}/wrftest.output
2385 echo " " >>! ${DEF_DIR}/wrftest.output
2387 if ( ( $CHEM == TRUE
) && ( $KPP != TRUE
) ) then
2388 echo "WRF_CHEM tests run for em_real core only" >>! ${DEF_DIR}/wrftest.output
2389 echo " " >>! ${DEF_DIR}/wrftest.output
2390 else if ( ( $CHEM == TRUE
) && ( $KPP == TRUE
) ) then
2391 echo "WRF_CHEM KPP tests run for em_real core only" >>! ${DEF_DIR}/wrftest.output
2392 echo " " >>! ${DEF_DIR}/wrftest.output
2394 if ( $ADAPTIVE == TRUE
) then
2395 echo "Adaptive time step for em_real core only" >>! ${DEF_DIR}/wrftest.output
2396 echo " " >>! ${DEF_DIR}/wrftest.output
2398 if ( $GLOBAL == TRUE
) then
2399 echo "Global tests run for em_real core only" >>! ${DEF_DIR}/wrftest.output
2400 echo " " >>! ${DEF_DIR}/wrftest.output
2402 if ( $ESMF_LIB == TRUE
) then
2403 echo "A separately installed version of the latest ESMF library" >>! ${DEF_DIR}/wrftest.output
2404 echo "(NOT the ESMF library included in the WRF tarfile) will" >>! ${DEF_DIR}/wrftest.output
2405 echo "be used for MPI tests" >>! ${DEF_DIR}/wrftest.output
2406 echo " " >>! ${DEF_DIR}/wrftest.output
2408 if ( $QUILT == TRUE
) then
2409 echo "One WRF output quilt server will be used for some tests" >>! ${DEF_DIR}/wrftest.output
2410 echo " " >>! ${DEF_DIR}/wrftest.output
2412 if ( $FDDA == TRUE
) then
2413 if ( $PHYSOPTS_FDDA == GRID
) then
2414 echo "Running FDDA tests (3D & SFC grid nudging only)" >>! ${DEF_DIR}/wrftest.output
2415 echo " " >>! ${DEF_DIR}/wrftest.output
2416 else if ( $PHYSOPTS_FDDA == BOTH
) then
2417 echo "Running FDDA tests (3D&SFC=1, obs=2, 3D&SFC=3, 3D&SFC+obs=4, Spectral=5)" >>! ${DEF_DIR}/wrftest.output
2418 echo " " >>! ${DEF_DIR}/wrftest.output
2421 if ( $GENERATE_BASELINE != FALSE
) then
2422 echo "WRF output will be archived in baseline directory ${GENERATE_BASELINE} for some tests" >>! \
2423 ${DEF_DIR}/wrftest.output
2424 echo " " >>! ${DEF_DIR}/wrftest.output
2426 if ( $COMPARE_BASELINE != FALSE
) then
2427 echo "WRF output will be compared with files in baseline directory ${COMPARE_BASELINE} for some tests" >>! \
2428 ${DEF_DIR}/wrftest.output
2429 echo " " >>! ${DEF_DIR}/wrftest.output
2431 echo "The selected I/O option is $IO_FORM ($IO_FORM_NAME[$IO_FORM])" >>! ${DEF_DIR}/wrftest.output
2432 if ( $IO_FORM_WHICH[$IO_FORM] == IO
) then
2433 echo "This option is for both input and history files" >>! ${DEF_DIR}/wrftest.output
2434 echo " " >>! ${DEF_DIR}/wrftest.output
2435 else if ( $IO_FORM_WHICH[$IO_FORM] == I
) then
2436 echo "This option is for input files only" >>! ${DEF_DIR}/wrftest.output
2437 echo " " >>! ${DEF_DIR}/wrftest.output
2438 else if ( $IO_FORM_WHICH[$IO_FORM] == O
) then
2439 echo "This option is for history files only" >>! ${DEF_DIR}/wrftest.output
2440 echo " " >>! ${DEF_DIR}/wrftest.output
2443 cat ${CUR_DIR}/version_info
>>! ${DEF_DIR}/wrftest.output
2445 # There are three WRF em executables to be considered that can run in threaded and
2446 # distributed memory. The 2d hills and 2d squall lines cannot be parallelized with
2447 # MPI, and are therefore not considered in this shell. The nmm is only run with
2448 # distributed memory (1 vs 4 procs).
2450 set first_time_in
= TRUE
2451 foreach core
( $CORES )
2452 #DAVE###################################################
2453 echo doing core
$core
2456 #DAVE###################################################
2458 # Some sleight of hand is required for the chemistry tests because we need to
2459 # build it twice. But normally, we only build with different real vs ideal, or em vs nmm.
2460 # What to do, what to do? Well, we ask for em_real TWICE. The first time we build without chemistry
2461 # activated, the second time with it activated. The first time, we do a single
2462 # test, the second time through, we do the other 5 tests.
2464 if ( ( $CHEM == TRUE
) && ( ${#CORES} == 2 ) && ( $first_time_in == TRUE
) ) then
2466 set PHYSOPTS
= ( 1 )
2467 set first_time_in
= FALSE
2468 else if ( ( $CHEM == TRUE
) && ( $KPP != TRUE
) && ( ${#CORES} == 2 ) && ( $first_time_in != TRUE
) ) then
2470 set PHYSOPTS
= ( 2 3 4 5 6 )
2471 else if ( ( $CHEM == TRUE
) && ( $KPP == TRUE
) && ( ${#CORES} == 2 ) && ( $first_time_in != TRUE
) ) then
2473 set PHYSOPTS
= ( 2 3 )
2478 set ZAP_SERIAL_FOR_THIS_CORE
= FALSE
2479 set ZAP_OPENMP_FOR_THIS_CORE
= FALSE
2480 if ( `echo $core | cut -c 1-2` == em
) then
2481 setenv WRF_EM_CORE
1
2482 setenv WRF_NMM_CORE
0
2483 setenv WRF_COAMPS_CORE
0
2484 setenv WRF_EXP_CORE
0
2485 set ZAP_SERIAL_FOR_THIS_CORE
= FALSE
2486 set ZAP_OPENMP_FOR_THIS_CORE
= FALSE
2487 else if ( `echo $core | cut -c 1-3` == nmm
) then
2488 setenv WRF_EM_CORE
0
2489 setenv WRF_NMM_CORE
1
2490 setenv WRF_COAMPS_CORE
0
2491 setenv WRF_EXP_CORE
0
2492 set ZAP_SERIAL_FOR_THIS_CORE
= TRUE
2493 set ZAP_OPENMP_FOR_THIS_CORE
= TRUE
2496 # Here we are looping over all of the various compilation configurations,
2497 # such as serial only, OpenMP only, MPI only, etc. Each architecture
2498 # has its own list of these options. We build each of the executables for
2499 # this particular ${core}.
2501 foreach compopt
( $COMPOPTS )
2502 #DAVE###################################################
2503 echo doing compile option
$compopt
2506 #DAVE###################################################
2508 # We sometimes are interested in bypassing the OpenMP option.
2510 if ( $compopt == $COMPOPTS[2] ) then
2511 if ( $ZAP_OPENMP == TRUE ||
$ZAP_OPENMP_FOR_THIS_CORE == TRUE
) then
2516 # NMM only runs parallel
2517 if ( $compopt == $COMPOPTS[1] ) then
2518 if ( $ZAP_SERIAL == TRUE ||
$ZAP_SERIAL_FOR_THIS_CORE == TRUE
) then
2523 if ( `uname` == AIX
) goto BUILD_REGARDLESS
2525 # Did we already build this one?
2527 if ( $core == em_real
) then
2528 if ( ( $compopt == $COMPOPTS[1] ) && \
2529 ( -e main
/wrf_
${core}.exe.
$compopt ) && \
2530 ( -e main
/real_
${core}.exe
.1 ) && \
2531 ( -e ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
) ) then
2533 else if ( ( $compopt != $COMPOPTS[1] ) && \
2534 ( -e main
/wrf_
${core}.exe.
$compopt ) && \
2535 ( -e ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
) ) then
2539 if ( ( $compopt == $COMPOPTS[1] ) && \
2540 ( -e main
/wrf_
${core}.exe.
$compopt ) && \
2541 ( -e main
/ideal_
${core}.exe
.1 ) && \
2542 ( -e ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
) ) then
2544 else if ( ( $compopt != $COMPOPTS[1] ) && \
2545 ( -e main
/wrf_
${core}.exe.
$compopt ) && \
2546 ( -e ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
) ) then
2553 # The WRF configuration file works with a single integer
2554 # input, which is the compiler option. By convention, option $COMPOPTS[1] is
2555 # serial, $COMPOPTS[2] is OMP, and $COMPOPTS[3] is MPI.
2557 # Print info about use of separately installed ESMF library.
2558 set esmf_lib_str
= " - - - - - - - - - - - - - "
2559 if ( $ESMF_LIB == TRUE
) then
2560 # only test ESMF with MPI
2561 if ( $compopt == $COMPOPTS[3] ) then
2562 echo "A separately installed version of the latest ESMF library" >>! ${DEF_DIR}/wrftest.output
2563 echo "(NOT the ESMF library included in the WRF tarfile) is" >>! ${DEF_DIR}/wrftest.output
2564 echo "being used for this test of $core parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
2565 set esmf_lib_str
= "using separate ESMF library"
2566 echo "Setting ESMFLIB = ${ESMFLIBSAVE}" >>! ${DEF_DIR}/wrftest.output
2567 echo "Setting ESMFINC = ${ESMFINCSAVE}" >>! ${DEF_DIR}/wrftest.output
2568 setenv ESMFLIB
$ESMFLIBSAVE
2569 setenv ESMFINC
$ESMFINCSAVE
2576 #DAVE###################################################
2577 echo start build mechanism
2580 #DAVE###################################################
2583 # Edit build command for either bit-wise comparison or full optimization.
2585 if ( $REG_TYPE == BIT4BIT
) then
2591 # Edit build command. If this is a nested run, then either static nest
2592 # (idealized) or prescribed move (em_real). If not nested, then shut off
2593 # the nesting build option.
2595 if ( $NESTED == TRUE
) then
2596 if ( $core == em_real
) then
2597 set compopts_nest
= $COMPOPTS_NEST_PRESCRIBED
2599 set compopts_nest
= $COMPOPTS_NEST_STATIC
2602 set compopts_nest
= $COMPOPTS_NO_NEST
2605 .
/configure
$DEBUG_FLAG << EOF
2609 cp configure.wrf configure.wrf.core
=${core}_build
=${compopt}
2611 # The configure.wrf file needs to be adjusted as to whether we are requesting real*4 or real*8
2612 # as the default floating precision.
2614 if ( $REAL8 == TRUE
) then
2615 sed -e '/^RWORDSIZE/s/\$(NATIVE_RWORDSIZE)/8/' configure.wrf
> ! foo
; /bin
/mv foo configure.wrf
2618 # For AIX, remove the MASSV libs for bit-wise comparisons.
2620 if ( ( `uname` == AIX
) && ( $REG_TYPE == BIT4BIT
) ) then
2621 sed -e '/^LDFLAGS_LOCAL/s/-lmass -lmassv/ /' \
2622 -e '/^ARCH_LOCAL/s/-DNATIVE_MASSV/ /' \
2623 configure.wrf
> ! foo
; /bin
/mv foo configure.wrf
2626 # Fix the OpenMP default for IBM regression testing - noopt required for bit-wise comparison.
2628 # this should not be needed any more, with changes to have only OMP modules compiled with -qsmp=noauto. JM 20090217
2629 # if ( ( $compopt == $COMPOPTS[2] ) && ( `uname` == AIX ) ) then
2630 # sed -e '/^OMP/s/-qsmp=noauto/-qsmp=noauto:noopt/' configure.wrf > ! foo ; /bin/mv foo configure.wrf
2633 # A special flag to insure the same results from a random number used in the SAS CU scheme.
2635 sed -e '/^ARCH_LOCAL/s/=/= -DREGTEST /' configure.wrf
> ! foo
; /bin
/mv foo configure.wrf
2637 # Save the configure file.
2639 cp configure.wrf configure.wrf.core
=${core}_build
=${compopt}
2641 #DAVE###################################################
2642 echo configure built with optim mods removed
, ready to compile
2645 #DAVE###################################################
2647 # The WRF_SRC_ROOT_DIR hack is only used by the OSF1 build.
2648 # It works around the annoying fact that in OSF1 $(PWD) does
2649 # not change during execution of regtest.csh, despite the "cd"
2650 # and "pushd" commands.
2651 setenv WRF_SRC_ROOT_DIR
"${DEF_DIR}/regression_test/WRFV3"
2652 # Build this executable
2654 .
/compile
$core >&! compile_
${core}_build
=${compopt}.log
2655 #DAVE###################################################
2659 #DAVE###################################################
2661 # Did the compile work? Check the expected executable names and locations.
2664 if ( ! -x main
/wrf.exe
) set ok
= 1
2666 if ( ( $core == em_real
) && ( $compopt == $COMPOPTS[1] ) ) then
2667 if ( ! -e main
/real.exe
) set ok
= 1
2668 else if ( ( $core == nmm_real
) && ( $compopt == $COMPOPTS[3] ) ) then
2669 if ( ! -e main
/real_nmm.exe
) set ok
= 1
2670 else if ( $compopt == $COMPOPTS[1] ) then
2671 if ( ! -e main
/ideal.exe
) set ok
= 1
2674 if ( ! -x external
/io_netcdf
/diffwrf
) set ok
= 1
2675 # if ( ! -x external/io_int/diffwrf ) set ok = 1
2677 if ( $ok != 0 ) then
2678 echo "SUMMARY compilation for $core parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2679 $MAIL -s "REGRESSION FAILURE $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2682 echo "SUMMARY compilation for $core parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
2683 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2684 mv main
/wrf.exe main
/wrf_
${core}.exe.
$compopt
2685 if ( ( $core == em_real
) && ( $compopt == $COMPOPTS[1] ) ) then
2686 mv main
/real.exe main
/real_
${core}.exe
.1
2687 else if ( ( $core == nmm_real
) && ( $compopt == $COMPOPTS[3] ) ) then
2688 mv main
/real_nmm.exe main
/real_
${core}.exe.
$COMPOPTS[3]
2689 else if ( $compopt == $COMPOPTS[1] ) then
2690 mv main
/ideal.exe main
/ideal_
${core}.exe
.1
2692 #DAVE###################################################
2697 #DAVE###################################################
2703 cp main
/*exe
* $TMPDIR/RUN
/WRFV
3/main
2709 pushd $TMPDIR/RUN
/WRFV3
2712 # We have all of the executables built, now we run'em. This is a loop
2713 # over all of the various physics options for this particular
2714 # ${core}. Inside the physics loop, we loop over the parallel options.
2715 # This allows us to use the same WRF input files for each of the parallel
2716 # choices for a single physics loop index.
2718 foreach phys_option
( $PHYSOPTS )
2719 #DAVE###################################################
2720 echo which phys option
$phys_option
2723 #DAVE###################################################
2725 # For each of the executables, we need to run several physics
2728 if ( $core == em_real
) then
2730 if ( $CHEM != TRUE
) then
2731 set filetag
=$filetag_real
2732 else if ( $CHEM == TRUE
) then
2733 if ( $phys_option <= 3 ) then
2734 set filetag
=$filetag_real[1]
2736 set filetag
=$filetag_real[2]
2740 foreach compopt
( $COMPOPTS )
2741 #DAVE###################################################
2742 echo real
if filetag is
$filetag
2743 echo compopt
= $compopt
2746 #DAVE###################################################
2748 # We sometimes are interested in bypassing the OpenMP option.
2750 if ( $compopt == $COMPOPTS[2] ) then
2751 if ( $ZAP_OPENMP == TRUE ||
$ZAP_OPENMP_FOR_THIS_CORE == TRUE
) then
2752 goto BYPASS_COMP_LOOP_REAL
2756 if ( $compopt == $COMPOPTS[1] ) then
2757 if ( $ZAP_SERIAL == TRUE ||
$ZAP_SERIAL_FOR_THIS_CORE == TRUE
) then
2758 goto BYPASS_COMP_LOOP_REAL
2765 # Create the correct namelist.input file for real data cases.
2768 if ( $CHEM != TRUE
) then
2769 cp ${CUR_DIR}/phys_real_
${phys_option} phys_opt
2770 if ( $NESTED != TRUE
) then
2771 cp ${CUR_DIR}/dyn_real_
${phys_option} dyn_opt
2773 cp ${CUR_DIR}/dyn_real_SAFE dyn_opt
2775 cp ${CUR_DIR}/time_real_
${phys_option} time_opt
2776 cp ${CUR_DIR}/dom_real dom_real
2777 cp ${CUR_DIR}/nest_real_
${phys_option} nest_input_opt
2778 cp ${CUR_DIR}/damp_real_
${phys_option} damp_real
2779 if ( -e fdda_opt
) rm fdda_opt
2780 cat " grid_fdda=0" > fdda_opt
2781 if ( -e fdda_time
) rm fdda_time
2783 if ( $FDDA == TRUE
) then
2784 cp ${CUR_DIR}/fdda_real_
${phys_option} fdda_opt
2785 cp ${CUR_DIR}/fdda_real_time_
${phys_option} fdda_time
2788 set time_step
= `awk ' /^ time_step /{ print $3 } ' namelist.input.$dataset | cut -d, -f1`
2790 # Wanna do more/less time steps on the real cases? Easy. Those last two numbers
2791 # in the eqns are all you need. Their product must be 60. So, instead of 3 and 20,
2792 # (3 coarse grid timesteps), you could use 20 and 3 (20 coarse grid time steps).
2794 if ( $NESTED == TRUE
) then
2795 @ run_seconds
= $time_step * 3
2796 @ history_interval
= $time_step / 20
2797 else if ( $NESTED != TRUE
) then
2798 @ run_seconds
= $time_step * 10
2799 @ history_interval
= $time_step / 6
2801 rm ed_in namelist.input.temp
2803 g/run_seconds/s/[0-9]/$run_seconds
2804 g/history_interval/s/[0-9][0-9][0-9]/$history_interval
2805 w namelist.input.temp
2808 ed namelist.input.
$dataset < ed_in
2810 cp ${CUR_DIR}/io_format io_format
2811 sed -e '/^ mp_physics/,/ensdim/d' -e '/^ &physics/r ./phys_opt' \
2812 -e '/^ moist_adv_opt/,/scalar_adv_opt/d' -e '/^ non_hydrostatic/r ./dyn_opt' \
2813 -e '/^ auxinput1_inname/d' -e '/^ debug_level/r ./time_opt' \
2814 -e '/^ input_from_file/d' -e '/^ interval_seconds/r ./nest_input_opt' \
2815 -e '/^ time_step /,/^ smooth_option/d' -e '/^ &domains/r ./dom_real' \
2816 -e '/^ damp_opt /,/^ dampcoef/d' -e '/^ base_temp/r ./damp_real' \
2817 -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
2818 -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 200/g' \
2819 -e 's/ run_days *= [0-9][0-9]*/ run_days = 0/g' \
2820 -e 's/ run_hours *= [0-9][0-9]*/ run_hours = 0/g' \
2821 -e 's/ run_minutes *= [0-9][0-9]*/ run_minutes = 0/g' \
2822 -e '/^ &fdda/r fdda_opt' \
2823 -e '/^ debug_level/r fdda_time' \
2825 namelist.input.temp
>! namelist.input
2827 # The chem run has its own namelist, due to special input files (io_form not tested for chem)
2829 else if ( $CHEM == TRUE
) then
2830 if ( ( $KPP == TRUE
) && ( $phys_option >= 3 ) ) then
2831 sed -e '/dyn_opt/d' \
2832 -e 's/^ chem_opt *= [0-9][0-9]*/ chem_opt = '${CHEM_OPT}'/' \
2833 namelist.input.chem_test_
${phys_option} >! namelist.input
2835 sed -e '/dyn_opt/d' \
2836 namelist.input.chem_test_
${phys_option} >! namelist.input
2839 if ( -e met_em.d01.
${filetag} ) then
2842 if ( ${phys_option} <= 3 ) then
2850 # WRF output quilt servers are only tested for MPI configuration.
2851 # Currently, only one WRF output quilt server is used.
2853 if ( $QUILT == TRUE
) then
2854 if ( $compopt == $COMPOPTS[3] ) then
2855 # For now, test only one group of one output quilt servers.
2856 sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \
2857 -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \
2858 namelist.input
>! namelist.input.temp
2859 mv -f namelist.input.temp namelist.input
2860 echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled."
2861 echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
2865 /bin
/cp namelist.input
$TMPDIR/namelist.input.
$core.
${phys_option}.
$compopt
2866 #DAVE###################################################
2867 echo built namelist
$TMPDIR/namelist.input.
$core.
${phys_option}.
$compopt
2868 cat $TMPDIR/namelist.input.
$core.
${phys_option}.
$compopt
2869 echo need
history interval to be
30
2872 #DAVE###################################################
2873 #DAVE###################################################
2874 echo skipped link of data files
, we push them elsewhere
2878 #DAVE###################################################
2880 # If this is the serial code, generate the IC and BC. The real.exe program is not
2881 # parallelized, so the data is generated and saved for the rest of the parallel tests.
2882 # This data is necessarily updated for each of the physics tests.
2884 if ( $compopt == $COMPOPTS[1] ) then
2886 # Zap any old input data laying around.
2888 rm wrfinput_d01
>& /dev
/null
2889 rm wrfbdy_d01
>& /dev
/null
2891 if ( $NESTED == TRUE
) then
2892 setenv OMP_NUM_THREADS
1
2893 $SERIALRUNCOMMAND ..
/..
/main
/real_
${core}.exe.1 >! print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt}
2894 else if ( $NESTED != TRUE
) then
2895 ..
/..
/main
/real_
${core}.exe.1 >! print.out.real_${core}_Phys=${phys_option}_Parallel=${compopt}
2897 #DAVE###################################################
2901 #DAVE###################################################
2903 grep "SUCCESS COMPLETE" print.out.real_
${core}_Phys=${phys_option}_Parallel=${compopt} >& /dev
/null
2904 set success
= $status
2906 # Did making the IC BC files work?
2908 if ( $GLOBAL == FALSE
) then
2909 if ( ( -e wrfinput_d01
) && ( -e wrfbdy_d01
) && ( $success == 0 ) ) then
2910 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
2911 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2913 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2914 $MAIL -s "WRF FAIL making IC/BC $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2915 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 4 )
2916 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2918 else if ( $GLOBAL == TRUE
) then
2919 if ( ( -e wrfinput_d01
) && ( $success == 0 ) ) then
2920 echo "SUMMARY generate IC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
2921 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2923 echo "SUMMARY generate IC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
2924 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
2925 $MAIL -s "WRF FAIL making IC $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
2926 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 41 )
2929 #DAVE###################################################
2930 echo IC BC must be OK
2932 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
2933 ncdump
-v Times wrfb
* |
tail -20
2937 #DAVE###################################################
2940 # Run the forecast for this core, physics package and parallel option
2942 rm $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$compopt >& /dev
/null
2944 # The chem run has its own set of namelists, due to special input files.
2946 if ( $CHEM == TRUE
) then
2948 # WRF output quilt servers are only tested for MPI configuration.
2949 # Currently, only one WRF output quilt server is used.
2951 if ( $QUILT == TRUE
) then
2952 if ( $compopt == $COMPOPTS[3] ) then
2953 # For now, test only one group of one output quilt servers.
2954 sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \
2955 -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \
2956 namelist.input
>! namelist.input.temp
2957 mv -f namelist.input.temp namelist.input
2958 echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled."
2959 echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
2964 if ( $compopt == $COMPOPTS[1] ) then
2965 setenv OMP_NUM_THREADS
1
2966 if ( $NESTED == TRUE
) then
2967 $SERIALRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}
2968 else if ( $NESTED != TRUE
) then
2969 ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}
2971 else if ( $compopt == $COMPOPTS[2] ) then
2972 setenv OMP_NUM_THREADS
$OPENMP
2973 if ( $NESTED == TRUE
) then
2974 $OMPRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}
2975 else if ( $NESTED != TRUE
) then
2976 ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Phys=${phys_option}_Parallel=${compopt}
2978 else if ( $compopt == $COMPOPTS[3] ) then
2979 setenv OMP_NUM_THREADS
1
2980 $MPIRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.
$compopt $MPIRUNCOMMANDPOST
2981 mv rsl.error
.0000 print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}
2983 #DAVE###################################################
2984 echo ran wrf fcst compopt
= $compopt
2987 #DAVE###################################################
2989 grep "SUCCESS COMPLETE" print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}
2990 set success
= $status
2992 # Did making the forecast work, by that, we mean "is there an output file created", and "are there 2 times periods".
2994 if ( ( -e wrfout_d01_
${filetag} ) && ( $success == 0 ) ) then
2995 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
2996 ncdump
-h wrfout_d01_
${filetag} |
grep Time |
grep UNLIMITED |
grep currently |
grep -q 2
2999 if ( `uname` == AIX
) then
3000 ncdump wrfout_d01_
${filetag} |
grep NaN
>& /dev
/null
3001 set found_nans
= $status
3002 else if ( `uname` == OSF1
) then
3003 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
3004 # set found_nans = $status
3005 else if ( `uname` == Linux
) then
3006 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
3007 set found_nans
= $status
3009 if ( $found_nans == 0 ) then
3014 else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1
) then
3015 # set joe_times = `../../external/io_grib1/wgrib.exe -s -4yr wrfout_d01_${filetag} | grep -v ":anl:" | wc -l`
3016 # if ( $joe_times >= 100 ) then
3017 set joe_times
= `../../external/io_grib1/wgrib.exe -s -4yr wrfout_d01_${filetag} | grep "UGRD:10 m" | wc -l`
3018 if ( $joe_times == 2 ) then
3024 if ( $ok == 0 ) then
3025 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3026 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3028 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3029 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3030 $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3031 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 5 )
3034 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3035 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3036 $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3037 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 6 )
3039 #DAVE###################################################
3040 echo success or failure of fcst
3041 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
3042 ncdump
-v Times wrfout_d01_
${filetag} |
tail -20
3046 #DAVE###################################################
3048 # We have to save this output file for our biggy comparison after all of the
3049 # parallel options have been considered.
3051 mv wrfout_d01_
${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.
$compopt
3053 # To save space, we move the executables after we are finished with them.
3055 if ( $phys_option == $PHYSOPTS[${#PHYSOPTS}] ) then
3056 mv ..
/..
/main
/wrf_
${core}.exe.
$compopt $TMPDIR/wrf_
${core}.exe.
$compopt
3061 BYPASS_COMP_LOOP_REAL
:
3065 else if ( $core == nmm_real
) then
3066 #DAVE###################################################
3070 #DAVE###################################################
3072 set compopt
= $COMPOPTS[3] # ! parallel only
3073 set filetag
= 2008-12-02_12:00:00
3077 #DAVE###################################################
3079 echo $filetag $phys_option
3082 #DAVE###################################################
3084 # Build NMM namelist
3086 cp ${CUR_DIR}/io_format io_format
3087 sed -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
3088 namelist.input.regtest
>! namelist.input.temp
3090 # A fairly short forecast, 10 time steps
3092 sed -e 's/^ run_days *= *[0-9]*/ run_days = 0 /' \
3093 -e 's/^ run_hours *= *[0-9]*/ run_hours = 0 /' \
3094 -e 's/^ run_seconds *= *[0-9]*/ run_seconds = 900 /' \
3095 -e 's/^ history_interval *= *[0-9][0-9]*/ history_interval = 15 /' \
3096 -e 's/^ frames_per_outfile *= [0-9]*/ frames_per_outfile = 200/g' \
3097 namelist.input.temp
>! namelist.input
3099 #DAVE###################################################
3100 echo did
cp of namelist
3101 ls -ls namelist.input
3105 #DAVE###################################################
3107 # Generate IC/BC for NMM run
3109 set RUNCOMMAND
= `echo $MPIRUNCOMMAND | sed "s/$Num_Procs/1/"`
3111 # Zap any old input data laying around.
3113 rm wrfinput_d01
>& /dev
/null
3114 rm wrfbdy_d01
>& /dev
/null
3116 $RUNCOMMAND ..
/..
/main
/real_
${core}.exe.$COMPOPTS[3] >! print.out.real_${core}_Phys=${phys_option}_Parallel
=$COMPOPTS[3]
3117 #DAVE###################################################
3121 #DAVE###################################################
3123 mv rsl.out
.0000 print.out.real_
${core}_Phys=${phys_option}_Parallel=${compopt}
3124 grep "SUCCESS COMPLETE" print.out.real_
${core}_Phys=${phys_option}_Parallel=${compopt} >& /dev
/null
3125 set success
= $status
3127 # Did making the IC BC files work?
3129 if ( ( -e wrfinput_d01
) && ( -e wrfbdy_d01
) && ( $success == 0 ) ) then
3130 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3131 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3133 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3134 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3135 $MAIL -s "WRF FAIL making IC/BC $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3136 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 4 )
3138 #DAVE###################################################
3139 echo IC BC must be OK
3140 ls -lsL wrfinput
* wrfb
*
3141 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
3142 ncdump
-v Times wrfb
* |
tail -20
3146 #DAVE###################################################
3148 # Run on 1 and then on Num_Procs processors
3150 foreach n
( 1 $Num_Procs )
3151 #DAVE###################################################
3152 echo running nmm on
$n procs
3155 #DAVE###################################################
3157 if ( ( $n != 1 ) && ( $QUILT != TRUE
) ) then
3158 @ nmm_proc
= $Num_Procs
3159 cat >! nproc_xy
<< EOF
3163 sed -e '/^ numtiles/r nproc_xy' namelist.input
>! file.foo
3164 mv file.foo namelist.input
3165 else if ( ( $n != 1 ) && ( $QUILT == TRUE
) ) then
3166 @ nmm_proc
= $Num_Procs - 1
3167 cat >! nproc_xy
<< EOF
3171 sed -e '/^ numtiles/r nproc_xy' namelist.input
>! file.foo
3172 mv file.foo namelist.input
3175 if ( `uname` == AIX
) then
3176 set RUNCOMMAND
= $MPIRUNCOMMAND
3178 set RUNCOMMAND
= `echo $MPIRUNCOMMAND | sed "s/$Num_Procs/$n/"`
3181 # WRF output quilt servers are only tested for MPI configuration.
3182 # Currently, only one WRF output quilt server is used.
3184 if ( ( $QUILT == TRUE
) && ( $n == $Num_Procs ) ) then
3185 if ( $compopt == $COMPOPTS[3] ) then
3186 # For now, test only one group of one output quilt servers.
3187 sed -e 's/ nio_tasks_per_group *= *[0-9]*/ nio_tasks_per_group = 1/g' \
3188 -e 's/ nio_groups *= *[0-9]*/ nio_groups = 1/g' \
3189 namelist.input
>! namelist.input.temp
3190 mv -f namelist.input.temp namelist.input
3191 echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled."
3192 echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
3196 # NMM can fail on spurious fp exceptions that don't affect soln. Retry if necessary.
3199 while ( $tries < 2 )
3200 #DAVE###################################################
3201 echo try attempt
$tries allowed to be
less than
2
3204 #DAVE###################################################
3205 @ tries
= $tries + 1
3206 $RUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.
$compopt $MPIRUNCOMMANDPOST
3207 mv rsl.error
.0000 print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}_${n}p
3208 grep "SUCCESS COMPLETE" print.out.wrf_
${core}_Phys=${phys_option}_Parallel=${compopt}_${n}p
3209 set success
= $status
3211 if ( ( -e wrfout_d01_
${filetag} ) && ( $success == 0 ) ) then
3212 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
3213 ncdump
-h wrfout_d01_
${filetag} |
grep Time |
grep UNLIMITED |
grep currently |
grep -q 2
3216 if ( `uname` == AIX
) then
3217 ncdump wrfout_d01_
${filetag} |
grep NaN
>& /dev
/null
3218 set found_nans
= $status
3219 else if ( `uname` == OSF1
) then
3220 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
3221 # set found_nans = $status
3222 else if ( `uname` == Linux
) then
3223 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
3224 set found_nans
= $status
3226 if ( $found_nans == 0 ) then
3231 else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1
) then
3232 ..
/..
/external
/io_grib
1/wgrib.exe
-s -4yr wrfout_d01_
${filetag} |
grep "UGRD:10 m above gnd:3600 sec fcst"
3235 if ( $ok == 0 ) then
3236 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3237 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3238 set tries
=2 # success, bail from loop
3240 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3241 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3242 $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3243 if ( if ( $KEEP_ON_RUNNING == FALSE
) && ( $tries == 2 ) )exit ( 5 )
3246 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3247 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3248 $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3249 if ( ( $KEEP_ON_RUNNING == FALSE
) && ( $tries == 2 ) ) exit ( 6 )
3251 mv wrfout_d01_
${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.${compopt}_${n}p
3252 #DAVE###################################################
3254 ls -ls $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.${compopt}_${n}p
3257 #DAVE###################################################
3265 #DAVE###################################################
3266 echo doing ideal runs
3269 #DAVE###################################################
3270 # The ideal cases have different physics tests than the real cases. If this is
3271 # more that the total number of ideal physics experiments that we were led to
3272 # believe would exist, jump to the end of the physics loop.
3274 if ( $phys_option > $Max_Ideal_Physics_Options ) then
3275 goto BOTTOM_OF_PHYSICS_LOOP
3278 set filetag
=$filetag_ideal
3280 foreach compopt
( $COMPOPTS )
3281 #DAVE###################################################
3282 echo doing compopt
= $compopt
3283 echo filetag
= $filetag
3286 #DAVE###################################################
3289 # We sometimes are interested in bypassing the OpenMP option.
3291 if ( $compopt == $COMPOPTS[2] ) then
3292 if ( $ZAP_OPENMP == TRUE
) then
3293 goto BYPASS_COMP_LOOP_IDEAL
3299 if ( ! -e namelist.input.template
) cp namelist.input namelist.input.template
3301 # Create the correct namelist.input file.
3303 cp ${CUR_DIR}/dom_ideal dom_ideal
3304 if ( $core == em_quarter_ss
) then
3305 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}a phys_tke
3306 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}b phys_mp
3307 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}c phys_nh
3308 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}d phys_nest
3309 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}e phys_bc
3310 cp ${CUR_DIR}/phys_quarter_ss_
${phys_option}f phys_sfclay
3311 else if ( $core == em_b_wave
) then
3312 cp ${CUR_DIR}/phys_b_wave_
${phys_option}a phys_tke
3313 cp ${CUR_DIR}/phys_b_wave_
${phys_option}b phys_mp
3314 cp ${CUR_DIR}/phys_b_wave_
${phys_option}c phys_nh
3315 cp ${CUR_DIR}/phys_b_wave_
${phys_option}d phys_nest
3318 cp ${CUR_DIR}/io_format io_format
3319 if ( $NESTED == TRUE
) then
3320 if ( $core == em_quarter_ss
) then
3321 sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \
3322 -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 1/g' \
3323 -e 's/ run_seconds *= *[0-9][0-9]*/ run_seconds = 0/g' \
3324 -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 1/g' \
3325 -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \
3326 -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \
3327 -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
3328 -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \
3329 -e '/^ sf_sfclay_physics/d' -e '/^ radt/r ./phys_sfclay' \
3330 -e '/^ moist_adv_opt/,/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \
3331 -e '/^ periodic_x /,/^ open_ye/d' \
3332 -e '/^ &bdy_control/r ./phys_bc' \
3333 -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \
3334 .
/namelist.input.template
>! namelist.input
3335 else if ( $core == em_b_wave
) then
3336 sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \
3337 -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 20/g' \
3338 -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 20/g' \
3339 -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \
3340 -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \
3341 -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
3342 -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \
3343 -e '/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \
3344 -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \
3345 .
/namelist.input.template
>! namelist.input
3347 else if ( $NESTED != TRUE
) then
3348 if ( $core == em_quarter_ss
) then
3349 sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \
3350 -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 2/g' \
3351 -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 2/g' \
3352 -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \
3353 -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \
3354 -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
3355 -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \
3356 -e '/^ sf_sfclay_physics/d' -e '/^ radt/r ./phys_sfclay' \
3357 -e '/^ moist_adv_opt/,/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \
3358 -e '/^ periodic_x/d' -e '/^ open_xs/d' -e '/^ open_xe/d' \
3359 -e '/^ periodic_y/d' -e '/^ open_ys/d' -e '/^ open_ye/d' \
3360 -e '/^ &bdy_control/r ./phys_bc' \
3361 -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \
3362 .
/namelist.input.template
>! namelist.input
3363 else if ( $core == em_b_wave
) then
3364 sed -e 's/ run_days *= *[0-9][0-9]*/ run_days = 00/g' \
3365 -e 's/ run_minutes *= *[0-9][0-9]*/ run_minutes = 100/g' \
3366 -e 's/ history_interval *= [0-9][0-9]*/ history_interval = 100/g' \
3367 -e 's/ frames_per_outfile *= [0-9][0-9]*/ frames_per_outfile = 100/g' \
3368 -e '/^ diff_opt/d' -e '/^ km_opt/d' -e '/^ damp_opt/d' -e '/^ rk_ord/r ./phys_tke' \
3369 -e '/^ io_form_history /,/^ io_form_boundary/d' -e '/^ restart_interval/r ./io_format' \
3370 -e '/^ mp_physics/d' -e '/^ &physics/r ./phys_mp' \
3371 -e '/^ non_hydrostatic/d' -e '/^ v_sca_adv_order/r ./phys_nh' \
3372 -e '/^ max_dom/d' -e '/^ time_step_fract_den/r ./dom_ideal' \
3373 .
/namelist.input.template
>! namelist.input
3377 # WRF output quilt servers are only tested for MPI configuration.
3378 # Currently, only one WRF output quilt server is used.
3380 if ( $QUILT == TRUE
) then
3381 if ( $compopt == $COMPOPTS[3] ) then
3382 # For now, test only one group of one output quilt servers.
3383 sed -e 's/ nio_tasks_per_group *= *[0-9][0-9]*/ nio_tasks_per_group = 1/g' \
3384 -e 's/ nio_groups *= *[0-9][0-9]*/ nio_groups = 1/g' \
3385 namelist.input
>! namelist.input.temp
3386 mv -f namelist.input.temp namelist.input
3387 echo "Building namelist.input.$core.${phys_option}.$compopt with one I/O quilt server enabled."
3388 echo "NOTE one I/O quilt server enabled for $core physics $phys_option parallel $compopt..." >>! ${DEF_DIR}/wrftest.output
3392 /bin
/cp namelist.input
$TMPDIR/namelist.input.
$core.
${phys_option}.
$compopt
3393 #DAVE###################################################
3395 ls -ls namelist.input
3398 #DAVE###################################################
3400 # If this is the serial code, generate the IC and BC. The ideal.exe program is not
3401 # parallelized, so the data is generated and saved for the rest of the parallel tests.
3403 if ( $compopt == $COMPOPTS[1] ) then
3405 # Zap any old input data laying around.
3407 rm wrfinput_d01
>& /dev
/null
3408 rm wrfbdy_d01
>& /dev
/null
3410 ..
/..
/main
/ideal_
${core}.exe.1 >! print.out.ideal_${core}_Parallel=${compopt}
3411 #DAVE###################################################
3416 #DAVE###################################################
3418 grep "SUCCESS COMPLETE" print.out.ideal_
${core}_Parallel
=${compopt} >& /dev
/null
3419 set success
= $status
3421 # Did making the IC BC files work?
3423 if ( ( -e wrfinput_d01
) && ( $success == 0 ) ) then
3424 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3425 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3427 echo "SUMMARY generate IC/BC for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3428 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3429 $MAIL -s "WRF FAIL making IC/BC $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3430 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 7 )
3434 # Run the forecast for this core and parallel option
3436 rm $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$compopt >& /dev
/null
3438 if ( $compopt == $COMPOPTS[1] ) then
3439 setenv OMP_NUM_THREADS
1
3440 if ( $NESTED == TRUE
) then
3441 $SERIALRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}
3442 else if ( $NESTED != TRUE
) then
3443 ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}
3445 else if ( $compopt == $COMPOPTS[2] ) then
3446 setenv OMP_NUM_THREADS
$OPENMP
3447 if ( $NESTED == TRUE
) then
3448 $OMPRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}
3449 else if ( $NESTED != TRUE
) then
3450 ..
/..
/main
/wrf_
${core}.exe.$compopt >! print.out.wrf_${core}_Parallel=${compopt}
3452 else if ( $compopt == $COMPOPTS[3] ) then
3453 setenv OMP_NUM_THREADS
1
3454 $MPIRUNCOMMAND ..
/..
/main
/wrf_
${core}.exe.
$compopt $MPIRUNCOMMANDPOST
3455 mv rsl.error
.0000 print.out.wrf_
${core}_Parallel
=${compopt}
3457 #DAVE###################################################
3461 #DAVE###################################################
3463 grep "SUCCESS COMPLETE" print.out.wrf_
${core}_Parallel
=${compopt}
3464 set success
= $status
3466 # Did making the forecast work, by that, we mean "is there an output file created?"
3468 if ( ( -e wrfout_d01_
${filetag} ) && ( $success == 0 ) ) then
3469 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
3470 ncdump
-h wrfout_d01_
${filetag} |
grep Time |
grep UNLIMITED |
grep currently |
grep -q 2
3473 if ( `uname` == AIX
) then
3474 ncdump wrfout_d01_
${filetag} |
grep NaN
>& /dev
/null
3475 set found_nans
= $status
3476 else if ( `uname` == OSF1
) then
3477 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
3478 # set found_nans = $status
3479 else if ( `uname` == Linux
) then
3480 ncdump wrfout_d01_
${filetag} |
grep nan
>& /dev
/null
3481 set found_nans
= $status
3483 if ( $found_nans == 0 ) then
3488 else if ( $IO_FORM_NAME[$IO_FORM] == io_grib1
) then
3489 # set joe_times = `../../external/io_grib1/wgrib.exe -s -4yr wrfout_d01_${filetag} | grep -v ":anl:" | wc -l`
3490 # if ( $joe_times >= 100 ) then
3491 set joe_times
= `../../external/io_grib1/wgrib.exe -s -4yr wrfout_d01_${filetag} | grep "UGRD:10 m" | wc -l`
3492 if ( $joe_times == 2 ) then
3498 if ( $ok == 0 ) then
3499 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3500 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3502 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3503 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3504 $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3505 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 8 )
3508 echo "SUMMARY generate FCST for $core physics $phys_option parallel $compopt $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3509 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3510 $MAIL -s "WRF FAIL FCST $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3511 if ( $KEEP_ON_RUNNING == FALSE
) exit ( 9 )
3514 # We have to save this output file for our biggy comparison after all of the
3515 # parallel options have been considered.
3517 mv wrfout_d01_
${filetag} $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.
$compopt
3519 # To save space, we move the executables after we are finished with them.
3521 if ( $phys_option == $Max_Ideal_Physics_Options ) then
3522 mv ..
/..
/main
/wrf_
${core}.exe.
$compopt $TMPDIR/wrf_
${core}.exe.
$compopt
3524 #DAVE###################################################
3525 echo fcst was a success
3526 ls -ls $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$compopt
3527 if ( $IO_FORM_NAME[$IO_FORM] == io_netcdf
) then
3528 ncdump
-v Times
$TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$compopt |
tail -20
3532 #DAVE###################################################
3536 BYPASS_COMP_LOOP_IDEAL
:
3542 # OK, once more, we gotta check if this is a BIT4BIT run. If so then there
3543 # are a number of comparisons to do. If this is a an OPTIMIZED run, then the
3544 # comparisons will fail the bit-wise comparisons.
3546 if ( $REG_TYPE == BIT4BIT
) then
3548 if ( $core == nmm_real
) then
3550 pushd ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3551 set DIFFWRF
= ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
3553 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3]_1p
) && \
3554 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p
) ) then
3555 set foo1
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_1p `)
3556 set foo2
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p `)
3557 set size1
= $foo1[6]
3558 set size2
= $foo2[6]
3559 if ( $size1 == $size2 ) then
3560 set RIGHT_SIZE
= TRUE
3562 set RIGHT_SIZE
= FALSE
3565 set RIGHT_SIZE
= FALSE
3568 # 1p vs Num_Procs MPI
3570 rm fort
.88 fort
.98 >& /dev
/null
3571 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3]_1p
) && \
3572 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p
) && \
3573 ( $RIGHT_SIZE == TRUE
) ) then
3574 $DIFFWRF $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3]_1p \
3575 $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.$COMPOPTS[3]_${Num_Procs}p
>& /dev
/null
3577 touch fort
.88 fort
.98
3579 if ( ! -e fort
.88 ) then
3580 echo "SUMMARY 1 vs $Num_Procs MPI for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3581 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3583 echo "SUMMARY 1 vs $Num_Procs MPI for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3584 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3589 else if ( ${#COMPOPTS} != 1 ) then
3591 # If there is only a single parallel option, then we are just trying to
3592 # build the serial code. That implies no comparisons are needed.
3594 # All of the forecasts for this set of physics and core have been
3595 # generated. We now compare the WRF model output files to see
3596 # if they are S^2D^2.
3598 pushd ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3599 set DIFFWRF
= ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
3601 # Are we skipping the OpenMP runs?
3603 if ( $ZAP_OPENMP == TRUE
) then
3604 goto BYPASS_OPENMP_SUMMARY1
3607 # Are the files the same size? If not, then only the initial times
3608 # will be compared. That means, on a failure to run a forecast, the
3609 # diffwrf will give a pass. We need to root out this evil.
3611 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] ) && \
3612 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[2] ) ) then
3613 set foo1
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] `)
3614 set foo2
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[2] `)
3615 set size1
= $foo1[6]
3616 set size2
= $foo2[6]
3617 if ( $size1 == $size2 ) then
3618 set RIGHT_SIZE_OMP
= TRUE
3620 set RIGHT_SIZE_OMP
= FALSE
3623 set RIGHT_SIZE_OMP
= FALSE
3626 BYPASS_OPENMP_SUMMARY1
:
3628 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] ) && \
3629 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3] ) ) then
3630 set foo1
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] `)
3631 set foo3
= ( ` \ls -ls $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] `)
3632 set size1
= $foo1[6]
3633 set size3
= $foo3[6]
3634 if ( $size1 == $size3 ) then
3635 set RIGHT_SIZE_MPI
= TRUE
3637 set RIGHT_SIZE_MPI
= FALSE
3640 set RIGHT_SIZE_MPI
= FALSE
3643 ! We just check to see
if the files have two
times worth of data
in them.
3644 ! We might be able to get rid of this
test later. Dec
2009.
3646 set times1
= ( ` ncdump -h $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[1] | grep Time | grep UNLIMITED | grep currently | cut -d"(" -f 2 | cut -d" " -f1 `)
3647 set times3
= ( ` ncdump -h $TMPDIR/wrfout_d01_${filetag}.${core}.${phys_option}.$COMPOPTS[3] | grep Time | grep UNLIMITED | grep currently | cut -d"(" -f 2 | cut -d" " -f1 `)
3648 if ( ( $RIGHT_SIZE_MPI != TRUE
) && ( $times1 == 2 ) && ( $times3 == 2 ) ) then
3649 echo "--- RIGHT_SIZE_MPI false ---" >>! ${DEF_DIR}/wrftest.output
3650 set RIGHT_SIZE_MPI
= TRUE
3653 # Are we skipping the OpenMP runs?
3655 if ( $ZAP_OPENMP == TRUE
) then
3656 goto BYPASS_OPENMP_SUMMARY2
3661 rm fort
.88 fort
.98 >& /dev
/null
3662 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] ) && \
3663 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[2] ) && \
3664 ( $RIGHT_SIZE_OMP == TRUE
) ) then
3665 $DIFFWRF $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] \
3666 $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[2] >& /dev
/null
3668 touch fort
.88 fort
.98
3670 if ( ! -e fort
.88 ) then
3671 echo "SUMMARY serial vs OMP for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3672 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3674 echo "SUMMARY serial vs OMP for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3675 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3678 BYPASS_OPENMP_SUMMARY2
:
3682 rm fort
.88 fort
.98 >& /dev
/null
3683 if ( ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] ) && \
3684 ( -e $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3] ) && \
3685 ( $RIGHT_SIZE_MPI == TRUE
) ) then
3686 $DIFFWRF $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[1] \
3687 $TMPDIR/wrfout_d01_
${filetag}.${core}.${phys_option}.
$COMPOPTS[3] >& /dev
/null
3689 touch fort
.88 fort
.98
3691 if ( ! -e fort
.88 ) then
3692 echo "SUMMARY serial vs MPI for $core physics $phys_option $esmf_lib_str PASS" >>! ${DEF_DIR}/wrftest.output
3693 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3695 echo "SUMMARY serial vs MPI for $core physics $phys_option $esmf_lib_str FAIL" >>! ${DEF_DIR}/wrftest.output
3696 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3703 # Generate and archive baseline or compare against baseline
3705 if ( $core != nmm_real
) then
3706 if ( $GENERATE_BASELINE != FALSE
) then
3707 if ( ! -d $GENERATE_BASELINE ) then
3708 echo "ERROR: Baseline directory ${GENERATE_BASELINE} does not exist" >>! \
3709 ${DEF_DIR}/wrftest.output
3712 # Archive serial output file to baseline
3713 pushd ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3714 set basefilenm
= wrfout_d01_
${filetag}.${core}.${phys_option}
3715 set basefile
= ${GENERATE_BASELINE}/${basefilenm}
3716 set outfile
= $TMPDIR/${basefilenm}.
$COMPOPTS[1]
3717 if ( -e $outfile ) then
3718 cp $outfile $basefile || \
3719 ( echo "ERROR: cannot copy ${outfile} to ${basefile}" >>! \
3720 ${DEF_DIR}/wrftest.output
; exit 10 )
3722 echo "ERROR: Cannot archive baseline, file $outfile does not exist" >>! \
3723 ${DEF_DIR}/wrftest.output
3724 echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option FAIL" >>! \
3725 ${DEF_DIR}/wrftest.output
3726 echo "-------------------------------------------------------------" >> \
3727 ${DEF_DIR}/wrftest.output
3730 echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option PASS" >>! \
3731 ${DEF_DIR}/wrftest.output
3732 echo "-------------------------------------------------------------" >> \
3733 ${DEF_DIR}/wrftest.output
3737 if ( $COMPARE_BASELINE != FALSE
) then
3738 if ( ! -d $COMPARE_BASELINE ) then
3739 echo "${0}: ERROR:: Baseline directory ${COMPARE_BASELINE} does not exist" >>! \
3740 ${DEF_DIR}/wrftest.output
3743 # Compare against baseline output file
3744 set basefilenm
= wrfout_d01_
${filetag}.${core}.${phys_option}
3745 set basefile
= ${COMPARE_BASELINE}/${basefilenm}
3746 set DIFFWRF
= ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
3747 set testdir
= ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3749 foreach compopt
( $COMPOPTS )
3750 set cmpfile
= $TMPDIR/${basefilenm}.
$compopt
3751 rm fort
.88 fort
.98 >& /dev
/null
3752 if ( ( -e ${basefile} ) && ( -e ${cmpfile} ) ) then
3753 # Are the files the same size? If not, then only the initial times
3754 # will be compared. That means, on a failure to run a forecast, the
3755 # diffwrf will give a pass. We need to root out this evil.
3756 set foob
= ( ` \ls -ls ${basefile} `)
3757 set fooc
= ( ` \ls -ls ${cmpfile} `)
3758 set sizeb
= $foob[6]
3759 set sizec
= $fooc[6]
3760 if ( $sizeb == $sizec ) then
3761 $DIFFWRF ${basefile} ${cmpfile} >& /dev
/null
3762 if ( -e fort
.88 ) then
3763 echo "FAIL: Baseline comparison, file ${cmpfile} did not match ${basefile} according to diffwrf" >>! \
3764 ${DEF_DIR}/wrftest.output
3767 touch fort
.88 fort
.98
3768 echo "FAIL: Baseline comparison, files ${cmpfile} and ${basefile} have different sizes" >>! \
3769 ${DEF_DIR}/wrftest.output
3772 echo "FAIL: Baseline comparison, either ${cmpfile} or ${basefile} does not exist" >>! \
3773 ${DEF_DIR}/wrftest.output
3774 touch fort
.88 fort
.98
3776 if ( ! -e fort
.88 ) then
3777 echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str PASS" >>! \
3778 ${DEF_DIR}/wrftest.output
3779 echo "-------------------------------------------------------------" >> \
3780 ${DEF_DIR}/wrftest.output
3782 echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str FAIL" >>! \
3783 ${DEF_DIR}/wrftest.output
3784 echo "-------------------------------------------------------------" >> \
3785 ${DEF_DIR}/wrftest.output
3791 else if ( $core == nmm_real
) then
3792 if ( $GENERATE_BASELINE != FALSE
) then
3793 if ( ! -d $GENERATE_BASELINE ) then
3794 echo "ERROR: Baseline directory ${GENERATE_BASELINE} does not exist" >>! \
3795 ${DEF_DIR}/wrftest.output
3798 # Archive serial output file to baseline
3799 pushd ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3800 set basefilenm
= wrfout_d01_
${filetag}.${core}.${phys_option}
3801 set basefile
= ${GENERATE_BASELINE}/${basefilenm}
3802 set outfile
= $TMPDIR/${basefilenm}.
$COMPOPTS[3]_1p
3803 if ( -e $outfile ) then
3804 cp $outfile $basefile || \
3805 ( echo "ERROR: cannot copy ${outfile} to ${basefile}" >>! \
3806 ${DEF_DIR}/wrftest.output
; exit 10 )
3808 echo "ERROR: Cannot archive baseline, file $outfile does not exist" >>! \
3809 ${DEF_DIR}/wrftest.output
3810 echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option FAIL" >>! \
3811 ${DEF_DIR}/wrftest.output
3812 echo "-------------------------------------------------------------" >> \
3813 ${DEF_DIR}/wrftest.output
3816 echo "SUMMARY baseline archived in ${GENERATE_BASELINE} for $core physics $phys_option PASS" >>! \
3817 ${DEF_DIR}/wrftest.output
3818 echo "-------------------------------------------------------------" >> \
3819 ${DEF_DIR}/wrftest.output
3823 if ( $COMPARE_BASELINE != FALSE
) then
3824 if ( ! -d $COMPARE_BASELINE ) then
3825 echo "${0}: ERROR:: Baseline directory ${COMPARE_BASELINE} does not exist" >>! \
3826 ${DEF_DIR}/wrftest.output
3829 # Compare against baseline output file
3830 set basefilenm
= wrfout_d01_
${filetag}.${core}.${phys_option}
3831 set basefile
= ${COMPARE_BASELINE}/${basefilenm}
3832 set DIFFWRF
= ${DEF_DIR}/regression_test
/WRFV
3/external
/$IO_FORM_NAME[$IO_FORM]/diffwrf
3833 set testdir
= ${DEF_DIR}/regression_test
/WRFV
3/test
/$core
3835 set compopt
= $COMPOPTS[3]
3836 foreach proc
( 1p
4p
)
3837 set cmpfile
= $TMPDIR/${basefilenm}.${compopt}_${proc}
3838 rm fort
.88 fort
.98 >& /dev
/null
3839 if ( ( -e ${basefile} ) && ( -e ${cmpfile} ) ) then
3840 # Are the files the same size? If not, then only the initial times
3841 # will be compared. That means, on a failure to run a forecast, the
3842 # diffwrf will give a pass. We need to root out this evil.
3843 set foob
= ( ` \ls -ls ${basefile} `)
3844 set fooc
= ( ` \ls -ls ${cmpfile} `)
3845 set sizeb
= $foob[6]
3846 set sizec
= $fooc[6]
3847 if ( $sizeb == $sizec ) then
3848 $DIFFWRF ${basefile} ${cmpfile} >& /dev
/null
3849 if ( -e fort
.88 ) then
3850 echo "FAIL: Baseline comparison, file ${cmpfile} did not match ${basefile} according to diffwrf" >>! \
3851 ${DEF_DIR}/wrftest.output
3854 touch fort
.88 fort
.98
3855 echo "FAIL: Baseline comparison, files ${cmpfile} and ${basefile} have different sizes" >>! \
3856 ${DEF_DIR}/wrftest.output
3859 echo "FAIL: Baseline comparison, either ${cmpfile} or ${basefile} does not exist" >>! \
3860 ${DEF_DIR}/wrftest.output
3861 touch fort
.88 fort
.98
3863 if ( ! -e fort
.88 ) then
3864 echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str PASS" >>! \
3865 ${DEF_DIR}/wrftest.output
3866 echo "-------------------------------------------------------------" >> \
3867 ${DEF_DIR}/wrftest.output
3869 echo "SUMMARY compare vs baseline ${COMPARE_BASELINE} for $core physics $phys_option compopt $compopt $esmf_lib_str FAIL" >>! \
3870 ${DEF_DIR}/wrftest.output
3871 echo "-------------------------------------------------------------" >> \
3872 ${DEF_DIR}/wrftest.output
3878 goto ALL_SHE_WROTE_FOR_NMM
3880 # End of generate and archive baseline or compare against baseline
3884 BOTTOM_OF_PHYSICS_LOOP
:
3888 ALL_SHE_WROTE_FOR_NMM
:
3890 echo "-------------------------------------------------------------" >> ${DEF_DIR}/wrftest.output
3899 # How long did this take.
3901 set end
= ( `date` )
3902 echo "Start WRF Regression: $start " >> ${DEF_DIR}/wrftest.output
3903 echo "End WRF Regression: $end " >> ${DEF_DIR}/wrftest.output
3905 # We have done all of the tests, and placed the PASS FAIL labels in the
3906 # output file. If there are any FAIL messages, we are in trouble.
3908 grep FAIL
${DEF_DIR}/wrftest.output
3911 # Send email of the status.
3913 if ( $ok == 0 ) then
3914 $MAIL -s "REGRESSION FAILURE $ARCH[1] ${WHERE_AM_I} " $FAIL_MAIL < ${DEF_DIR}/wrftest.output
3916 $MAIL -s "REGRESSION SUCCESS $ARCH[1] ${WHERE_AM_I} " $GOOD_MAIL < ${DEF_DIR}/wrftest.output
3919 # Clean left up detritus
3923 rm -rf damp_
*eal
>& /dev
/null
3924 rm -rf dom_
*eal
>& /dev
/null
3925 rm -rf phys_real_
* >& /dev
/null
3926 rm -rf nest_real_
* >& /dev
/null
3927 rm -rf phys_quarter_
* >& /dev
/null
3928 rm -rf phys_b_wave_
* >& /dev
/null
3929 rm -rf version_info
>& /dev
/null
3930 rm -rf machfile
>& /dev
/null
3931 rm -rf fdda_real
* >& /dev
/null
3932 rm -rf time_real_
* >& /dev
/null
3933 rm -rf dyn_real_
* >& /dev
/null
3934 rm -rf damp_
* >& /dev
/null
3935 rm -rf io_format
>& /dev
/null