I have a dataset (ds) loaded from a netcdf file in xarray that looks like this:
Where the coordinates (lon, lat) and the data variable (tasmax) are tied to the region dimension. Instead of region, I'd like the dimensions to be lat, lon, time. When I try to remove the region dimension using ds.drop_dim('region') I end up with this:
Which makes it so anything tied to region is gone. How can I reset the dimensions on this dataset so that they are based on lat, lon, and time?
source https://stackoverflow.com/questions/70160807/removing-a-dimension-from-netcdf-file-in-xarray


Comments
Post a Comment