brry / rdwd

download climate data from DWD (German Weather Service)
https://bookdown.org/brry/rdwd
72 stars 13 forks source link

metaInfo() - start/end date #32

Closed ERottler closed 3 years ago

ERottler commented 3 years ago

Hi Berry!

Cool package! Just using it to look at some precipitation data. When searching available data sets for stations using metaInfo(), however, it seems that the time span printed for the folders historic and recent (or now) is the same for the variables. Shouldn't from/to indicate what data actually is available in the respective folder? Below the example output I get for the station Langerwish:

metaInfo(id=2863) rdwd station id 2863 with 6 files. Name: Langerwisch, State: Brandenburg
res var per hasfile from to lat long ele 1 annual more_precip historical TRUE 1974-01-01 2020-12-31 52.3175 13.0679 40 2 daily more_precip historical TRUE 1974-01-01 2021-05-31 52.3175 13.0679 40 3 monthly more_precip historical TRUE 1974-01-01 2021-04-30 52.3175 13.0679 40 4 annual more_precip recent TRUE 1974-01-01 2020-12-31 52.3175 13.0679 40 5 daily more_precip recent TRUE 1974-01-01 2021-05-31 52.3175 13.0679 40 6 monthly more_precip recent TRUE 1974-01-01 2021-04-30 52.3175 13.0679 40

Erwin

brry commented 3 years ago

The dates come from the _Beschreibung_Stationen.txt files, e.g. this one, using the createIndex code. Essentially, this is a mistake on the DWD side, as far as I can tell.
Any suggestions how to improve the dates are welcome!

brry commented 3 years ago

Maybe this could be coupled with the date info from the historical file names. Do you think it's worth the effort?
I remember that the time stamps in the file names did not always match the actually available time series either...

brry commented 3 years ago

You could also contact the DWD about this and let me know what they say...
Contact at the end of https://bookdown.org/brry/rdwd/fileindex.html#metaindex

ERottler commented 3 years ago

Hi! Yes, you are right. In the 'Beschreibung_Stationen' files the dates do not get updated correctly for the different folders. Which is fine, I guess. I only was a bit confused, as I did not work that much with DWD-data and rdwd yet and also needed to look up again what historical, recent and now actually means. Thank you for your answer!

There is just one more thing. Just to make sure I understand correctly. The DWD-inventory I search with the function metaInfo() is not the current one from the DWD server, but an inventory you got some day (rdwd/data/metaIndex.rda - currently last update around first of June), right? And you update this file from time to time when you push to the repository?

Erwin

brry commented 3 years ago

Hi Erwin,

You're welcome. Do you think adding columns with date ranges according to filenames would be worth the effort?

Exactly as you say: metaInfo uses the inventory I update every once in a while, lastly on June 2. See https://bookdown.org/brry/rdwd/fileindex.html for more info.

ERottler commented 3 years ago

Hi!

It only would be a small enhancement of the package, I guess. Not sure weather it is worth the effort. Maybe it is better to add a short comment at the end of the output of metaInfo()? When the last inventory update was made? Something like:

"Files and meta information listed are according to the DWD inventory from XX.XX.XXXX. For a current overview got to/use..."

But this actually is described in the bookdown...

Erwin

brry commented 3 years ago

I finally found the time to adress this. The update is coming up :)