Code Monkey home page Code Monkey logo

Comments (8)

brry avatar brry commented on July 19, 2024 1

Hey thanks so much for the pointers! I was not aware of that. It's not perfect as the rdwd maintainer to not follow r-spatial, but time limitations and other real life annoyances get in the way...

I plan to implement stars for grib2 in the next days (before the next CRAN release).

from rdwd.

brry avatar brry commented on July 19, 2024 1

I added terra and stars support to readDWD.grib2() and noted in the examples which files work and which don't.
terra has a plot function that works out of the box (see the new examples), so I set that as the default pack.

I will close this issue now, but anybody may feel free to reopen it if changes are needed.

from rdwd.

brry avatar brry commented on July 19, 2024 1

rgdal will be retired 2023, so the rgdal option will be removed. Any contrary wishes can be posted here, of course :)

from rdwd.

brry avatar brry commented on July 19, 2024

I think it worked in January even though GDAL and icon seem to be incompatible since 2018: OSGeo/gdal#1018:
back then I used a file in ftp-cdc.dwd.de/weather/nwp/cosmo-d2/grib/00/t_2m
On the new opendata.dwd.de/weather/nwp, the cosmo-d2 folder no longer exists, see tree

from rdwd.

brry avatar brry commented on July 19, 2024

See also https://www.dwd.de/DE/leistungen/opendata/neuigkeiten/opendata_aug2020_01.html which says

The grid definition file for ICON-D2/ICON-D2-EPS (Germany) is available at: https://opendata.dwd.de/weather/lib/cdo/icon_grid_0047_R19B07_L.nc.bz2
and
Guide for converting the original ICON triangular grid into a regular lat/lon grid:
https://www.dwd.de/DE/leistungen/opendata/help/modelle/Opendata_cdo_EN.pdf

from rdwd.

dimfalk avatar dimfalk commented on July 19, 2024

Hey Berry,

having retirement of rgdal, rgeos and maptools by the end of 2023 in mind, have you considered migrating to {stars}?

stars::read_stars("*.grib2") seems to do the job.

PS:

On the new opendata.dwd.de/weather/nwp, the cosmo-d2 folder no longer exists, see tree

COSMO-D2 has been decommissioned in favor of ICON-D2, somewhere in 02/2021, as far as I remember.

from rdwd.

dimfalk avatar dimfalk commented on July 19, 2024

You're very welcome! No worries, maintainance can be quite time-consuming.. 😏

from rdwd.

dimfalk avatar dimfalk commented on July 19, 2024

Small remark since I have to mess around with raster packages at the moment:

stars::read_stars() seems to fail for the icon-d2_germany_icosahedral_model-level_*.grib2.bz2 files:

trying to read file: C:\Temp\icon-d2_germany_icosahedral_model-level_2022051903_000_14_p.grib2
Error in CPL_read_gdal(as.character(x), as.character(options), as.character(driver),  : 
  file not found
In addition: Warning message:
In CPL_read_gdal(as.character(x), as.character(options), as.character(driver),  :
  GDAL Error 4: C:\Temp\icon-d2_germany_icosahedral_model-level_2022051903_000_14_p.grib2 is a grib file, but no raster dataset was successfully identified.

icon-d2_germany_regular-lat-lon_model-level_*.grib2.bz2 files work fine with stars::read_stars().

However, there is also terra being able to read grib2 via terra::rast("*.grib2"). No idea yet which one to prefer in which use case tbh.

from rdwd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.