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")
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.
The text was updated successfully, but these errors were encountered: