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