4 Package structure

To use the observational datasets, rdwd has been designed to mainly do 3 things:

  • selectDWD: facilitate file selection, needing:
    • station id/name/location (see chapter station selection)
    • temporal resolution (res = 1/10 minutes, hourly, daily, monthly, annual)
    • variables (var = temperature, rain, wind, sun, clouds, etc)
    • observation period (per = historical long term records or the current year)
  • dataDWD: download a file (or multiple files), without re-downloads for existing files

  • readDWD: read that data into R (including useful defaults for metadata)

selectDWD uses the result from indexFTP which recursively lists all the files on an FTP-server (using RCurl::getURL). As this is time consuming, the result is stored in the package dataset fileIndex. From this, metaIndex and geoIndex are derived.