Search code examples
python-xarraygrib

How to I write a grib object to a grib file?


I have a grib object directly in my temps after importing it from Copernicus. Now I need to save it as a grib file. Could you please tell me how ? Knowing that to_grib is a function used to write xarray to grib file. Thanks a lot for your answers.


Solution

  • ds.to_netcdf("output.grib", engine="cfgrib")