get_radolan_urls: Get URLs to Available Radolan Files

View source: R/get_radolan_urls.R

get_radolan_urlsR Documentation

Get URLs to Available Radolan Files

Description

Get URLs to available radolan files on the DWD FTP server below this base address: ftp://opendata.dwd.de/climate_environment/CDC/grids_germany. The user can choose between daily records and hourly records that are located at different paths on the server. The paths to the files are not read from the FTP server but generated, given the knowledge of where the files should reside and how they are expected to be named.

Usage

get_radolan_urls(
  start_daily = "2006-10",
  start_hourly = "2005-06",
  end_daily = format(format = "%Y-%m", lubridate::rollback(Sys.Date(), roll_to_first =
    TRUE)),
  end_hourly = end_daily,
  ...
)

Arguments

start_daily

month string (yyyy-mm) of first daily record. Default: "2006-10"

start_hourly

month string (yyyy-mm) of first hourly record. Default: "2005-06"

end_daily

month string (yyyy-mm) of last daily record. Defaults to the current month.

end_hourly

month string (yyyy-mm) of last hourly records. Defaults to end_daily.

...

further arguments passed to kwb.dwd:::get_radolan_url, such as ftp_root

Value

list with "daily_historical_urls" and "hourly_historical_urls"

Examples

# Get all expected URLs
urls <- kwb.dwd::get_radolan_urls()

# Show the first URLs of each category (daily, hourly)
head(urls$daily_historical_urls)
head(urls$hourly_historical_urls)

# Set the start and end months
urls <- kwb.dwd::get_radolan_urls(
  start_daily = "2017-01", end_daily = "2017-03"
)

urls$daily_historical_urls


KWB-R/kwb.dwd documentation built on Sept. 28, 2022, 6:03 p.m.