Commit 684b73aa authored by Carl Schreck's avatar Carl Schreck

Automated Daily Commit - Wed Apr 29 12:02:53 EDT 2020

parent 9b8ec8f6
......@@ -59,7 +59,7 @@ def draw_station_type(ax, path, lat_column=1, lon_column=2, time_column=6):
ax.plot(group.lon, group.lat, transform=ccrs.PlateCarree(),
marker='.', linestyle='', label=labels[type_ind],
zorder=zorders[type_ind], c=colors[type_ind])
ax.legend(labels=labels, loc='lower right')
ax.legend(labels=labels, loc='lower left')
return asc_data
......
......@@ -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(-30, 35, 5)
levels = np.arange(-40, 35, 5)
# cmap = cm.get_cmap('bwr', lut=(len(levels) + 1))
cmap = 'RdBu_r'
......@@ -54,7 +54,9 @@ plot = unscaled_data.plot(ax=ax, transform=ccrs.PlateCarree(),
)
ax.set_title('c) Unscaled data')
ax.set_extent([-100.0, -80.0, 30.0, 40.0])
plt.savefig(f'figures/{var_name}_unscaled.png')
plt.savefig(f'figures/{var_name}_unscaled_east.png')
ax.set_extent([-120.0, -100.0, 35.0, 45.0])
plt.savefig(f'figures/{var_name}_unscaled_west.png')
cjs.tstamp('Drawing scaled data')
fig, ax = plt.subplots(nrows=1, ncols=1,
......@@ -69,7 +71,9 @@ plot = scaled_data.plot(ax=ax, transform=ccrs.PlateCarree(),
)
ax.set_title('d) Scaled data')
ax.set_extent([-100.0, -80.0, 30.0, 40.0])
plt.savefig(f'figures/{var_name}_scaled.png')
plt.savefig(f'figures/{var_name}_scaled_east.png')
ax.set_extent([-120.0, -100.0, 35.0, 45.0])
plt.savefig(f'figures/{var_name}_scaled_west.png')
cjs.tstamp('Drawing difference data')
......@@ -84,20 +88,12 @@ plot = diff_data.plot(ax=ax, transform=ccrs.PlateCarree(),
vmin = -np.inf, vmax = np.inf, extend = 'both',
)
ax.set_title('d) Scaled minus unscaled')
plt.savefig(f'figures/{var_name}_diff_conus.png')
ax.set_extent([-100.0, -80.0, 30.0, 40.0])
plt.savefig(f'figures/{var_name}_diff_zoom.png')
plt.savefig(f'figures/{var_name}_diff_east.png')
ax.set_extent([-120.0, -100.0, 35.0, 45.0])
plt.savefig(f'figures/{var_name}_diff_west.png')
cjs.tstamp('Drawing difference data')
fig, ax = plt.subplots(nrows=1, ncols=1,
subplot_kw={'projection': cjs.conus_projection})
cjs.add_conus_map(ax=ax)
diff_data = scaled_data - unscaled_data
plot = diff_data.plot(ax=ax, transform=ccrs.PlateCarree(),
add_colorbar=True,
cmap=cmap, levels=levels, zorder=1,
extend='both', vmin=-np.inf, vmax=np.inf)
ax.set_title('d) Scaled minus unscaled')
plt.savefig(f'figures/{var_name}_diff_wide.png')
# cjs.tstamp('Add colorbar')
# fig.subplots_adjust(bottom=0.2)
......
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