time (time) datetime64[ns] 2019-06-01 2019-07-01 2019-08-01 2019-09-01
Attributes:
units: m s**-1
long_name: U component of wind
standard_name: eastward_wind
the error message are as following:
uwnd, uwnd_info = prep_data(uwnd, 'tzyx')
File "/g3/liuchong/software/anaconda3/lib/python3.8/site-packages/windspharm/tools.py", line 97, in prep_data
pdata, intorder = __order_dims(data, dimorder)
File "/g3/liuchong/software/anaconda3/lib/python3.8/site-packages/windspharm/tools.py", line 35, in __order_dims
d = np.rollaxis(d, lonpos)
File "<__array_function__ internals>", line 5, in rollaxis
File "/g3/liuchong/software/anaconda3/lib/python3.8/site-packages/numpy/core/numeric.py", line 1274, in rollaxis
return a.transpose(axes)
File "/g3/liuchong/software/anaconda3/lib/python3.8/site-packages/xarray/core/dataarray.py", line 2036, in transpose
dims = tuple(utils.infix_dims(dims, self.dims))
File "/g3/liuchong/software/anaconda3/lib/python3.8/site-packages/xarray/core/utils.py", line 724, in infix_dims
if set(dims_supplied) ^ set(dims_all):
**TypeError: unhashable type: 'list'**
I use xarray to read netcdf data
import xarray as xr from windspharm.xarray import VectorWind from windspharm.tools import prep_data, recover_data, order_latdim from windspharm.examples import example_data_path nc = xr.open_dataset('era5/era5_3d_201906070809.nc') uwnd = nc.u uwnd, uwnd_info = prep_data(uwnd, 'tzyx')
the error message are as following:
how to fix this? Thanks