google-deepmind / graphcast

Apache License 2.0
4.36k stars 537 forks source link

Create a grib file of the predictions #39

Closed sailgrib closed 5 months ago

sailgrib commented 6 months ago

Hi everybody,

I am trying to create a grib file with a subset (10 meter wind and pressure at sea level) of the predictions but do not succeed. Can you help me creating a grib file?

Thanks,

Henri

jblestang commented 6 months ago

Glad to see someone wondering about GRIB generation from GraphCast! Are you able to generate the prediction? If yes then generating the Hrin shall be relatively straight forward. What is the blocking point?

jblestang commented 6 months ago

xarray.Dataset can be converted to netcdf format and netcdf can be converted to grib using cdo (install using apt install cdo)

sailgrib commented 6 months ago

Thanks, I was missing the intermediate conversion to netcdf.

Le dim. 7 janv. 2024, 14:45, jblestang @.***> a écrit :

xarray.Dataset can be converted to netcdf format and netcdf can be converted to grib using cdo (install using apt install cdo)

— Reply to this email directly, view it on GitHub https://github.com/google-deepmind/graphcast/issues/39#issuecomment-1880064343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIF7QS46473F6UIQIA2JBOTYNKRIPAVCNFSM6AAAAABAZR2AISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGA3DIMZUGM . You are receiving this because you authored the thread.Message ID: @.***>

jblestang commented 6 months ago

You can run cdo -f grb copy input.nc output.grb to convert.

mjwillson commented 5 months ago

Closing as sounds like this is solved. GRIB output isn't something we directly support in this codebase but you can do it yourself as noted above.