3 # Run the WRF 2-way using 2 input files.
5 # This shell assumes that you have already built the WRF code and that the
6 # real.exe, ndown.exe, and wrf.exe files exist. It assumes that the input
7 # data for the Jan00 case is in a "normal" location. This code is executed
8 # from the ./WRFV2/test/em_real directory.
10 ##################################################################################
12 # Make the namelist: 1 h, 2 domains, output every hour, and use the Noah LSM
15 sed -e '/^ run_hours/s/12/1/' \
16 -e '/^ history_interval/s/180/60/' \
17 -e '/^ sf_surface_physics/s/1/2/' \
18 -e '/^ sf_surface_physics/s/1/2/' \
19 -e '/^ num_soil_layers/s/5/4/' \
20 -e '/^ max_dom/s/1/2/' \
21 -e '/^ input_from_file/s/false/true/' \
22 namelist.input.jan00
>! namelist.input
24 # Get the coarse and fine grid input data from the SI
27 if ( ( `uname` == AIX
) && ( `hostname | cut -c 1-2` == bs
) ) then
28 ln -sf /mmm
/users
/gill
/WRF-data-EM
/jan00
/wrf_real
* .
29 else if ( ( `uname` == OSF1
) && ( `hostname | cut -c 1-6` == joshua
) ) then
30 ln -sf /users
/gill
/WRF-data-EM
/jan00
/wrf_real
* .
31 else if ( ( `uname` == Linux
) && ( `hostname` == bay-mmm
) ) then
32 ln -sf /users
/gill
/WRF-data-EM
/jan00
/wrf_real
* .
35 # Run real data preprocessor real.exe
38 if ( ( `uname` == AIX
) && ( `hostname | cut -c 1-2` == bs
) ) then
42 else if ( ( `uname` == OSF1
) && ( `hostname | cut -c 1-6` == joshua
) ) then
43 cat >! machfile
<< EOF
49 mpirun
-np 1 -machinefile .
/machfile real.exe
50 else if ( ( `uname` == Linux
) && ( `hostname` == bay-mmm
) ) then
51 cat >! machfile
<< EOF
57 mpirun
-np 1 -machinefile .
/machfile real.exe
60 # Well, did the coarse grid ic/bc work?
63 set ic_size
= `ls -ls wrfinput_d01 | awk ' { print $6 } '`
64 set bc_times
= `ncdump -h wrfbdy_d01 | grep "Time = UNLIMITED" | cut -d"(" -f2 | cut -dc -f1`
65 if ( ( $ic_size > 10000 ) && ( $bc_times == 4 ) ) then
68 echo coarse grid ic
bc wrong size
72 # Run coarse+fine grid wrf
75 if ( ( `uname` == AIX
) && ( `hostname | cut -c 1-2` == bs
) ) then
78 else if ( ( `uname` == OSF1
) && ( `hostname | cut -c 1-6` == joshua
) ) then
79 mpirun
-np 2 -machinefile .
/machfile wrf.exe
80 else if ( ( `uname` == Linux
) && ( `hostname` == bay-mmm
) ) then
81 mpirun
-np 2 -machinefile .
/machfile wrf.exe
84 # Well, did the coarse+fine grid wrf work?
87 set c_times
= `ncdump -h wrfout_d01_2000-01-24_12:00:00 | grep "Time = UNLIMITED" | cut -d"(" -f2 | cut -dc -f1`
88 set f_times
= `ncdump -h wrfout_d02_2000-01-24_12:00:00 | grep "Time = UNLIMITED" | cut -d"(" -f2 | cut -dc -f1`
89 if ( ( $c_times == 2 ) && ( $f_times == 2 ) ) then
93 echo coarse grid wrf output wrong size