Commit 8c0c4baf authored by Carl Schreck's avatar Carl Schreck

Fixed snotel station type

parent f6ceceec
......@@ -49,7 +49,7 @@ def draw_station_type(ax, path, lat_column=1, lon_column=2, time_column=6):
colors = cjs.tab[[0, 3, 2, 1]]
station_type = np.full(lat.shape, fill_value=3)
station_type = np.where(network == 'R', 0, station_type)
station_type = np.where(network == 'W', 1, station_type)
station_type = np.where(network == 'S', 1, station_type)
station_type = np.where(obs_time == 2400, 2, station_type)
# R/S is 0000. C/W is NWS and can be anything... 2400 not 0000
......@@ -57,7 +57,7 @@ def draw_station_type(ax, path, lat_column=1, lon_column=2, time_column=6):
groups = df.groupby('station_type')
for type_ind, group in groups:
ax.plot(group.lon, group.lat, transform=ccrs.PlateCarree(),
marker='.', linestyle='', label=labels[type_ind],
marker='.', markersize=1, linestyle='', label=labels[type_ind],
zorder=zorders[type_ind], c=colors[type_ind])
ax.legend(labels=labels, loc='upper center', bbox_to_anchor=[0.5, 0],
ncol=2)
......
......@@ -28,7 +28,7 @@ station_path = f'{base_path}{var_name.upper()}19890203map.txt'
unscaled_path = f'{base_path}{var_name.upper()}_19890203_D6_A2.pnt.gz'
scaled_path = f'{base_path}{var_name.upper()}-198902-grd-scaled.nc'
levels = np.arange(-40, 20, 5)
levels = np.arange(-35, 15, 5)
# cmap = cm.get_cmap('bwr', lut=(len(levels) + 1))
cmap = 'RdBu_r'
......@@ -57,7 +57,7 @@ plot = unscaled_data.plot(ax=ax, transform=ccrs.PlateCarree(),
}
)
ax.set_title('b) Unscaled data', loc='left')
ax.set_extent([-120.0, -100.0, 35.0, 45.0])
ax.set_extent([-115.0, -100.0, 35.0, 42.5])
ax.outline_patch.set_visible(True)
ax.set_anchor('N')
......@@ -76,7 +76,7 @@ plot = scaled_data.plot(ax=ax, transform=ccrs.PlateCarree(),
}
)
ax.set_title('c) Scaled data', loc='left')
ax.set_extent([-120.0, -100.0, 35.0, 45.0])
ax.set_extent([-115.0, -100.0, 35.0, 42.5])
ax.outline_patch.set_visible(True)
ax.set_anchor('N')
......@@ -107,7 +107,7 @@ ax.set_anchor('N')
cjs.tstamp('Drawing figure')
plt.tight_layout()
plt.savefig('figures/temp_steps.png')
plt.savefig('figures/temp_steps.png', dpi=300)
plt.show()
cjs.tstamp('Thank you, come again.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment