You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fig = plot(model, obs, regridded, valid_mask)
/net2/rnd/anaconda3/envs/repro/lib/python3.8/site-packages/cartopy/mpl/geoaxes.py:1491: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3. Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading']. This will become an error two minor releases later.
X, Y, C = self._pcolorargs('pcolormesh', *args, allmatch=allmatch)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-20-8404f36099d9> in <module>
----> 1 fig = plot(model, obs, regridded, valid_mask)
/net2/rnd/anaconda3/envs/repro/lib/python3.8/site-packages/om4labs-0.0.1-py3.8.egg/om4labs/diags/seaice/seaice.py in plot(model, obs, regridded, valid_mask, label, region, month)
272 plotdata = (model["ac"][month_index] * 100.0).to_masked_array()
273 plotdata = np.ma.masked_where(valid_mask, plotdata)
--> 274 cb1 = _plot_map_panel(ax, x, y, plotdata, extent=extent)
275 ax.set_title(f"Model - Years {model.time[0]} to {model.time[1]}")
276 fig.colorbar(
/net2/rnd/anaconda3/envs/repro/lib/python3.8/site-packages/om4labs-0.0.1-py3.8.egg/om4labs/diags/seaice/seaice.py in _plot_map_panel(ax, x, y, plotdata, cmap, vmin, vmax, extent, contour)
235 cmap.set_bad(color="#555555", alpha=1)
236 ax.set_extent(extent, ccrs.PlateCarree())
--> 237 cb = ax.pcolormesh(
238 x, y, plotdata, transform=ccrs.PlateCarree(), cmap=cmap, vmin=vmin, vmax=vmax
239 )
/net2/rnd/anaconda3/envs/repro/lib/python3.8/site-packages/cartopy/mpl/geoaxes.py in pcolormesh(self, *args, **kwargs)
1457 ' consider using PlateCarree/RotatedPole.')
1458 kwargs.setdefault('transform', t)
-> 1459 result = self._pcolormesh_patched(*args, **kwargs)
1460 self.autoscale_view()
1461 return result
/net2/rnd/anaconda3/envs/repro/lib/python3.8/site-packages/cartopy/mpl/geoaxes.py in _pcolormesh_patched(self, *args, **kwargs)
1489 allmatch = (shading == 'gouraud')
1490
-> 1491 X, Y, C = self._pcolorargs('pcolormesh', *args, allmatch=allmatch)
1492 Ny, Nx = X.shape
1493
ValueError: too many values to unpack (expected 3)
too many computations/reductions are made in the plot function which is against the design of having calculate output numpy arrays ready for the plot part
The text was updated successfully, but these errors were encountered:
plot function does not work:
too many computations/reductions are made in the plot function which is against the design of having
calculate
output numpy arrays ready for theplot
partThe text was updated successfully, but these errors were encountered: