psyplot / psy-view

An ncview-like GUI with psyplot
https://psyplot.github.io/psy-view
17 stars 2 forks source link

Fails to plot arrays with all values being zero #61

Open tobstac opened 2 years ago

tobstac commented 2 years ago

Problem description

Checking the different variables in a dataset can result in

ValueError: x and y arguments to pcolormesh cannot have non-finite values or be of type numpy.ma.core.MaskedArray with masked values

if a field contains only zeros or missing values.

Expected Output

Plot it anyway. It might be a bit unnecessary in most cases as there is no information in it besides that a field is all zero (which, still, would be interesting for field containing any kind of mass balance and such). Also it might screw up further plots which are shown with additional (empty) colorbars for whatever reason.

I would very much appreciate if this could be fixed.

Thanks and best regards!