psy-view icon indicating copy to clipboard operation
psy-view copied to clipboard

Fails to plot arrays with all values being zero

Open tobstac opened this issue 3 years ago • 0 comments

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!

tobstac avatar Aug 31 '22 11:08 tobstac