-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_fields.py
More file actions
32 lines (20 loc) · 807 Bytes
/
plot_fields.py
File metadata and controls
32 lines (20 loc) · 807 Bytes
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
import matplotlib.pyplot as plt
import numpy as np
from netCDF4 import Dataset
import os
wkdir=os.getcwd()
os.system('mkdir /work/scratch-nopw2/msun')
os.system('cp ../20051130T1200Z_Darwin_km1p5_RAL3p2_504p4_py.nc.gz /work/scratch-nopw2/msun/')
os.chdir('/work/scratch-nopw2/msun/')
print('uncompressing file...')
os.system('gunzip 20051130T1200Z_Darwin_km1p5_RAL3p2_504p4_py.nc.gz')
print('file uncompressed')
nc=Dataset('/work/scratch-nopw2/msun/20051130T1200Z_Darwin_km1p5_RAL3p2_504p4_py.nc')
plt.figure()
plt.pcolormesh(nc['actual_longitude'][:],nc['actual_latitude'][:],\
nc['maximum_radar_reflectivity_in_the_grid_column_due_to_all_hydrometeors'][32,:,:],shading='gouraud')
plt.xlabel('longitude')
plt.ylabel('latitude')
plt.colorbar()
#plt.show()
plt.savefig('./umnsaa_px.png')