Timestamps of HYRAS data not recognized

Issue #9 resolved
jamaa created an issue

The German Weather Service (DWD) provides a hydrometeorological raster dataset called HYRAS as open data. HYRAS data is in NetCDF format and is available as daily and monthly datasets. Unfortunately, the RasterTimeSeriesManager plugin does not recognize the timestamps in these datasets (reverts to _deriveFromFallback for the timestamps).

Looking at the metadata of these files, it seems like all the required information is there, (see attached output of gdalinfo for a daily dataset), but is just not recognized by the plugin.

I cannot attach sample files here because they are too large, but below are some links for obtaining them:

Description: https://www.dwd.de/DE/leistungen/hyras/hyras.html / https://opendata.dwd.de/climate_environment/CDC/grids_germany/daily/hyras_de/precipitation/DESCRIPTION_GRD_DEU_P1D_RR_HYRAS-DE.pdf

Daily datasets: https://opendata.dwd.de/climate_environment/CDC/grids_germany/daily/hyras_de/precipitation/

Monthly datasets: https://opendata.dwd.de/climate_environment/CDC/grids_germany/monthly/hyras_de/precipitation/

I would like to be able to use RasterTimeseriesManager for HYRAS data. I would be happy to attempt to implement it myself (are you open to accepting pull requests?). If you have any ideas or suggestions on how to best implement this please let me know.

Comments (11)

  1. Andreas Janz repo owner

    A pull request is fine for me. This way DWD files con be used as is.

    As a second solution, you could simple prepare your NC files by setting the correct metadata:
    https://raster-timeseries-manager.readthedocs.io/en/latest/content.html#data-format

    from osgeo import gdal
    
    ds = gdal.Open(nc_filename)
    ds.SetMetadataItem('names', '{precipitation}', 'TIMESERIES')
    ds.SetMetadataItem('dates', '{1990-01-01, ... 2000-12-01}', 'TIMESERIES')
    

    Those information will be stored in the GDAL PAM sidecar file:

  2. Andreas Janz repo owner

    BTW - are you familiar with the QGIS Temporal Controller (TC)?

    You can prepare your dataset with that button and use it in the QGIS TC:

  3. jamaa reporter

    Yes, I saw that and tried it. Very cool! It has to create an individual layer for each timestamp though, which can become a bit much. I wish the TC was able to treat bands as timesteps.

    Are you going to publish a new plugin version soon? Then my non-developer colleagues can use it to view HYRAS data as well :-)

  4. Andreas Janz repo owner

    Are you going to publish a new plugin version soon? Then my non-developer colleagues can use it to view HYRAS data as well :-)

    Yes, I will publish it soon 🙂

  5. Log in to comment