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
Describe the bug
CMIP6 EC-Earth ocean 3D data has the whole bottom depth layer set to masked values. Both the variables and the volcello. The volume_statistics preproc computes the weighted mean per layer just fine, and for the bottom layer the results are masked as well. But when it comes to computing the weighted mean over the water volume, the presence of masked values sets the results to NaNs and the data comes out of the preprocessing empty:
It looks like the function np.average is not handling well the presence of layers with only masked values. Would it be correct check and remove this sort of layers before calling np.average ?
Please attach
I'm working with EC-Earth local data and can't seem to find Ecearth data with volcello on /badc, sorry.
The text was updated successfully, but these errors were encountered:
this is more of a scientific question (well, statistical) - @ledm I believe is the person to ask - I would definitely replace it with numpy masked mean though 🍺
Although there might be another error if the volume includes masked values. I don't know whether numpy.ma.average is able to receive a masked array in the weights argument. Worth checking, it's not explicitly mentioned in the documentation.
Describe the bug
CMIP6 EC-Earth ocean 3D data has the whole bottom depth layer set to masked values. Both the variables and the volcello. The volume_statistics preproc computes the weighted mean per layer just fine, and for the bottom layer the results are masked as well. But when it comes to computing the weighted mean over the water volume, the presence of masked values sets the results to NaNs and the data comes out of the preprocessing empty:
result.append(np.average(column, weights=depth_volume))
It looks like the function
np.average
is not handling well the presence of layers with only masked values. Would it be correct check and remove this sort of layers before callingnp.average
?Please attach
I'm working with EC-Earth local data and can't seem to find Ecearth data with volcello on /badc, sorry.
The text was updated successfully, but these errors were encountered: