You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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")
Activity
[-]Problem with NetCFD4 file from CDS[/-][+]BUG: Problem with NetCFD4 file from CDS[/+]robbestephan commentedon Nov 15, 2024
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
Gui-FernandesBR commentedon Nov 23, 2024
Amazing work at #736 , I'm closing this issue as solved! NExt release (v1.7.0) should be out soon!