I have an xarray DataArray that looks like this below with shape (1,5,73,144,17) and I'm trying to drop or delete the "level" coordinates. So, ultimately, i need the variable to have shape = (1,5,73,144).
stdna
Out[717]:
<xarray.DataArray 'stack-6e9b86fc65e3f0fda2008a339e235bc7' (variable: 1, week: 5, lat: 73, lon: 144,
level: 17)>
dask.array<stack, shape=(1, 5, 73, 144, 17), dtype=float32, chunksize=(1, 1, 73, 144, 17),
chunktype=numpy.ndarray>
Coordinates:
* lon (lon) float32 0.0 2.5 5.0 7.5 10.0 ... 350.0 352.5 355.0 357.5
* lat (lat) float32 90.0 87.5 85.0 82.5 80.0 ... -82.5 -85.0 -87.5 -90.0
* level (level) float32 1000.0 925.0 850.0 700.0 ... 50.0 30.0 20.0 10.0
* week (week) int64 5 6 7 8 9
* variable (variable) <U3 'hgt'
I've taken a look to the xarray documentation and it's not helping. I've tried different combinations around this idea but i usually get the statement below and the coordinate has not been removed:
s = stdna.drop('level', dim=None)
Dimensions without coordinates: level
Thank you for your help!
