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
I recently updated the land_check function to keep into account changes within xarray concat which were breaking the previous versions. Could you tell me what version of xarray, numpy etc are you using?
It might be possible that the changes introduced break with older version, I didn't;'t have time to test it, so it's just speculation on my part
Yes the changes introduced with 0.9 versions requires newer versions of xarray, or at least they were introduced to work with changes within xarray. Try 0.8.1 that should work with the packages you listed
Hey,
I am using a subset of NOAA OISST.
ds=xr.open_dataset('sst.day.mean.1982_2019.v2.nc')
sst=ds['sst']
<xarray.DataArray 'sst' (time: 13879, lat: 720, lon: 1440)>
[14389747200 values with dtype=float32]
Coordinates:
Attributes:
with a subset
In [123]: sst_select
Out[123]:
<xarray.DataArray 'sst' (time: 13879, lat: 4, lon: 4)>
array([[[26.949999, 27.029999, 27.07 , 27.14 ],
[26.8 , 26.869999, 27.109999, 27.26 ],
[26.98 , 27.109999, 27.23 , 27.39 ],
[27.17 , 27.32 , 27.47 , 27.66 ]],
Coordinates:
clim=threshold(sst_select)
breaks with
File ~/.conda/envs/def39x/lib/python3.9/site-packages/xmhw/xmhw.py:138 in threshold
ts = land_check(temp, tdim=tdim, anynans=anynans)
File ~/.conda/envs/def39x/lib/python3.9/site-packages/xmhw/identify.py:521 in land_check
ts = temp.stack(cell=(sorted(dims)), create_index=False)
File ~/.conda/envs/def39x/lib/python3.9/site-packages/xarray/core/dataarray.py:2138 in stack
ds = self._to_temp_dataset().stack(dimensions, **dimensions_kwargs)
File ~/.conda/envs/def39x/lib/python3.9/site-packages/xarray/core/dataset.py:3929 in stack
result = result._stack_once(dims, new_dim)
File ~/.conda/envs/def39x/lib/python3.9/site-packages/xarray/core/dataset.py:3865 in _stack_once
if ... in dims:
TypeError: argument of type 'bool' is not iterable
Something does not behave when stacking into 'one long vector'
ts = temp.stack(cell=(sorted(dims)), create_index=False)
Best regards
Erik
PS: Works fine when only applied as a timeseries
The text was updated successfully, but these errors were encountered: