From 1aa4f89751f7a9c47fde6d5fddb6bb612296529e Mon Sep 17 00:00:00 2001 From: Bing Gong <b.gong@fz-juelich.de> Date: Mon, 13 Sep 2021 12:07:32 +0200 Subject: [PATCH] Update plot_ambs_forecast.py --- video_prediction_tools/postprocess/plot_ambs_forecast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/video_prediction_tools/postprocess/plot_ambs_forecast.py b/video_prediction_tools/postprocess/plot_ambs_forecast.py index 1f7da969..69ac8bf2 100644 --- a/video_prediction_tools/postprocess/plot_ambs_forecast.py +++ b/video_prediction_tools/postprocess/plot_ambs_forecast.py @@ -85,10 +85,10 @@ def create_plot(data: xr.DataArray, data_ref: xr.DataArray, varname: str, fcst_h m.drawparallels(np.arange(0, 90, 5),labels=lat_lab, xoffset=0.5) m.drawmeridians(np.arange(5, 355, 10),labels=lon_lab, yoffset=0.5) if t == 0: - cs = m.contourf(x, y, data.isel(time_forecast=fcst_hour)-273.15, clevs, cmap=plt.get_cmap("jet"), ax=axes[t]) + cs = m.contourf(x, y, data.isel(fcst_hour=fcst_hour)-273.15, clevs, cmap=plt.get_cmap("jet"), ax=axes[t]) cbar_ticks = None elif t == 1: - cs = m.contourf(x, y, data.isel(time_forecast=fcst_hour)-data_ref.isel(time_forecast=fcst_hour), + cs = m.contourf(x, y, data.isel(fcst_hour=fcst_hour)-data_ref.isel(fcst_hour=fcst_hour), clevs_diff, cmap=plt.get_cmap("PuOr"), ax=axes[t]) cbar_ticks = list(np.arange(-10.5, -2., 2.)) + [-0.5, 0.5] + list(np.arange(2.5, 10.6, 2.)) print(cbar_ticks) -- GitLab