-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlake_surgery.html
604 lines (586 loc) · 24.1 KB
/
lake_surgery.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
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
<!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">Lake Surgery</h1>
<!-- Tabs -->
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#tab1">Introduction</a></li>
<li><a data-toggle="tab" href="#tab2">Change Lake Area</a></li>
<li><a data-toggle="tab" href="#tab3">METGRID Modification</a></li>
<li><a data-toggle="tab" href="#tab4">GEOGRID Modification</a></li>
<li><a data-toggle="tab" href="#tab5">Change Lake Temperature</a></li>
<li><a data-toggle="tab" href="#tab6">Edit geo_em.d0x.nc in Photoshop</a></li>
</ul>
<div class="tab-content">
<div id="tab1" class="tab-pane fade in active">
<img ALIGN=right width="200px" class="style2" src="./images/uncle_red.jpeg">
<h3>Why Perform Surgery?</h3>
<p>We have to live with the fact that all models are wrong.
Still, we can be a bit more
optimistic and try to fix parts of the model. As Uncle Red
would say, "If it ain't broke, you're not trying!"
Here I explain how I fix the size and initial surface
temperature errors in the Great Salt Lake. Please note that
what I do here is a bit more
sophisticated than just using duck tape.
<p>Lake surgery is necessary because the Great Salt Lake in
the available MODIS survey is too big! (This is true
for other geographical data sets available to WRF users)
<p>The HRRR model uses MODIS derived land surface characteristics
in its pre-processing. We are using the same geographical data
set, MODIS 30s with lake category, in our WRF simulations.
The image on the right shows the land mask and elevation
around the Great Salt Lake in the MODIS geographical data set
versus what was observed by the MODIS true color image on 18 June 2015.
<p><img ALIGN=right width="500px" class="style2" src="https://home.chpc.utah.edu/~u0553130/Brian_Blaylock/images/lake_hrrr_sat.png">
The large lake size in the model is thought to cause issues with the strength, structure, and timing of the
lake breeze in Salt Lake City like the one on 18 June 2015.
<p>Initial test simulations revealed that errors in the MODIS
land use categorization of the GSL boundary and the HRRR initialized
lake surface temperature led to poor estimates of boundary
layer depth over the lake and overly strong lake breezes.
Lombardo et al. (2106) recently discussed the sensitivity of
sea breezes to coastline and the sea surface temperature.
We likewise expected improved lake breeze simulations when the
modeled lake properties are more accurate.
In subsequent simulations in which changes to the lake size and
lake temperature were made the boundary layer thermal and wind
fields were improved. Thus, the size of the lake needs to be
trimmed! I perform this lake surgery in the <b>geo_em.d0X.nc</b> file.
<p>I was told that the experimental HRRR will soon use an updated
land use data set with additional modifications to the Great Salt
Lake for which they used this method.
<div class="well well-sm">The Google Earth Engine
time series for the Great Salt Lake is pretty cool. Check it
out <a href="https://earthengine.google.com/timelapse/#v=41.12943,-112.1832,6.608,latLng&t=2.49">
here</a>.
<iframe width="70%" height="588" src="https://earthengine.google.org/timelapse/player?c=https%3A%2F%2Fearthengine.google.org%2Ftimelapse%2Fdata&v=41.12401,-112.32969,6.872&r=1&p=true" frameborder="0"></iframe>
</div>
</div>
<div id="tab2" class="tab-pane fade">
<h3>shrink_GSL.py</h3>
The python script <b>shrink_GSL.py</b> trims the area around the
Great Salt Lake using the lake boundary drawn by Python's Basemap.
We trim the area using Basemap's <b>maskoceans()</b> function.
<p style="text-align:center"><a class='btn btn-default btn-lg' href="https://github.com/blaylockbk/Ute_WRF/blob/master/modificaions/shrink_GSL.py"><i class="fab fa-github"></i> shrink_GSL.py</a>
<p>Modifies the following 2D variables
<ul style="padding-left:60px;">
<li> LANDMASK
<li> LU_INDEX
<li> LAKE_DEPTH
<li> SCB_DOM
<li> SCT_DOM
</ul>
<p>When it's finished, it will create a new <b>geo_em_d0x.nc</b> file. To utilize the edits, rename the file
in your WPS directory and re-run <b>metgrid</b>.
<p><img ALIGN=center height="300px" class="style1" src="https://home.chpc.utah.edu/~u0553130/Brian_Blaylock/images/lake_BaA.png">
<br>
<p>Also need to modify the following 3D variables with another script not posted here yet:
<ul style="padding-left:100px">
<li> LANDUSEF
<li> SOILCBOT
<li> SOILCTOP
</ul>
<p>Below shows changes made to the Land Use Index where the points that are no longer lake are changed to barren land.
The black lake outline is the python basemap Great Salt Lake boarder.
<p><img class='style1' width="98%" src="./images/LU_changes.png">
<p><a href="https://github.com/blaylockbk/Ute_WRF/blob/master/functions/landuse_colormap.py"><i class="fab fa-github"></i> Landuse Colormap</a>
</div>
<div id="tab3" class="tab-pane fade">
<h3>METGRID.TBL Modification</h3>
<p>I don't really understand how METGRID works, but it's important when changing the lake size in geo_em.d0* files.
The issue with the METGRID.TBL is that it reverts back to the old lake size
when it writes the LANDSEA variable. Here is a hack: I made the following modification which
masks the LANDSEA based on the LANDMASK variable, and sets the points that are not
land to land.
<p>This is important because it defines variables like Albedo and Green Area Fraction based on a lake mask.
<textarea disabled style="height:150px">
========================================
name=LANDSEA
interp_option=nearest_neighbor
# fill_missing=-1.
fill_lev=200100:LANDMASK(1)
masked= land # bkb: hack to get landsea to be same as landmask
fill_missing=1 # bkb: hack to get landsea to be same as landmask
# Could also just say interp_mask=LANDMASK(1) in all
# instances below??? (Is LANDSEA used for anything later?)
========================================
</textarea>
</div>
<div id="tab4" class="tab-pane fade">
<h3>GEOGRID.TBL Modification</h3>
<p>There are many variables that are affected by the lake mask, so I turned all the masking
off in the GEOGRID.TBL file. This way geogrid doesn't think there is a lake
and <b>we can manually add the mask to these variables later with a modified version of the
<a href="https://home.chpc.utah.edu/~u0553130/Brian_Blaylock/lake_surgery.html#SHRINK">shrink_GSL.py</a> script</b>.
<p> Simply comment out masked=water line
<textarea disabled style="height:150px">
# See options.txt for a (somewhat up to date) list of the
# options that may be specified here.
===============================
name = HGT_M
priority = 1
dest_type = continuous
smooth_option = smth-desmth_special; smooth_passes=1
fill_missing=0.
interp_option = 30s:average_gcell(4.0)+four_pt+average_4pt
interp_option = 2m:four_pt
interp_option = 5m:four_pt
interp_option = 10m:four_pt
interp_option = default:four_pt
rel_path= 30s:topo_30s/
rel_path= 2m:topo_2m/
rel_path= 5m:topo_5m/
rel_path= 10m:topo_10m/
rel_path= default:topo_2m/
===============================
name=LANDUSEF
priority=1
dest_type=categorical
z_dim_name=land_cat
landmask_water = modis_15s:17 # Calculate a landmask from this field
landmask_water = modis_30s:17 # Calculate a landmask from this field
landmask_water = modis_lakes:17,21 # Calculate a landmask from this field
landmask_water = usgs_lakes:16,28 # Calculate a landmask from this field
landmask_water = nlcd2006_9s:17 # Calculate a landmask from this field
landmask_water =nlcd2006_30s:17 # Calculate a landmask from this field
landmask_water = nlcd2011_9s:17 # Calculate a landmask from this field
landmask_water = nlcd2006:17 # Calculate a landmask from this field
landmask_water = default:16 # Calculate a landmask from this field
dominant=LU_INDEX
interp_option = nlcd2006_9s:average_gcell(0.0)
interp_option =nlcd2006_30s:average_gcell(0.0)
interp_option = nlcd2011_9s:average_gcell(0.0)
interp_option = nlcd2006:nearest_neighbor
interp_option = ssib_10m:four_pt
interp_option = ssib_5m:four_pt
interp_option = modis_15s:nearest_neighbor
interp_option = modis_30s:nearest_neighbor
interp_option = 30s:nearest_neighbor
interp_option = usgs_lakes:nearest_neighbor
interp_option = modis_lakes:nearest_neighbor
interp_option = 2m:four_pt
interp_option = 5m:four_pt
interp_option = 10m:four_pt
interp_option = default:four_pt
rel_path= nlcd2006_9s:nlcd2006_ll_9s/
rel_path=nlcd2006_30s:nlcd2006_ll_30s/
rel_path= nlcd2011_9s:nlcd2011_ll_9s/
rel_path= nlcd2006:nlcd2006_ll_30s/
rel_path= ssib_10m:ssib_landuse_10m/
rel_path= ssib_5m:ssib_landuse_5m/
rel_path= modis_15s:modis_landuse_20class_15s/
rel_path= modis_30s:modis_landuse_20class_30s/
rel_path= 30s:landuse_30s/
rel_path= usgs_lakes:landuse_30s_with_lakes/
rel_path= modis_lakes:modis_landuse_21class_30s/
rel_path= 2m:landuse_2m/
rel_path= 5m:landuse_5m/
rel_path= 10m:landuse_10m/
rel_path= default:landuse_2m/
===============================
name=SOILTEMP
priority=1
dest_type=continuous
interp_option=default:sixteen_pt+four_pt+average_4pt+average_16pt+search
# masked=water
fill_missing=0.
rel_path=default:soiltemp_1deg/
===============================
name=SOILCTOP
priority=1
dest_type=categorical
z_dim_name=soil_cat
dominant=SCT_DOM
interp_option = 30s:nearest_neighbor
interp_option = 2m:four_pt
interp_option = 5m:four_pt
interp_option = 10m:four_pt
interp_option = default:four_pt
rel_path= 30s:soiltype_top_30s/
rel_path= 2m:soiltype_top_2m/
rel_path= 5m:soiltype_top_5m/
rel_path= 10m:soiltype_top_10m/
rel_path= default:soiltype_top_2m/
===============================
name=SOILCBOT
priority=1
dest_type=categorical
z_dim_name=soil_cat
dominant=SCB_DOM
interp_option = 30s:nearest_neighbor
interp_option = 2m:four_pt
interp_option = 5m:four_pt
interp_option = 10m:four_pt
interp_option = default:four_pt
rel_path= 30s:soiltype_bot_30s/
rel_path= 2m:soiltype_bot_2m/
rel_path= 5m:soiltype_bot_5m/
rel_path= 10m:soiltype_bot_10m/
rel_path= default:soiltype_bot_2m/
===============================
name=ALBEDO12M
priority=1
dest_type=continuous
z_dim_name=month
# masked = water
fill_missing = 8.
interp_option=default:four_pt+average_4pt+average_16pt+search
rel_path=default:albedo_ncep/
===============================
name=GREENFRAC
priority=1
dest_type=continuous
interp_option=modis_fpar:average_gcell(4.0)+four_pt+average_4pt+average_16pt+search
interp_option=default:four_pt+average_4pt+average_16pt+search
z_dim_name=month
# masked = water
fill_missing = 0.
rel_path=modis_fpar:greenfrac_fpar_modis/
rel_path=default:greenfrac/
===============================
name=LAI12M
priority=1
dest_type=continuous
interp_option=modis_lai:average_gcell(4.0)+four_pt+average_4pt+average_16pt+search
interp_option=default:average_gcell(4.0)+four_pt+average_4pt+average_16pt+search
z_dim_name=month
# masked = water
fill_missing = 0.
rel_path=modis_lai:lai_modis_30s/
rel_path=default:lai_modis_10m/
flag_in_output=FLAG_LAI12M
===============================
name=SNOALB
priority=1
dest_type=continuous
interp_option=default:four_pt+average_4pt+average_16pt+search
# masked = water
fill_missing = 0.
rel_path=default:maxsnowalb/
===============================
name=SLOPECAT
priority=1
dominant_only=SLOPECAT
dest_type=categorical
z_dim_name=slope_cat
# masked = water
fill_missing = 0.
interp_option=default:nearest_neighbor+average_16pt+search
rel_path=default:islope/
===============================
name = CON
priority = 1
dest_type = continuous
# masked=water
fill_missing=0.
interp_option = default:average_4pt
interp_option = 10m:average_4pt
interp_option = 20m:average_4pt
interp_option = 30m:average_4pt
interp_option = 1deg:average_4pt
interp_option = 2deg:average_4pt
rel_path = default:orogwd_10m/con/
rel_path = 10m:orogwd_10m/con/
rel_path = 20m:orogwd_20m/con/
rel_path = 30m:orogwd_30m/con/
rel_path = 1deg:orogwd_1deg/con/
rel_path = 2deg:orogwd_2deg/con/
===============================
name = VAR
priority = 1
dest_type = continuous
# masked=water
fill_missing=0.
interp_option = default:average_4pt
interp_option = 10m:average_4pt
interp_option = 20m:average_4pt
interp_option = 30m:average_4pt
interp_option = 1deg:average_4pt
interp_option = 2deg:average_4pt
rel_path = default:orogwd_10m/var/
rel_path = 10m:orogwd_10m/var/
rel_path = 20m:orogwd_20m/var/
rel_path = 30m:orogwd_30m/var/
rel_path = 1deg:orogwd_1deg/var/
rel_path = 2deg:orogwd_2deg/var/
===============================
name = OA1
priority = 1
dest_type = continuous
# masked=water
fill_missing=0.
interp_option = default:average_4pt
interp_option = 10m:average_4pt
interp_option = 20m:average_4pt
interp_option = 30m:average_4pt
interp_option = 1deg:average_4pt
interp_option = 2deg:average_4pt
rel_path = default:orogwd_10m/oa1/
rel_path = 10m:orogwd_10m/oa1/
rel_path = 20m:orogwd_20m/oa1/
rel_path = 30m:orogwd_30m/oa1/
rel_path = 1deg:orogwd_1deg/oa1/
rel_path = 2deg:orogwd_2deg/oa1/
===============================
name = OA2
priority = 1
dest_type = continuous
# masked=water
fill_missing=0.
interp_option = default:average_4pt
interp_option = 10m:average_4pt
interp_option = 20m:average_4pt
interp_option = 30m:average_4pt
interp_option = 1deg:average_4pt
interp_option = 2deg:average_4pt
rel_path = default:orogwd_10m/oa2/
rel_path = 10m:orogwd_10m/oa2/
rel_path = 20m:orogwd_20m/oa2/
rel_path = 30m:orogwd_30m/oa2/
rel_path = 1deg:orogwd_1deg/oa2/
rel_path = 2deg:orogwd_2deg/oa2/
===============================
name = OA3
priority = 1
dest_type = continuous
# masked=water
fill_missing=0.
interp_option = default:average_4pt
interp_option = 10m:average_4pt
interp_option = 20m:average_4pt
interp_option = 30m:average_4pt
interp_option = 1deg:average_4pt
interp_option = 2deg:average_4pt
rel_path = default:orogwd_10m/oa3/
rel_path = 10m:orogwd_10m/oa3/
rel_path = 20m:orogwd_20m/oa3/
rel_path = 30m:orogwd_30m/oa3/
rel_path = 1deg:orogwd_1deg/oa3/
rel_path = 2deg:orogwd_2deg/oa3/
===============================
name = OA4
priority = 1
dest_type = continuous
# masked=water
fill_missing=0.
interp_option = default:average_4pt
interp_option = 10m:average_4pt
interp_option = 20m:average_4pt
interp_option = 30m:average_4pt
interp_option = 1deg:average_4pt
interp_option = 2deg:average_4pt
rel_path = default:orogwd_10m/oa4/
rel_path = 10m:orogwd_10m/oa4/
rel_path = 20m:orogwd_20m/oa4/
rel_path = 30m:orogwd_30m/oa4/
rel_path = 1deg:orogwd_1deg/oa4/
rel_path = 2deg:orogwd_2deg/oa4/
===============================
name = OL1
priority = 1
dest_type = continuous
# masked=water
fill_missing=0.
interp_option = default:average_4pt
interp_option = 10m:average_4pt
interp_option = 20m:average_4pt
interp_option = 30m:average_4pt
interp_option = 1deg:average_4pt
interp_option = 2deg:average_4pt
rel_path = default:orogwd_10m/ol1/
rel_path = 10m:orogwd_10m/ol1/
rel_path = 20m:orogwd_20m/ol1/
rel_path = 30m:orogwd_30m/ol1/
rel_path = 1deg:orogwd_1deg/ol1/
rel_path = 2deg:orogwd_2deg/ol1/
===============================
name = OL2
priority = 1
dest_type = continuous
# masked=water
fill_missing=0.
interp_option = default:average_4pt
interp_option = 10m:average_4pt
interp_option = 20m:average_4pt
interp_option = 30m:average_4pt
interp_option = 1deg:average_4pt
interp_option = 2deg:average_4pt
rel_path = default:orogwd_10m/ol2/
rel_path = 10m:orogwd_10m/ol2/
rel_path = 20m:orogwd_20m/ol2/
rel_path = 30m:orogwd_30m/ol2/
rel_path = 1deg:orogwd_1deg/ol2/
rel_path = 2deg:orogwd_2deg/ol2/
===============================
name = OL3
priority = 1
dest_type = continuous
# masked=water
fill_missing=0.
interp_option = default:average_4pt
interp_option = 10m:average_4pt
interp_option = 20m:average_4pt
interp_option = 30m:average_4pt
interp_option = 1deg:average_4pt
interp_option = 2deg:average_4pt
rel_path = default:orogwd_10m/ol3/
rel_path = 10m:orogwd_10m/ol3/
rel_path = 20m:orogwd_20m/ol3/
rel_path = 30m:orogwd_30m/ol3/
rel_path = 1deg:orogwd_1deg/ol3/
rel_path = 2deg:orogwd_2deg/ol3/
===============================
name = OL4
priority = 1
dest_type = continuous
# masked=water
fill_missing=0.
interp_option = default:average_4pt
interp_option = 10m:average_4pt
interp_option = 20m:average_4pt
interp_option = 30m:average_4pt
interp_option = 1deg:average_4pt
interp_option = 2deg:average_4pt
rel_path = default:orogwd_10m/ol4/
rel_path = 10m:orogwd_10m/ol4/
rel_path = 20m:orogwd_20m/ol4/
rel_path = 30m:orogwd_30m/ol4/
rel_path = 1deg:orogwd_1deg/ol4/
rel_path = 2deg:orogwd_2deg/ol4/
===============================
name = VAR_SSO
priority = 1
dest_type = continuous
fill_missing=0.
interp_option = 30s:average_gcell(4.0)+four_pt+average_4pt
interp_option = 2m:average_gcell(4.0)+four_pt+average_4pt
interp_option = 5m:average_gcell(4.0)+four_pt+average_4pt
interp_option = 10m:average_gcell(4.0)+four_pt+average_4pt
interp_option = default:average_gcell(4.0)+four_pt+average_4pt
rel_path = 30s:varsso/
rel_path = 2m:varsso_2m/
rel_path = 5m:varsso_5m/
rel_path = 10m:varsso_10m/
rel_path = default:varsso_10m/
===============================
name = LAKE_DEPTH
priority=1
dest_type = continuous
fill_missing = 10.
# masked=land
interp_option = default:average_gcell(1.0)+search(5)
rel_path = default:lake_depth/
flag_in_output=FLAG_LAKE_DEPTH
===============================
name=URB_PARAM
priority=1
optional=yes
dest_type=continuous
fill_missing = 0.
z_dim_name=num_urb_params
interp_option=default:nearest_neighbor
rel_path=default:NUDAPT44_1km/
===============================
name=IMPERV
priority=1
optional=yes
dest_type=continuous
interp_option = default:average_gcell(0.0)
# masked=water
fill_missing=0.
rel_path = default:nlcd2011_imp_ll_9s/
===============================
name=CANFRA
priority=1
optional=yes
dest_type=continuous
interp_option = default:average_gcell(0.0)
# masked=water
fill_missing=0.
rel_path = default:nlcd2011_can_ll_9s/
===============================
</textarea>
</div>
<div id="tab5" class="tab-pane fade">
<h3>Modify Lake Temperature in Initialization of Real</h3>
<p>The lake surface temperature from the default MODIS land use input is about 6 degrees cooler than what was
actually observed at the buoy. I added the following code to the <i>WRFV3/dyn_em/module_initialize_real.F</i>
to manually change the temperature of the Great Salt Lake.
<p>Added the code in the below textbox after the following comment and code near line 2529:
<pre>! At the initial time we care about values of soil moisture and temperature, other times are
! ignored by the model, so we ignore them, too.
IF ( domain_ClockIsStartTime(grid) ) THEN
account_for_zero_soil_moisture : SELECT CASE ( model_config_rec%sf_surface_physics(grid%id) )</pre>
<textarea disabled style="height:310px">
!----- BKB: Attempt to change Great Salt Lake Temperature ---------------------------
! Modifications for the lake temperature, etc
! Set GSL Temp
DO j = jts, MIN(jde-1,jte)
DO i = its, MIN(ide-1,ite)
IF ( ( grid%xlat(i,j) .gt. 40.5 ) .and. &
( grid%xlat(i,j) .lt. 41.8 ) .and. &
( grid%xlong(i,j) .gt. -113.25 ) .and. &
( grid%xlong(i,j) .lt. -112.0 ) .and. &
( grid%ivgtyp(i,j) .eq. 17 ) ) THEN
print*,'at ijk ',i,' ',j,' ',k
print*,'sst changed from ',grid%tsk(i,j)
grid%tsk(i,j) = 302.0
grid%sst(i,j) = 302.0
print*,'to ',grid%tsk(i,j)
END IF
END DO
END DO
!----- BKB: Attempt to change Great Salt Lake Temperature --------------------------
</textarea>
<p>Note: WRF doesn't vary the lake temperature at each time step. It assumes the lake surface temperature
will change slowly compared to the land surface temperature, so lake surface temperature stays constant
throughout the model run. Since I'm focused on a lake breeze in the afternoon I use an afternoon lake
temperature to run the entire WRF simulation.
<p> Below is the change from the default lake size and temperature to my modified temperature to 302 K.
<br>
<img class="style1" width="88%" src="./images/lake_temp.png">
</div>
<div id="tab6" class="tab-pane fade">
<h3>Edit WRF fields in Photoshop</h3>
I always thought it would be nice if I could load a netCDF file into photoshop and make changes
to fields with the paint brush and pencil tool. Well, now you can!, with this three step process using Python (this only works with binary arrays or categorical data sets so far).
This is a work in progress and will get more attention upon need for doing this kind of work again.
<p style='text-align:center'><a class='btn btn-default btn-lg' href="https://github.com/blaylockbk/Ute_WRF/tree/master/edit_netcdf_in_photoshop"><i class="fab fa-github"></i> edit_netcdf_in_photoshop</a>
<ol style="padding-left:60px;">
<li>Convert a netCDF array into a bitmap image <a href='https://github.com/blaylockbk/Ute_WRF/blob/master/edit_netcdf_in_photoshop/netcdf_to_bitmap.py'>netcdf_to_bitmap.py</a>.
<li>Open image in PhotoShop and use the pencil tool to change colors (i.e. land use categories). Save image as bitmap.
<li>Open the modified land use image in Python <a href='https://github.com/blaylockbk/Ute_WRF/blob/master/edit_netcdf_in_photoshop/bitmap_to_netcdf.py'>bitmap_to_netcdf.py</a>.
and extract the colors as categories. Save array into the WRF netCDF file
</ol>
<p><img src='./images/photoshop_python.png' width='100%'>
<br><br>
<p> As an example, Jim Steenburgh wanted to make the Lake Ontario
simple on the southern coast for a test WRF simulaiton. From the geo_em.d03.nc
file I created a bitmap image of the LANDMASK array, Jim modified
the lake in Photoshop, I then used the new bitmap image to
redefine a new lakemask and landuse index for the lake.
<img src='./images/lake_jim.png' width="100%">
</div>
</div>
</div>
<br>
<div class="panel panel-danger">
<div class="panel-body" align=center>
<small><i class="fa fa-book fa-fw" aria-hidden="true"></i>
This work was used in
<a style="color:#990000;font-weight:700;" href=http://journals.ametsoc.org/doi/abs/10.1175/JAMC-D-16-0216.1 target="_blank">Blaylock et al. 2017</a></small>
</div>
</div>
<script src="./js/site/siteclose.js"></script>
</div>
</body>
</html>>