This repository was archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathregtest.csh
3935 lines (3507 loc) · 150 KB
/
regtest.csh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/csh
#BSUB -a poe # at NCAR: bluevista
#BSUB -R "span[ptile=32]" # how many tasks per node (up to 8)
#BSUB -n 4 # number of total tasks
#BSUB -o reg.out # output filename (%J to add job id)
#BSUB -e reg.err # error filename
#BSUB -J regtest1 # job name
#BSUB -q share # queue
#BSUB -W 6:00 # wallclock time
#BSUB -P 64000400
##BSUB -P 66770001
# This is a script to test the bit-for-bit reproducibility of
# the WRF model, when comparing single processor serial runs to
# OpenMP and MPI parallel runs. There are several regression tests
# that are performed. Failed comparisons get reported, but don't
# stop the script. Failed builds force an exit from the script.
setenv WRF_NMM_NEST 1
setenv HWRF 0
set WHERE_AM_I = `pwd`
if ( `uname` == AIX ) then
set USE_SPECIAL_XLF = TRUE
if ( $USE_SPECIAL_XLF == TRUE ) then
xlf -qversion
source ~gill/sourceme_modules
#module load xlf/12.01.0000.0005.091127
#module load xlf/12.01.0000.0005
module load xlf/84213
xlf -qversion
set VERSION = `xlf -qversion | grep AIX | cut -f2 -d, | cut -f2 -dV | cut -f1 -d.`
if ( $VERSION != 12 ) then
echo wrong xlf version $VERSION
exit
else
echo right xlf version $VERSION
endif
endif
set tdir = 1
if ( ! -d /ptmp/${USER}/${tdir} ) then
mkdir /ptmp/${USER}/${tdir}
endif
endif
# Do we keep running even when there are BAD failures?
set KEEP_ON_RUNNING = FALSE
set KEEP_ON_RUNNING = TRUE
# These need to be changed for your particular set of runs. This is
# where email gets sent.
if ( ( `uname` == AIX ) && ( ( `hostname | cut -c 1-2` != bs ) && \
( `hostname | cut -c 1-2` != bv ) && ( `hostname | cut -c 1-2` != be ) ) ) then
set FAIL_MAIL = ( ${user}@noaa.gov )
set GOOD_MAIL = ( ${user}@noaa.gov )
setenv MP_EAGER_LIMIT 65536
setenv MP_SHARED_MEMORY yes
setenv MP_SINGLE_THREAD yes
setenv MP_LABELIO yes
setenv MP_STDOUTMODE ordered
setenv OMP_NUM_THREADS 4
setenv XLSMPOPTS "parthds=4:spins=0:yields=0:stack=128000000:schedule=static"
setenv AIXTHREAD_SCOPE S
setenv AIXTHREAD_MNRATIO 1:1
setenv SPINLOOPTIME 1000
setenv YIELDLOOPTIME 1000
else
set FAIL_MAIL = ( ${user}@ucar.edu )
set GOOD_MAIL = ( ${user}@ucar.edu )
endif
unalias cd cp rm ls pushd popd mv
if ( ( `uname` == Linux ) || ( `uname` == Darwin ) ) alias banner echo
# Get the command line input
set thedate = -999
set thefile = "null"
set thedata = "null"
set clrm = 0 # compile local run mmmtmp, for using clsroom cluster and local disk
# If this is a batch job (NCAR's IBMs or FSL's Intel and Alpha), we need to muck with the "input"
# parameters a bit.
if ( ( `uname` == AIX ) || ( `hostname` == tempest ) || ( `hostname | cut -c 1-2` == ln ) ) then
set argv = ( -here )
set argv = ( -ftp )
set argv = ( -D today )
set argv = ( -env )
set WRFREGFILE = /mmm/users/gill/wrf.tar
if ( ( `uname` == AIX ) && ( ( `hostname | cut -c 1-2` != bs ) && \
( `hostname | cut -c 1-2` != bv ) && ( `hostname | cut -c 1-2` != be ) ) ) then
set argv = ( -f /nbns/meso/wx22tb/regression_tests/wrf.tar )
else
set argv = ( -f wrf.tar )
endif
endif
# Where is the input data located - for a few known NCAR/MMM machines.
if ( ( `hostname` == master ) || (`hostname | cut -c 1-4` == node ) ) then
set WRFREGDATAEM = /big/users/gill/WRF-data-EM
set WRFREGDATANMM = /big/users/gill/WRF-data-NMM
else if ( `hostname` == jacaranda ) then
set WRFREGDATAEM = /jacaranda/users/gill/WRF-data-EM
set WRFREGDATANMM = /jacaranda/users/gill/WRF-data-NMM
else if ( `hostname` == basswood ) then
set WRFREGDATAEM = /basswood/gill/Regression_Tests/WRF_regression_data/processed
set WRFREGDATANMM = /basswood/gill/Regression_Tests/WRF_regression_data/WRF-data-NMM_new
else if ( `hostname` == stink ) then
set WRFREGDATAEM = /stink/gill/Regression_Tests/WRF_regression_data/processed
set WRFREGDATANMM = /stink/gill/Regression_Tests/WRF_regression_data/WRF-data-NMM_new
else if ( `hostname` == cape ) then
set WRFREGDATAEM = /cape/users/michalak/WRF-data-EM
set WRFREGDATANMM = /cape/users/michalak/WRF-data-NMM
else if ( (`hostname | cut -c 1-6` == joshua ) || \
( `hostname` == maple ) || (`hostname | cut -c 1-7` == service ) ) then
set WRFREGDATAEM = /users/gill/WRF-data-EM
set WRFREGDATANMM = /users/gill/WRF-data-NMM
else if ( ( `hostname | cut -c 1-2` == bs ) || ( `hostname` == tempest ) || ( `hostname | cut -c 1-2` == ln ) || \
( `hostname | cut -c 1-2` == bv ) || ( `hostname | cut -c 1-2` == be ) ) then
set WRFREGDATAEM = /mmm/users/gill/WRF-data-EM
set WRFREGDATAEM = /mmm/users/gill/WRF_regression_data/processed
set WRFREGDATANMM = /mmm/users/gill/WRF-data-NMM_new
else if ( ( `uname` == AIX ) && ( ( `hostname | cut -c 1-2` != bs ) && \
( `hostname | cut -c 1-2` != bv ) && ( `hostname | cut -c 1-2` != be ) ) ) then
set WRFREGDATAEM = /nbns/meso/wx22tb/regression_tests/WRF-data-EM
set WRFREGDATANMM = /nbns/meso/wx22tb/regression_tests/WRF-data-NMM
else
if ( ( -d /users/gill/WRF-data-EM ) && ( -d /users/gill/WRF-data-NMM ) ) then
set WRFREGDATAEM = /users/gill/WRF-data-EM
set WRFREGDATANMM = /users/gill/WRF-data-NMM
else if ( ( -d /mmm/users/gill/WRF-data-EM ) && ( -d /mmm/users/gill/WRF-data-NMM ) ) then
set WRFREGDATAEM = /mmm/users/gill/WRF-data-EM
set WRFREGDATANMM = /mmm/users/gill/WRF-data-NMM
else
echo "stick the WRF em and nmm data somewhere, and then fill in the shell vars"
echo "inside this script, you NEED WRFREGDATAEM and WRFREGDATANMM set"
exit ( 1 )
endif
endif
#DAVE###################################################
echo DAVE em data is located at $WRFREGDATAEM
ls -ls $WRFREGDATAEM
echo DAVE nmm data is located at $WRFREGDATANMM
ls -ls $WRFREGDATANMM
banner 1
#set ans = "$<"
#DAVE###################################################
if ( $#argv == 0 ) then
echo "Please enter either a date for cvs checkout. ex regtest.csh -D date"
echo " or a file name containing WRF. ex regtest.csh -f tarfile"
echo " or the -ftp flag for the script to pick code off anon ftp"
exit ( 2 )
endif
set theargs = 0
foreach a ( $argv )
if ( "$a" == "-D" ) then
rsh -n maple.mmm.ucar.edu w >& /dev/null
if ( $status ) then
echo "Cannot execute a remote shell on maple.mmm.ucar.edu, where the"
echo "WRF code resides."
echo "Please check that it is up and that you have permission to rsh"
echo "to this host. (Create a .rhosts file)."
ping -c 1 maple.mmm.ucar.edu
exit 2
endif
setenv CVSROOT maple.mmm.ucar.edu:/data3/mp/wrfhelp/WRF
set acquire_from = "cvs"
set thedate = $argv[2]
endif
if ( "$a" == "-f" ) then
set thefile = $argv[2]
# Check for absolute path, if not, make it absolute
echo $thefile | grep '^/' > /dev/null
if ( $status != 0 ) set thefile = `pwd`/$thefile
set acquire_from = "filearg"
endif
if ( "$a" == "-ftp" ) then
set acquire_from = "ftp"
echo "anon ftp temporarily disabled"
exit ( 3 )
endif
if ( "$a" == "-here" ) then
set acquire_from = "here"
endif
if ( "$a" == "-env" ) then
set acquire_from = "environment"
set thefile = $WRFREGFILE
endif
end
# Start recording everything - for debug purposes.
set echo
set date
# And to tell us how long we've spent on this whole regression test,
# we should remember when we started.
set start = ( `date` )
#####################################################################
# Initial set up values
# Is this a single domain regression test or is this nested. Well, a nested one
# is a bit special. It can only run on machines that have the WRF RSL_LITE-but-no-MPI
# option available.
set NESTED1 = TRUE
set NESTED1 = FALSE
set NESTED2 = TRUE
set NESTED2 = FALSE
if ( ( $NESTED1 == TRUE ) || ( $NESTED2 == TRUE ) ) then
echo DOING a NESTED TEST
set NESTED = TRUE
else
set NESTED = FALSE
endif
# Use the adaptive time step option
set ADAPTIVE = TRUE
set ADAPTIVE = FALSE
if ( $ADAPTIVE == TRUE ) then
set STEP_TO_OUTPUT_TIME = .TRUE.
set USE_ADAPTIVE_TIME_STEP = .TRUE.
else
set STEP_TO_OUTPUT_TIME = .FALSE.
set USE_ADAPTIVE_TIME_STEP = .FALSE.
endif
# We can choose to do grid and obs nudging tests.
set FDDA = TRUE
set FDDA = FALSE
set FDDA2 = TRUE
set FDDA2 = FALSE
if ( $FDDA2 == TRUE ) then
set FDDA = TRUE
endif
# The default floating point precision is either 4 bytes or 8 bytes.
# We assume that it is 4 (or the default for the architecture) unless
# REAL8 is set to TRUE.
set REAL8 = TRUE
set REAL8 = FALSE
# Are we shooting for a bit-for-bit run (serial vs OpenMP, serial vs MPI), or not?
# If you want to do a performance-only run, the forecasts are still short, but you
# get to insure that the optimized code builds and runs.
set REG_TYPE = OPTIMIZED
set REG_TYPE = BIT4BIT
# For a Mac/Intel, we can run either g95 or PGI.
if ( ( `uname` == Darwin ) || ( `uname` == Linux ) ) then
set LINUX_COMP = G95
set LINUX_COMP = PGI
endif
# We can choose to do a global test
if ( $NESTED != TRUE ) then
set GLOBAL = TRUE
set GLOBAL = FALSE
else if ( $NESTED == TRUE ) then
set GLOBAL = FALSE
endif
# Is this a WRF chem test?
# if CHEM = TRUE, then chemistry run
# if KPP = TRUE, then chemistry with KPP run (CHEM set to true)
if ( $NESTED != TRUE ) then
set KPP = TRUE
set KPP = FALSE
set CHEM = TRUE
set CHEM = FALSE
if ( $KPP == TRUE ) then
set CHEM = TRUE
endif
else if ( $NESTED == TRUE ) then
set CHEM = FALSE
set KPP = FALSE
endif
if ( $CHEM == TRUE ) then
setenv WRF_CHEM 1
else if ( $CHEM == FALSE ) then
setenv WRF_CHEM 0
endif
if ( $KPP == TRUE ) then
setenv WRF_KPP 1
setenv FLEX_LIB_DIR /usr/local/lib
setenv YACC "/usr/bin/yacc -d"
set CHEM_OPT = 104
else if ( $KPP == FALSE ) then
setenv WRF_KPP 0
setenv FLEX_LIB_DIR
setenv YACC "/usr/bin/yacc -d"
set CHEM_OPT =
endif
# For the real data case, we can run either one of two data cases. If this is
# a chemistry run, we are forced to use that data.
set dataset = jun01
set dataset = jan00
if ( $CHEM == TRUE ) then
set dataset = chem
endif
if ( $GLOBAL == TRUE ) then
set dataset = global
endif
# Yet another local variable to change the name of where the data is located.
set thedataem = ${WRFREGDATAEM}/${dataset}
set thedatanmm = $WRFREGDATANMM
# A separately installed version of the latest ESMF library (NOT the
# ESMF library included in the WRF tarfile) can be tested by setting
# "ESMF_LIB" to "TRUE" below. This test is not supported on all
# machines.
set ESMF_LIB = TRUE
set ESMF_LIB = FALSE
# serial and OMP are not tested with ESMF so always start with env vars cleared
unsetenv ESMFLIB
unsetenv ESMFINC
if ( $ESMF_LIB == TRUE ) then
if ( ( `uname` == AIX ) && ( ( `hostname | cut -c 1-2` == bv ) || ( `hostname | cut -c 1-2` == be ) ) ) then
echo "A separately installed version of the latest ESMF library"
echo "(NOT the ESMF library included in the WRF tarfile) will"
echo "be used for MPI tests"
setenv OBJECT_MODE 64
# set ESMFLIBSAVE = /home/bluevista/hender/esmf/esmf_2_2_2r/lib/libO/AIX.default.64.mpi.default
# set ESMFINCSAVE = /home/bluevista/hender/esmf/esmf_2_2_2r/mod/modO/AIX.default.64.mpi.default
set NEVER = FALSE
if ( $NEVER == TRUE ) then
setenv ESMF_DIR /mmm/users/michalak/esmf
setenv ESMF_BOPT g
setenv ESMF_ABI 64
setenv ESMF_INSTALL_PREFIX $ESMF_DIR/../esmf_install
setenv ESMFLIB $ESMF_INSTALL_PREFIX/lib/libg/AIX.default.64.mpi.default
setenv ESMFINC $ESMF_INSTALL_PREFIX/mod/modg/AIX.default.64.mpi.default
else
source ~michalak/sourceme_esmf
endif
set ESMFLIBSAVE = $ESMFLIB
set ESMFINCSAVE = $ESMFINC
echo "Using ESMFLIB = ${ESMFLIBSAVE}"
echo "Using ESMFINC = ${ESMFINCSAVE}"
else
echo "Only the ESMF library included in the WRF tarfile is"
echo "tested on this machine"
exit ( 3 )
endif
if ( $NESTED == TRUE ) then
echo "The ESMF library does not work with nesting."
exit ( 3 )
endif
endif
# A single WRF output "quilt" server can be tested by setting "QUILT" to
# "TRUE" below. At the moment, testing of I/O quilt servers is not supported
# on all machines.
set QUILT = TRUE
set QUILT = FALSE
if ( $QUILT == TRUE ) then
echo "One WRF output quilt server will be used for some tests"
endif
# Baseline data sets can be generated and archived or compared against.
# - To generate and archive, set GENERATE_BASELINE to a pathname that can
# be created by this script via "mkdir -p $GENERATE_BASELINE". This
# directory must not already exist.
# Set GENERATE_BASELINE = FALSE to avoid baseline generation.
# - To compare with a previously archived baseline, set COMPARE_BASELINE
# to an existing directory that contains an archived baseline.
# Set COMPARE_BASELINE = FALSE to avoid baseline comparison.
set GENERATE_BASELINE = FALSE
set COMPARE_BASELINE = FALSE
# Baseline generation and comparison are only done when BIT4BIT is set.
if ( $GENERATE_BASELINE != FALSE ) then
if ( $REG_TYPE != BIT4BIT ) then
echo "ERROR: Baseline generation can only be done during BIT4BIT tests."
exit ( 3 )
endif
if ( -d $GENERATE_BASELINE ) then
echo "ERROR: Baseline directory ${GENERATE_BASELINE} already exists."
exit ( 3 )
else
# Archive serial output file to baseline
mkdir -p $GENERATE_BASELINE || ( echo "ERROR: cannot mkdir ${GENERATE_BASELINE}"; exit 3 )
endif
endif
if ( $COMPARE_BASELINE != FALSE ) then
if ( $REG_TYPE != BIT4BIT ) then
echo "Baseline comparison can only be done during BIT4BIT tests."
exit ( 3 )
endif
if ( ! -d $COMPARE_BASELINE ) then
echo "${0}: ERROR: Baseline directory ${COMPARE_BASELINE} does not exist"
exit ( 3 )
endif
endif
# Set the input/output format type (currently 1, 2 or 5 OK).
# Binary NetCDF PHDF, IBM GriB, history only
# 1 2 3 4 5
set IO_FORM = 2
set IO_FORM_NAME = ( io_bin io_netcdf io_dummy io_phdf5 io_grib1 )
set IO_FORM_WHICH =( IO IO IO IO O )
# There is a breakdown of cores to test depending on the various
# options that the user is testing.
# nested: cannot test NMM
# rsl_lite: cannot test anything with y periodic bc
# chem: em_real only
# esmf_lib: cannot test NMM
# grib output: cannot test NMM
if ( $NESTED1 == TRUE ) then
set CORES = ( em_real )
else if ( $NESTED2 == TRUE ) then
set CORES = ( em_b_wave em_quarter_ss )
else if ( $NESTED != TRUE ) then
set CORES = ( em_real em_b_wave em_quarter_ss nmm_real )
if ( $CHEM == TRUE ) then
set CORES = ( em_real em_real )
endif
if ( $GLOBAL == TRUE ) then
set CORES = ( em_real )
endif
if ( $ADAPTIVE == TRUE ) then
set CORES = ( em_real )
endif
if ( $ESMF_LIB == TRUE ) then
set CORES = ( em_real em_b_wave em_quarter_ss )
endif
if ( $IO_FORM_NAME[$IO_FORM] == io_grib1 ) then
set CORES = ( em_real em_b_wave em_quarter_ss )
endif
if ( $FDDA == TRUE ) then
set CORES = ( em_real )
endif
endif
# The b_wave case has binary input (4-byte only), the nmm
# core has raw MPI calls, skip them if we are doing real*8 floats.
if ( $REAL8 == TRUE ) then
set CORES = ( em_real em_quarter_ss )
endif
if ( ( $CHEM != TRUE ) && ( $FDDA != TRUE ) && ( $REAL8 != TRUE ) && ( $GLOBAL != TRUE ) && ( $ADAPTIVE != TRUE ) ) then
set PHYSOPTS = ( 1 2 3 4 5 6 7 8 10 11 13 14 15 )
else if ( $ADAPTIVE == TRUE ) then
set PHYSOPTS = ( 1 2 3 5 7 8 9 10 12 13 15 )
else if ( ( $CHEM != TRUE ) && ( $FDDA != TRUE ) && ( ( $REAL8 == TRUE ) || ( $GLOBAL == TRUE ) ) ) then
set PHYSOPTS = ( 1 2 3 4 5 6 )
else if ( ( $CHEM != TRUE ) && ( $FDDA == TRUE ) ) then
if ( $FDDA2 == TRUE ) then
set PHYSOPTS_FDDA = BOTH
else
set PHYSOPTS_FDDA = GRID
endif
if ( $PHYSOPTS_FDDA == GRID ) then
set PHYSOPTS = ( 1 )
else
set PHYSOPTS = ( 1 2 3 4 5 )
endif
else if ( $CHEM == TRUE ) then
set PHYSOPTS = ( 1 2 3 4 5 6 )
endif
# This is selecting the ideal physics options - mostly selecting BC options.
# With no nesting, run all three ideal physics options.
if ( $NESTED == TRUE ) then
set Max_Ideal_Physics_Options = 5
else if ( $NESTED != TRUE ) then
set Max_Ideal_Physics_Options = 5
endif
set CUR_DIR = `pwd`
# How many domains to run (nest tests). Only em_real and ideals use this.
# The max is 3 due to the number of columns in the namelist that are
# currently filled in.
if ( $NESTED == TRUE ) then
if ( $dataset == jan00 ) then
cat >! dom_real << EOF
time_step = 180,
time_step_fract_num = 0,
time_step_fract_den = 1,
max_dom = 2,
s_we = 1, 1, 1,
e_we = 74, 31, 31,
s_sn = 1, 1, 1,
e_sn = 61, 31, 31,
s_vert = 1, 1, 1,
e_vert = 28, 28, 28,
p_top_requested = 5000,
num_metgrid_levels = 27,
num_metgrid_soil_levels = 4,
dx = 30000, 10000, 3333.333333,
dy = 30000, 10000, 3333.333333,
grid_id = 1, 2, 3,
parent_id = 0, 1, 2,
i_parent_start = 0, 31, 11,
j_parent_start = 0, 17, 11,
parent_grid_ratio = 1, 3, 3,
parent_time_step_ratio = 1, 3, 3,
feedback = 1,
smooth_option = 0
num_moves = 3
move_id = 2 , 2 , 2
move_interval = 3 , 6 , 9
move_cd_x = 1 , 1 , 1
move_cd_y = 1 , 1 , 1
use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
step_to_output_time = $STEP_TO_OUTPUT_TIME
EOF
else if ( $dataset == jun01 ) then
cat >! dom_real << EOF
time_step = 60,
time_step_fract_num = 0,
time_step_fract_den = 1,
max_dom = 2,
s_we = 1, 1, 1,
e_we = 91, 31, 31,
s_sn = 1, 1, 1,
e_sn = 82, 31, 31,
s_vert = 1, 1, 1,
e_vert = 28, 28, 28,
p_top_requested = 5000,
num_metgrid_levels = 27,
num_metgrid_soil_levels = 4,
dx = 10000, 3333.333333, 1111.111111,
dy = 10000, 3333.333333, 1111.111111,
grid_id = 1, 2, 3,
parent_id = 0, 1, 2,
i_parent_start = 0, 30, 11,
j_parent_start = 0, 20, 11,
parent_grid_ratio = 1, 3, 3,
parent_time_step_ratio = 1, 3, 3,
feedback = 1,
smooth_option = 0
num_moves = 3
move_id = 2 , 2 , 2
move_interval = 1 , 2 , 3
move_cd_x = 1 , 1 , 1
move_cd_y = 1 , 1 , 1
use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
step_to_output_time = $STEP_TO_OUTPUT_TIME
EOF
endif
cat >! dom_ideal << EOF
max_dom = 2,
EOF
else if ( $NESTED != TRUE ) then
if ( $dataset == jan00 ) then
cat >! dom_real << EOF
time_step = 180,
time_step_fract_num = 0,
time_step_fract_den = 1,
max_dom = 1,
s_we = 1, 1, 1,
e_we = 74, 31, 31,
s_sn = 1, 1, 1,
e_sn = 61, 31, 31,
s_vert = 1, 1, 1,
e_vert = 28, 28, 28,
p_top_requested = 5000,
num_metgrid_levels = 27,
num_metgrid_soil_levels = 4,
dx = 30000, 10000, 3333,
dy = 30000, 10000, 3333,
grid_id = 1, 2, 3,
parent_id = 0, 1, 2,
i_parent_start = 0, 31, 30,
j_parent_start = 0, 17, 30,
parent_grid_ratio = 1, 3, 3,
parent_time_step_ratio = 1, 3, 3,
feedback = 1,
smooth_option = 0
use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
step_to_output_time = $STEP_TO_OUTPUT_TIME
EOF
else if ( $dataset == jun01 ) then
cat >! dom_real << EOF
time_step = 60,
time_step_fract_num = 0,
time_step_fract_den = 1,
max_dom = 1,
s_we = 1, 1, 1,
e_we = 91, 31, 31,
s_sn = 1, 1, 1,
e_sn = 82, 31, 31,
s_vert = 1, 1, 1,
e_vert = 28, 28, 28,
p_top_requested = 5000,
num_metgrid_levels = 27,
num_metgrid_soil_levels = 4,
dx = 10000, 3333.333333, 1111.111111,
dy = 10000, 3333.333333, 1111.111111,
grid_id = 1, 2, 3,
parent_id = 0, 1, 2,
i_parent_start = 0, 30, 11,
j_parent_start = 0, 20, 11,
parent_grid_ratio = 1, 3, 3,
parent_time_step_ratio = 1, 3, 3,
feedback = 1,
smooth_option = 0
use_adaptive_time_step = $USE_ADAPTIVE_TIME_STEP
step_to_output_time = $STEP_TO_OUTPUT_TIME
EOF
else if ( $dataset == global ) then
cat >! dom_real << EOF
time_step = 600
time_step_fract_num = 00
time_step_fract_den = 112
max_dom = 1,
s_we = 1, 1, 1,
e_we = 65, 41, 41,
s_sn = 1, 1, 1,
e_sn = 33, 81, 81,
s_vert = 1, 1, 1,
e_vert = 41, 41, 41,
p_top_requested = 5000,
num_metgrid_levels = 27,
num_metgrid_soil_levels = 4,
dx = 625373.288,20000, 4000,
dy = 625373.288,20000, 4000,
p_top_requested = 5000
grid_id = 1, 2, 3,
parent_id = 0, 1, 2,
i_parent_start = 0, 17, 17,
j_parent_start = 0, 33, 33,
parent_grid_ratio = 1, 5, 5,
parent_time_step_ratio = 1, 5, 5,
feedback = 1,
smooth_option = 00
EOF
endif
cat >! dom_ideal << EOF
max_dom = 1,
EOF
endif
# The em_real entire physics namelist. Change what you want.
cat >! phys_real_1 << EOF
mp_physics = 1, 1, 1,
ra_lw_physics = 1, 1, 1,
ra_sw_physics = 1, 1, 1,
radt = 21, 21, 21,
sf_sfclay_physics = 1, 1, 1,
sf_surface_physics = 1, 1, 1,
bl_pbl_physics = 1, 1, 1,
bldt = 0, 0, 0,
cu_physics = 1, 1, 0,
cudt = 5, 5, 5,
omlcall = 1,
oml_hml0 = 50,
oml_gamma = 0.14
slope_rad = 1, 1, 1,
topo_shading = 0, 0, 0,
isfflx = 1,
ifsnow = 0,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 5,
mp_zero_out = 0,
EOF
cat >! dyn_real_SAFE << EOF
moist_adv_opt = 0, 0, 0,
scalar_adv_opt = 0, 0, 0,
chem_adv_opt = 0, 0, 0,
tke_adv_opt = 0, 0, 0,
EOF
cat >! dyn_real_1 << EOF
moist_adv_opt = 1, 1, 1,
scalar_adv_opt = 1, 1, 1,
chem_adv_opt = 0, 0, 0,
tke_adv_opt = 0, 0, 0,
EOF
cat >! time_real_1 << EOF
auxinput1_inname = "met_em.d<domain>.<date>"
EOF
cat >! nest_real_1 << EOF
input_from_file = .true.,.false.,.false.
EOF
cat >! damp_real_1 << EOF
damp_opt = 0,
zdamp = 5000., 5000., 5000.,
dampcoef = 0.05, 0.05, 0.05
EOF
cat >! phys_real_2 << EOF
mp_physics = 2, 2, 2,
ra_lw_physics = 3, 3, 3,
ra_sw_physics = 3, 3, 3,
radt = 21, 21, 21,
sf_sfclay_physics = 2, 2, 2,
sf_surface_physics = 2, 2, 2,
bl_pbl_physics = 2, 2, 2,
bldt = 0, 0, 0,
cu_physics = 2, 2, 0,
cudt = 5, 5, 5,
omlcall = 1,
oml_hml0 = 50,
oml_gamma = 0.14
isfflx = 1,
ifsnow = 0,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 4,
sf_urban_physics = 2, 2, 2,
mp_zero_out = 0,
levsiz = 59
paerlev = 29
cam_abs_freq_s = 21600
cam_abs_dim1 = 4
cam_abs_dim2 = 28
EOF
cat >! dyn_real_2 << EOF
moist_adv_opt = 1, 1, 1,
scalar_adv_opt = 1, 1, 1,
chem_adv_opt = 0, 0, 0,
tke_adv_opt = 0, 0, 0,
EOF
if ( $GLOBAL == TRUE ) then
cp dyn_real_SAFE dyn_real_2
endif
cat >! time_real_2 << EOF
auxinput1_inname = "met_em.d<domain>.<date>"
EOF
cat >! nest_real_2 << EOF
input_from_file = .true.,.false.,.false.
EOF
cat >! damp_real_2 << EOF
damp_opt = 1,
zdamp = 5000., 5000., 5000.,
dampcoef = 0.05, 0.05, 0.05
EOF
cat >! phys_real_3 << EOF
mp_physics = 3, 3, 3,
ra_lw_physics = 4, 4, 4,
ra_sw_physics = 4, 4, 4,
radt = 21, 21, 21,
sf_sfclay_physics = 4, 4, 4,
sf_surface_physics = 1, 1, 1,
bl_pbl_physics = 4, 4, 4,
bldt = 0, 0, 0,
cu_physics = 3, 3, 0,
cudt = 5, 5, 5,
isfflx = 1,
ifsnow = 0,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 5,
mp_zero_out = 0,
maxiens = 1,
maxens = 3,
maxens2 = 3,
maxens3 = 16,
ensdim = 144,
EOF
cat >! dyn_real_3 << EOF
moist_adv_opt = 2, 2, 2,
scalar_adv_opt = 2, 2, 2,
chem_adv_opt = 0, 0, 0,
tke_adv_opt = 0, 0, 0,
EOF
cat >! time_real_3 << EOF
auxinput1_inname = "met_em.d<domain>.<date>"
EOF
cat >! nest_real_3 << EOF
input_from_file = .true.,.false.,.false.
EOF
cat >! damp_real_3 << EOF
damp_opt = 3,
zdamp = 5000., 5000., 5000.,
dampcoef = 0.05, 0.05, 0.05
EOF
cat >! phys_real_4 << EOF
mp_physics = 4, 4, 4,
ra_lw_physics = 1, 1, 1,
ra_sw_physics = 2, 2, 2,
radt = 21, 21, 21,
sf_sfclay_physics = 5, 5, 5,
sf_surface_physics = 2, 2, 2,
bl_pbl_physics = 5, 5, 5,
bldt = 0, 0, 0,
cu_physics = 4, 4, 0,
cudt = 0, 0, 0,
isfflx = 1,
ifsnow = 0,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 4,
sf_urban_physics = 1, 1, 1,
mp_zero_out = 0,
EOF
cat >! dyn_real_4 << EOF
moist_adv_opt = 2, 2, 2,
scalar_adv_opt = 2, 2, 2,
chem_adv_opt = 0, 0, 0,
tke_adv_opt = 0, 0, 0,
EOF
cat >! time_real_4 << EOF
auxinput1_inname = "met_em.d<domain>.<date>"
EOF
cat >! nest_real_4 << EOF
input_from_file = .true.,.false.,.false.
EOF
cat >! damp_real_4 << EOF
damp_opt = 1,
zdamp = 5000., 5000., 5000.,
dampcoef = 0.05, 0.05, 0.05
EOF
cat >! phys_real_5 << EOF
mp_physics = 5, 5, 5,
ra_lw_physics = 5, 5, 5,
ra_sw_physics = 5, 5, 5,
radt = 21, 21, 21,
sf_sfclay_physics = 7, 7, 7,
sf_surface_physics = 7, 7, 7,
bl_pbl_physics = 7, 7, 7,
bldt = 0, 0, 0,
cu_physics = 5, 5, 0,
cudt = 0, 0, 0,
isfflx = 1,
ifsnow = 0,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 2,
mp_zero_out = 0,
ishallow = 0,
EOF
cat >! dyn_real_5 << EOF
moist_adv_opt = 1, 1, 1,
scalar_adv_opt = 1, 1, 1,
chem_adv_opt = 0, 0, 0,
tke_adv_opt = 0, 0, 0,
EOF
cat >! time_real_5 << EOF
auxinput1_inname = "met_em.d<domain>.<date>"
EOF
cat >! nest_real_5 << EOF
input_from_file = .true.,.true.,.false.
EOF
cat >! damp_real_5 << EOF
damp_opt = 0,
zdamp = 5000., 5000., 5000.,
dampcoef = 0.05, 0.05, 0.05
EOF
cat >! phys_real_6 << EOF
mp_physics = 6, 6, 6,
ra_lw_physics = 4, 4, 4,
ra_sw_physics = 4, 4, 4,
radt = 21, 21, 21,
sf_sfclay_physics = 2, 2, 2,
sf_surface_physics = 1, 1, 1,
bl_pbl_physics = 8, 8, 8,
bldt = 0, 0, 0,
cu_physics = 6, 6, 0,
cudt = 0, 0, 0,
omlcall = 1,
oml_hml0 = 50,
oml_gamma = 0.14
isfflx = 1,
ifsnow = 0,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 5,
mp_zero_out = 0,
EOF
cat >! dyn_real_6 << EOF
moist_adv_opt = 1, 1, 1,
scalar_adv_opt = 1, 1, 1,
chem_adv_opt = 0, 0, 0,
tke_adv_opt = 0, 0, 0,
EOF
cat >! time_real_6 << EOF
auxinput1_inname = "met_em.d<domain>.<date>"
EOF
cat >! nest_real_6 << EOF
input_from_file = .true.,.false.,.false.
EOF
cat >! damp_real_6 << EOF
damp_opt = 3,
zdamp = 5000., 5000., 5000.,
dampcoef = 0.05, 0.05, 0.05
EOF
cat >! phys_real_7 << EOF
mp_physics = 7, 7, 7,
ra_lw_physics = 1, 1, 1,
ra_sw_physics = 1, 1, 1,
radt = 21, 21, 21,
sf_sfclay_physics =10, 10, 10,
sf_surface_physics = 2, 2, 2,
bl_pbl_physics =10, 10, 10,
bldt = 0, 0, 0,
cu_physics =14, 14, 0,
cudt = 5, 5, 5,
omlcall = 1,
oml_hml0 = 50,
oml_gamma = 0.14
slope_rad = 0, 0, 0,
topo_shading = 0, 0, 0,
isfflx = 1,
ifsnow = 0,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 4,
mp_zero_out = 0,
EOF
cat >! dyn_real_7 << EOF
moist_adv_opt = 2, 2, 2,
scalar_adv_opt = 2, 2, 2,
chem_adv_opt = 0, 0, 0,
tke_adv_opt = 0, 0, 0,
EOF
cat >! time_real_7 << EOF
auxinput1_inname = "met_em.d<domain>.<date>"
EOF
cat >! nest_real_7 << EOF