I am new to working with NetCDF datasets and Xarray in Python. I have an xarray dataset made from 100 TIFF raster files:

enter image description here

As you can see there are 100 data variables, that are essentially the individual tifs:

enter image description here

Now, I want to add time as an additional dimension with band, x, and y. Since I have 100 variables, I created a time series with 100 timestamps (just as a random test):

timestamps = pd.date_range("2020-01-01", periods=100)

But when I try to add it as a new dimension, it throws and error RuntimeError: NetCDF: HDF error.

What do I need to do to get this to work?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.