-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_wrf_webfigs.py
More file actions
executable file
·68 lines (50 loc) · 2.26 KB
/
plot_wrf_webfigs.py
File metadata and controls
executable file
·68 lines (50 loc) · 2.26 KB
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
#!/usr/bin/env python
"""
Author: Lori Garzio on 8/17/2020
Last modified: 5/24/2022
This is a wrapper script that imports tools to plot RU-WRF 4.1 data using the subset .nc files.
Plots created: Hourly and Accumulated Rainfall; Air Temperature at 2m; Windspeeds at 10m, 80m, and 160m; Hourly and
Accumulated Snowfall; Composite Radar Reflectivity; Total, Diffuse, and Direct Shortwave Flux; Wind Gusts;
and Estimated Wind Power at 160m, SST at H001, Windspeeds at 10m for operations, Surface Skin Temperature
The plots are used to populate RUCOOL's RU-WRF webpage:
https://rucool.marine.rutgers.edu/data/meteorological-modeling/ruwrf-mesoscale-meteorological-model-forecast/
"""
import argparse
import sys
import wrf_webfigs
arg_parser = argparse.ArgumentParser(description='Plot RU-WRF figs',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
arg_parser.add_argument('-wrf_dir',
dest='wrf_dir',
default='/home/coolgroup/ru-wrf/real-time/v4.1_parallel/processed/3km/20200101',
type=str,
help='Full directory path to subset WRF netCDF files.')
arg_parser.add_argument('-save_dir',
dest='save_dir',
default='/home/coolgroup/ru-wrf/real-time/v4.1_parallel/scripts/webfigs/3km',
type=str,
help='Full directory path to save output plots.')
parsed_args = arg_parser.parse_args()
print('Plotting rain')
wrf_webfigs.plot_rain.main(parsed_args)
print('\nPlotting 2m air temps')
wrf_webfigs.plot_T2.main(parsed_args)
print('\nPlotting windspeed')
wrf_webfigs.plot_windspeed.main(parsed_args)
print('\nPlotting snow')
wrf_webfigs.plot_snow.main(parsed_args)
print('Plotting radar reflectivity')
wrf_webfigs.plot_radar.main(parsed_args)
print('Plotting solar radiation')
wrf_webfigs.plot_solar.main(parsed_args)
print('Plotting wind gusts')
wrf_webfigs.plot_windgusts.main(parsed_args)
print('Plotting wind power')
wrf_webfigs.plot_windpower.main(parsed_args)
print('Plotting SST')
wrf_webfigs.plot_sst.main(parsed_args)
print('Plotting windspeed for ops')
wrf_webfigs.plot_windspeed_ops.main(parsed_args)
print('Plotting TSK')
wrf_webfigs.plot_tsk.main(parsed_args)
sys.exit()