Generates an object of class eupp_config Containing all the required settings for downloadin data set inventories (index files) and the data itself.

eupp_config(
  product = c("analysis", "forecast", "reforecast"),
  level = c("surface", "pressure", "efi"),
  type = c("ens", "hr"),
  date,
  parameter = NULL,
  steps = NULL,
  members = NULL,
  area = NULL,
  cache = NULL,
  version = 0L
)

Arguments

product

character of length 1 (see Details).

level

character of length 1 or NULL (see Details).

type

character of length 1 (see Details).

date

an object which can be converted to POSIXct. Character string in ISO representation or an object of class Date or POSIXt.

parameter

NULL (default) or character. When NULL all available parameters will be processed. Can be used to retrieve/process subsets.

steps

NULL (default) or integer. If set to NULL all available forecast steps will be processed. An integer sequence can be provided to only process specific forecast steps; given in hours (e.g., c(6, 12) for +6 and +12 hour ahead forecasts).

members

NULL (default) or integer. If set to NULL all available forecast members will be processed. An integer sequence can be provided to only process specific forecast members.

area

NULL (default) or an object of class bbox. Used for spatial subsetting.

cache

NULL or character of length 1 pointing to an existing directory. Is used for data caching (caching grib index information/inventories) which can be handy to save some time.

version

integer lengt 1; version of the data set. Defaults to 0L. Typically not changed by an end-user.

Value

Returns an object of class eupp_config.

Details

Input argument product:

  • "reforecast": Reforecasts (or hindcasts).

  • "forecast": Forecast data.

  • "analysis": Analysis data; based on ECMWF ERA5 used as ground truth.

Input argument level. Will be ignored if type = "efi" (has no level).

  • "efi": Extreme forecast index (in this situation type will be ignored).

  • "surf": Surface data.

  • "pressure": Pressure level data.

Input argument type:

  • "ens": Ensemble members including control run (allows for optional argument members).

  • "hr": High-resolution forecast.

Note that reforecasts always only become available on Mondays and Thursdays. If type = "reforecast" and the date does not point to Mon/Thu the function will throw an error. TODO(R): This is not true, this happens when processing the data.

Ensemble forecasts (type = "ens" consists of both, the ensemble control run plus 50 ensemble members if members is not specified. Same is true for reforecasts except that it only consists of 20 ensemble members. Possible combinations:

IDproductleveltype
1analysissurfaceNULL
2pressureNULL
11forecastefi
12surfaceens
13hr
14pressureens
15hr
21reforecastsurfaceens
22pressureens

Author

Reto Stauffer

Examples


# Analysis
c1 <- eupp_config("analysis", "surface", date = "2017-01-01", steps = 12)
c2 <- eupp_config("analysis", "pressure", date = "2017-01-01", steps = 12)

# Forecasts
c11 <- eupp_config("forecast", "efi", date = "2017-01-01", steps = 12)
c12 <- eupp_config("forecast", "surface", "ens", date = "2017-01-01", steps = 12)
c13 <- eupp_config("forecast", "surface", "hr", date = "2017-01-01", steps = 12)
c14 <- eupp_config("forecast", "pressure", "ens", date = "2017-01-01", steps = 12)
c15 <- eupp_config("forecast", "pressure", "hr", date = "2017-01-01", steps = 12)

# Reforecasts
c21 <- eupp_config("reforecast", "surface", "ens", date = "2017-01-02", steps = 12)
c22 <- eupp_config("reforecast", "pressure", "ens", date = "2017-01-02", steps = 12)