Closed robbestephan closed 2 hours ago
It seems that the NetCDF4 file I get from CDS have dict keys 'valid_time' instead of 'time' and 'pressure_level' instead of 'level' renaming them seems to have solved the problem
import xarray as xr
# Load the NetCDF file
file_path = "reanalysis.nc"
ds = xr.open_dataset(file_path)
# Rename time and pressure
ds = ds.rename({"valid_time": "time"})
ds = ds.rename({"pressure_level": "level"})
# Save the modified dataset
ds.to_netcdf("reanalysis_fix.nc")
Amazing work at #736 , I'm closing this issue as solved! NExt release (v1.7.0) should be out soon!
Describe the bug
I run into problems with my NetCFD4 file gathered from CDS.
To Reproduce This is my code, the .nc file is not supported to add as an attachment here. I gathered the data from here: https://cds.climate.copernicus.eu/datasets/reanalysis-era5-pressure-levels?tab=overview
Expected behavior
I expected to get plots of the atmosphere and eventually implement it into our simulations
Screenshots
Here is the data request I did from CDS:
Additional context
Add any other context about the problem here.