I have this dataset with as possible coordinates stations, lat, lon and time. Right now the dataset uses (stations, time) as dimensions but I would like it to use (lat, lon, time).
I looked online and found how to swap dimensions but I could only find it applied to swapping one dimension.
Any suggestions on how to do this?
<xarray.Dataset>
Dimensions: (stations: 11, time: 7320)
Coordinates:
* stations (stations) int64 11425 11426 11427 11428 ... 11433 11434 11435
lat (stations) float64 39.54 39.36 39.24 39.07 ... 38.07 37.9 37.81
lon (stations) float64 -74.25 -74.4 -74.6 ... -75.19 -75.34 -75.51
* time (time) datetime64[ns] 2010-02-01 ... 2010-02-06T01:59:00
Data variables:
waterlevel (time, stations) float64 0.0002405 0.0002313 ... -0.01266