-
Notifications
You must be signed in to change notification settings - Fork 1
/
wrf.html
293 lines (271 loc) · 15.1 KB
/
wrf.html
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
<!DOCTYPE html>
<html>
<head>
<title>Brian Blaylock, UofU</title>
<link rel="stylesheet" href="./css/brian_style.css" />
<script src="./js/site/siteopen.js"></script>
</head>
<body>
<a name="TOP"></a>
<script src="./js/site/sitemenu.js"></script>
<div id="content">
<h1 align="center">
WRF Resources</h1>
<!-- Tabs -->
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#tab1">WRF Tutorial</a></li>
<li><a data-toggle="tab" href="#tab2">Run jobs on Kingspeak</a></li>
<li><a data-toggle="tab" href="#tab3">GeoGrid Options</a></li>
<li><a data-toggle="tab" href="#tab4">Edit Registry</a></li>
<li><a data-toggle="tab" href="#tab5">High Frequency Output</a></li>
<li><a data-toggle="tab" href="#tab6">tslist</a></li>
<li><a data-toggle="tab" href="#tab7">Urban Canopy Mode</a></li>
<li><a data-toggle="tab" href="#tab8">Misc.</a></li>
<li><a data-toggle="tab" href="#tab9">Set up CHPC Modules</a></li>
</ul>
<div class="tab-content">
<div id="tab1" class="tab-pane fade in active">
<h3>WRF Model Tutorial</h3>
<p>The Weather Research and Forecasting Model is used by
researchers and operational meteorologists to create
custom made weather simulations to study specific situations or
forecast in specific regions. The model is developed by UCAR and
they have a very handy
<a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/index.htm">tutorial</a>,
but I found it nice to make my own with specific instructions for runing WRF on
the group computers at the University of Utah. Hopefully this is helpful to others.
<center>
<iframe width="70%" height="427" src="https://onedrive.live.com/embed?cid=633FADFF92D04BD2&resid=633FADFF92D04BD2%21330&authkey=AGlCu6RQ5__75Q0&em=2" frameborder="0" scrolling="no"></iframe>
</center>
</div>
<div id="tab2" class="tab-pane fade">
<h3><i class="fa fa-microchip" ></i> Submitting Jobs to Kingspeak</h3>
<p>This is how you submit multiprocessor WRF jobs to Kingspeak.
Includes information on using SLURM.
<center>
<iframe width="70%" height="427" src="https://onedrive.live.com/embed?cid=633FADFF92D04BD2&resid=633FADFF92D04BD2%2120714&authkey=AKdQzO5-Rl-3-lY&em=2" frameborder="0" scrolling="no"></iframe>
</center>
</div>
<div id="tab3" class="tab-pane fade">
<h3>GEOGRID Options</h3>
<p>In the namelist.wps file there is an option to change the
<i>geog_data_res</i>. There are several different types to choose from.
Instructions for changing this are found
<a href="http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3.7/users_guide_chap3.htm#_Selecting_Between_USGS" target="_blank">here</a>,
but the available options are a little unclear.
One obvious piece of information missing from this documentation is that it doesn't
tell you how recent these data sets were created.
Some of them appear to use decade-old land use surveys.
So pay attention to what geo data you decide to use.
<p>The available data sets can be found on the geogrid download page
<a href="http://www2.mmm.ucar.edu/wrf/users/download/get_sources_wps_geog.html">here</a>.
My color scheme can be found on github <a href="https://github.com/blaylockbk/pyBKB_v2/blob/master/BB_cmap/landuse_colormap.py" target="_blank">
<i class="fab fa-github fa-fw" ></i>landuse_colormap.py</a>
</a>.
<p> The Great Salt Lake level in all these optoins are outdated.
In our department we routinely perform some
<a href="https://home.chpc.utah.edu/~u0553130/Brian_Blaylock/lake_surgery.html">surgery</a>
to shrink the lake.
<p> I'm told that the experimental HRRR at ESRL is implementing
an updated land use data set and has also adjusted the size of the Great Salt Lake.
<hr>
<p>Here's what the land use looks like for northern Utah with the following options...
<br><br>
<p> MODIS 15 second arch data
<div class='well well-sm'>
geog_data_res = 'modis_15s', 'modis_15s', ! MODIS 15s data
</div>
<img width="70%" src="https://home.chpc.utah.edu/~u0553130/MS/geog/geo_em.d01.nc.modis15s.png">
<br><br>
<p> MODIS 30 second arch data. Look how large the Great Salt Lake is! This represents the high lake levels in 2001. The lake is currently at record low levels.
<div class='well well-sm'>
geog_data_res = 'modis_30s', 'modis_30s', ! MODIS 30s data
</div>
<img width="70%" src="https://home.chpc.utah.edu/~u0553130/MS/geog/geo_em.d01.nc.modis30s.png">
<br><br>
<p> MODIS Lake (30 second arch data) + with 30 second USGS filling in missing data
<b>This is what the current HRRR model uses!</b>
<div class='well well-sm'>
geog_data_res = 'modis_lakes+30s', 'modis_lakes+30s', ! MODIS Lakes (21 category 30s arch) + USGS 30s
</div>
<img width="70%" src="https://home.chpc.utah.edu/~u0553130/MS/geog/geo_em.d01.nc.modislake30s.png">
<br><br>
<p> USGS 30 second arch data
<div class='well well-sm'>
geog_data_res = '30s', '30s', ! USGS 30s data
</div>
<img width="70%" src="https://home.chpc.utah.edu/~u0553130/MS/geog/geo_em.d01.nc.USGS30s.png">
</div>
<div id="tab4" class="tab-pane fade">
<h3>Update WRF Registry to output Inverse Density
and Time-averaged Mass Flux variables</h3>
<p>Not all variables that WRF calculates are outputted to the
wrfout file. In order to output the inverse density (alt) or
the time-averaged mass flux (muu, muv, mut) variables you'll need
to make some changes to the WRF registry.
(Thanks Derek Mallia for this solution.)
<p> Tutorial slides about the registery can be found <a href="http://www2.mmm.ucar.edu/wrf/users/tutorial/201407/Wednesday/4_gill_registry.pdf">here</a>.
<p> To add the mass flux and inverse density variables, do the following:
<ol style="margin-left:60px;">
<li>Enter the <i>WRFV3/Registry/</i> directory.
<li>Changes will need to be made to the <i>Registry.EM_COMMON</i> file in order
to get the WRF to output the mass-averaged variables discussed in Nehrkorn et al. 2010.
Open up <i>Registry.EM_COMMON</i> with your favorite text editor (mine is Visual Stuido Code) and find the following variables:
<ul style="margin-left:90px;">
<li>muu
<li>muv
<li>mut
<li>alt
</ul>
<li>Change the second "dash"
to <i>ihr</i> which tells the WRF to read and output these variables
<p>Before:
<div class="well well-sm">
<p>state real muu ij dyn_em 1 - - "muu"
<p>state real muv ij dyn_em 1 - - "muv"
<p>state real mut ij dyn_em 1 - - "mut"
<p>state real alt ikj dyn_em 1 - - "alt"
</div>
<p>After:
<div class="well well-sm">
<p>state real muu ij dyn_em 1 - ihr "muu"
<p>state real muv ij dyn_em 1 - ihr "muv"
<p>state real mut ij dyn_em 1 - ihr "mut"
<p>state real alt ikj dyn_em 1 - ihr "alt"
</div>
<p>Mine looks like this:
<img src='images/registry_edit_mass_flux.JPG'>
<li>Once this is done, leave the registry directory and
cd into the following directory: <i>cd test/em_real</i>
<li>Edit the namelist.input file and under the <i>&dynamics </i> header add the following lines:
<div class="well well-sm">
<p>do_avgflx_em = 1, 1, 1, 1, 1, 1, 1, 1, 1,
<p>do_avgflx_cugd = 1, 1, 1, 1, 1, 1, 1, 1, 1,
</div>
<li>Recompile WRF.
<li>When you run WRF you will see the new variables added to your output file.
</ol>
</div>
<div id="tab5" class="tab-pane fade">
<h3>Output a Variable at Higher Frequency</h3>
<p> In order to output a variable at a higher frequency you have to change
the namelist options as outlined
<a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Class_July2015/cases/Increase_freq_output_variables.php">
here</a>. I have added two new output streams. One that outputs
every 12 hours (stream 23) and one that outputs every 10 minutes
(stream 24). Note: Steams can range from 0-24, though, some are
reserved for special tasks (look at the documentation for this).
<p> The file "myoutfields_d01.txt" tells WRF
to write the T2 and tr17_1 to stream 24 and HGT
and LANDMASK to stream 23. Note: Do not include any spaces!
<div class="well well-sm">
<p>+:h:24:T2,tr17_1
<p>+:h:23:HGT,LANDMASK
</div>
<p> In namelist.input I added these lines in the &time_control section:
<div class="well well-sm">
<p>iofields_filename = "myoutfields_d01.txt", ! Name of file that tells WRF what to output
<p>io_form_auxhist24 = 2, ! Output stream 24 in netCDF format
<p>auxhist24_interval = 10, ! Output stream 24 every 10 minutes
<p>io_form_auxhist23 = 2, ! Output stream 23 in netCDF format
<p>auxhist23_interval = 720, ! Output stream 23 every 12 hours
</div>
<p> Or, if you have two domains...
<div class="well well-sm">
<p>iofields_filename = "myoutfields_d01.txt", "myoutfields_d02.txt"
<p>io_form_auxhist24 = 2,
<p>auxhist24_interval = 10, 10,
<p>io_form_auxhist23 = 2,
<p>auxhist23_interval = 720, 720,
</div>
<p> When you run WRF with these options it will create two new netCDF files called
<i>auxhist23_d01_2015-06-18_00:00:00</i> and <i>auxhist24_d01_2015-06-18_00:00:00</i>. You can
view these in ncview like other WRF output.
</div>
<div id="tab6" class="tab-pane fade">
<h3> Time Series and Vertical Profile at a point with tslist</h3>
<p> You can create time series output for every time step at
specified points using the ts_list option. You'll have to put
together a TS list. For example, save the following as
<i>tslist</i> in your /test/em_real/ directory and change the
namelist.input option max_ts_locs to the number of stations in your list.
<div class="alert alert-danger"><b>Danger:</b> If you run a restart run, your old tslists will be overwritten!</div>
<div class="well well-sm">
<p>#-----------------------------------------------#
<p># 24 characters for name | pfx | LAT | LON |
<p>#-----------------------------------------------#
<p>Salt Lake Airport KSLC 40.771 -111.965
<p>Spanish Fork UKBKB 40.099 -111.628
<p>William Browning Bldg WBB 40.766 -111.848
<p>Neil Armstrong Acadmey NAA 40.711 -112.014
<p>I-15 Spaghetti UT23 40.717 -111.904
<p>I-15/I-215 UT12 40.637 -111.904
<p>Legacy Parkway UTLGP 40.908 -111.915
<p>Kaysville-Utah Fruit FG005 41.021 -111.930
<p>Fremont Is. Summitt O3S08 41.171 -112.341
<p>Fremont Is. Kates PT O3S07 41.134 -112.311
<p>Gunnison Is. GNI 41.335 -112.855
<p>Hat Is. HATUT 41.071 -112.586
<p>Hawthorne QHW 40.734 -111.872
<p>GSL Buoy GSLBY 40.890 -112.346
<p>Badger Is. Tripod UFD08 40.943 -112.562
<p>MiniSodar2 USDR2 40.749 -112.034
<p>MiniSodar1 USDR1 41.084 -112.113
<p>Odgen-Hinckley Airport KOGD 41.194 -112.016
<p>Provo Airport KPVU 40.217 -111.717
<p>Spanish Fork Airport QSF 40.138 -111.660
<p>Farmington Bay - Goose O3S02 40.957 -111.931
<p>Farnsworth Peak FWP 40.659 -112.202
<p>Herriman QH3 40.496 -112.036
<p>Saltaire QSA 40.806 -112.050
<p>Bountiful - Viewmont QBV 40.898 -111.886
<p>Brigham City QBR 41.493 -112.018
<p>Hill AFB O3S04 41.105 -111.972
<p>Flight Park South FPS 40.457 -111.905
</div>
<img class="style1" style="width:300px" src="https://home.chpc.utah.edu/~u0553130/MS/timeseries/TS_locations.png">
<a href="https://home.chpc.utah.edu/~u0553130/MS/timeseries_WRF-MesoWest_20150618/smoothed/photo_viewer_v1.php">
Click here to view station data from WRF run and actual observations.</a>
<br>
</div>
<div id="tab7" class="tab-pane fade">
<h3> Urban Canopy Model</h3>
<p> Salt Lake City and other urban areas in Utah can be called an "Urban Forest." Unlike some large cities with
lots of concrete, Salt Lake City has many trees and vegetated areas. Because of this, we turn on the Urban Canopy
Model. This is a good thing to do when running WRF at 1 km resolution because we need to simulate the urban
influence on momentum and energy transfer better.
<p> Turn on the urban canopy model by changing the namelist option
sf_urban_physics = 1
<p> Also, adjust the amount of trees and vegetated areas in the city by modifying the URBPARM.TBL file found in the
run or test/em_real directory.
<p> I changed the "Fraction of urban landscape that does not have natural vegetation" to 0.5, 0.4, 0.3
</div>
<div id="tab8" class="tab-pane fade">
<h3>Miscellaneous</h3>
<ul style="padding-left: 60;">
<li><a href="./hrrr.html">Initialize WRF with HRRR boundary conditions</a>
<li><a href="https://home.chpc.utah.edu/~u0553130/Ute_WRF/"> UofU WRF User's Group (New)</a>
<li><a href="https://home.chpc.utah.edu/~u0198116/wrf/utahwrfusers.html"> UofU WRF User's Group (Old)</a>
<li><a href="http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/contents.html"> WRF User's Guide</a>
</ul>
</div>
<div id="tab9" class="tab-pane fade">
<h3>Setting Up CHPC Modules: .tcshrc, custom.csh, and .aliases</h3>
<div class="alert alert-info">If you are using CHPC computer resourses at the Univeristy of Utah, they have made a
switch to using modules (rather than excplicityly sourcing each program you want to use).
Modules makes it easy to load packages you need, especially if you need a different version.</div>
<p>To get started, follow the instructions on their website
<a href="https://www.chpc.utah.edu/documentation/software/modules.php">here</a>.
<p> For WRF users at the Universiyt of Utah, you can get my
most recent CHPC setting files on <a href="https://github.com/blaylockbk/CHPC-Settings" target="_blank">
<i class="fab fa-github fa-fw" ></i> GitHub</a>.
<p>Note: If you are having issues, confirm that your custom file is loading correctly by inserting a few echo statements.
There may be some hangup in your .aliases file that prevents the .custom file to load. If that is the case, review
your .aliases file for potential road blocks.
</div>
</div>
</div>
<script src="./js/site/siteclose.js"></script>
</div>
</body>
</html>