Replies: 1 comment 2 replies
-
There must be some floating point mismatch between what's in |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working with an ocean dataset and am plotting some field (see attachment) versus depth at some (lon, lat) location. Those weirdly large values at the bottom three vertical levels are the FillValues in the netcdf file. I am not sure why xarray is not masking these automatically for this particular dataset as in others, I would not even see those points. So I tried to manually change the FillValue attribute in the encoding but it does not seem to work:
ds['var'].encoding['_FillValue']=np.nan
ds['var'].encoding['missing_value']=np.nan
When I plot the field ds['var'], I am still seeing the FillValue in the plot. Is there some other way to modify the encoding?
[Edits: 1. I have since tried
mask_and_scale=True
in thexr.open_dataset
step but to no avail.2.
temp=xr.where(ds['var'] != ds['var'].encoding['_FillValue'],ds['var'],np.nan)]
also does not work. ]Beta Was this translation helpful? Give feedback.
All reactions