This manual shows how to download forecast data which includes both high-resolution forecasts (the deterministic run) as well as ensemble forecasts (there is a dedicated vignette for hindcasts/reforecasts). It works the very same as for all other EUPP gridded data sets, however, there are some more types available.

High-resolution forecasts

type = "hr" specifies downloading data from the high-resolution ECMWF forecast run (deterministic run). Note that the data set is provided on the same spatial resolution as all other gridded EUPP data sets (\(0.25\) degrees regular ll grid).

High-resolution forecasts are available on multiple levels:

  • "surface": surface fields (used as example in the following sections)
  • "pressure": pressure level data (see here)
  • "efi"": extreme forecast index data (see here)

High-resolution surface data: Specify data

Step one is to set up before starting downloading data a configuration object must be created using eupp_config() which contains the specification of the data to be retrieved.

In this case high-resolution forecasts initialized on three different days, only forecasts for "2t" (2m air temperature) and "tcc" (total cloud cover) including forecasts 12h ahead up to 96h ahead from initialization in a 12-hourly interval.

# Loading the package
library("eupp")

# Creating a vector of dates (character string in ISO representation works fine)
# specifying the date of model initialization (00 UTC).
dates <- c("2018-01-01", "2018-01-08", "2018-01-15")

# Create custom configuration
conf <- eupp_config(product   = "forecast",
                    level     = "surface",
                    type      = "hr",           # high-resolution forecast run
                    date      = dates,          # dates
                    parameter = c("2t", "tcc"), # single parameter
                    steps     = seq(12, 96, by = 12), # 12-hrly +12 to +96
                    cache     = "_cache")       # optional

The function returns an object of class eupp_config containing the data of interest used for downloading the data in a second step.

High-resolution surface data: Download GRIB

For all gridded EUPP data sets three options for downloading the data exist. eupp_download_gridded() allows to download and store the data set on disc.

eupp_download_gridded(conf, "_hr_surface.grb", "grib", overwrite = TRUE)

High-resolution surface data: Interpolation

library("sf")
locations <- data.frame(name = c("Innsbruck", "Brussels"),
                        lon  = c(11.39, 4.35),
                        lat  = c(47.27, 50.85))
(locations <- st_as_sf(locations, coords = c("lon", "lat"), crs = 4326))
## Simple feature collection with 2 features and 1 field
## Geometry type: POINT
## Dimension:     XY
## Bounding box:  xmin: 4.35 ymin: 47.27 xmax: 11.39 ymax: 50.85
## Geodetic CRS:  WGS 84
##        name            geometry
## 1 Innsbruck POINT (11.39 47.27)
## 2  Brussels  POINT (4.35 50.85)
# Perform bilinear interpolation
ip <- eupp_interpolate_grib("_hr_surface.grb", at = locations,
                            atname = "name", bilinear = TRUE)
head(ip, n = 4)
##         init               valid step            geometry      name      t2m
## 1 2018-01-01 2018-01-01 12:00:00   12 POINT (11.39 47.27) Innsbruck 272.0790
## 2 2018-01-01 2018-01-02 00:00:00   24 POINT (11.39 47.27) Innsbruck 268.0749
## 3 2018-01-01 2018-01-02 12:00:00   36 POINT (11.39 47.27) Innsbruck 271.1871
## 4 2018-01-01 2018-01-03 00:00:00   48 POINT (11.39 47.27) Innsbruck 268.8150
##         tcc
## 1 0.9999246
## 2 0.9993639
## 3 0.4850400
## 4 0.9920589

High-resolution pressure level data

Only minor differences to surface data. All needed to be done is to set level = "pressure" and specify what parameter(s) to be downloaded. Note: There is no dedicated option to specify which levels An example:

conf <- eupp_config("forecast", "pressure", "hr",
                    date = "2017-01-01",
                    steps = 12,
                    cache = "_cache")

eupp_download_gridded(conf, "_hr_pressure.grb", overwrite = TRUE)

ip <- eupp_interpolate_grib("_hr_pressure.grb", at = locations,
                            atname = "name", bilinear = TRUE)
head(ip, n = 4)
##         init               valid step            geometry      name
## 1 2017-01-01 2017-01-01 12:00:00   12 POINT (11.39 47.27) Innsbruck
## 2 2017-01-01 2017-01-01 12:00:00   12  POINT (4.35 50.85)  Brussels
##              q        r          t         u        v        z
## 1 0.0005279290 23.08446  3.3570776  5.969585 1.172727 55090.82
## 2 0.0008119335 65.09030 -0.4883301 17.474424 8.399610 54418.85

High-resolution extreme forecast index

The extreme forecast index is a second-level product derived from the entire atmosphere of all ensemble forecasts projected to a 2D plane. Thus, there are no members or dedicated levels and only available aggregated over 24 hour time periods available at 00 UTC (e.g., +0-24 hours ahead, +24-48 hours ahead, …).

To get the data simply ask for level = "efi" (here not declaring steps to get all available forecast steps).

conf <- eupp_config("forecast", "efi",
                    date = "2017-01-01",
                    cache = "_cache")

eupp_download_gridded(conf, "_hr_efi.grb", overwrite = TRUE)

ip <- eupp_interpolate_grib("_hr_efi.grb", at = locations,
                            atname = "name", bilinear = TRUE)
head(ip, n = 4)
##         init      valid step            geometry      name       10fgi
## 1 2017-01-01 2017-01-02   24 POINT (11.39 47.27) Innsbruck -0.58085050
## 2 2017-01-01 2017-01-03   48 POINT (11.39 47.27) Innsbruck  0.04798761
## 3 2017-01-01 2017-01-04   72 POINT (11.39 47.27) Innsbruck -0.10858473
## 4 2017-01-01 2017-01-05   96 POINT (11.39 47.27) Innsbruck  0.78658304
##          10wsi         2ti      capei      capesi      mn2ti      mx2ti
## 1  0.213873457 -0.19533997 -0.1162598 -0.11621945 -0.2737228  0.5849332
## 2  0.163098398 -0.06546370  0.1613665  0.06906206 -0.2784112  0.2082384
## 3 -0.002705297 -0.37272246 -0.0827419 -0.07480878 -0.3448112 -0.3676042
## 4  0.418040832 -0.04911289  0.2411626  0.40136954 -0.3558778 -0.2228272
##          sfi        tpi
## 1 -0.3202264 -0.3500732
## 2  0.2327614  0.2281908
## 3 -0.1592759 -0.1596311
## 4  0.6257481  0.6145747

Note that not all parameters are available for all forecast steps (mainly for the very long range horizonts).

Ensemble forecasts

type = "ens" specifies downloading data from the operational ensemble. Works the same as for high-resolution forecasts (deterministic run) except an optional argument members is available. The argument allows to specify which ensemble forecast members/perturbations shall be processed.

  • 0: identifies the control run (treated the same as the perturbations)
  • If nothing is specified (members = NULL), the control run plus all available ensemble members will be downloaded/processed.

Ensemble surface data

As always, eupp_config() has to be called to specify what should be processed in the next step.

In this case ensemble forecasts initialized on three separate days (00 UTC) for one single forecast parameter ("cp" = convective precipitation; "surface" variable) valid at a forecast horizon of +120 hours.

In addition, members = 0:3 defines to only download gridded data for the control run (0) and the first three perturbations.

# Loading the package
library("eupp")

# Create custom configuration
conf <- eupp_config(product   = "forecast",
                    level     = "surface",
                    type      = "ens",          # high-resolution forecast run
                    date      = "2017-01-02",   # dates
                    parameter = "cp",           # one parameter
                    steps     = 72:120,         # All available in this range
                    members   = 0:3,            # control run + members 1, 2, 3
                    cache     = "_cache")       # optional

Once the configuration object has been created we can download the data.

eupp_download_gridded(conf, "_ens_surface.grb", "grib", overwrite = TRUE)

Last but not least interpolate the data using eupp_interpolate_grib(). Note that, as we have ensemble forecasts, there are multiple forecast members for the same date/time and parameter. This will be reflected by the adjusted parameter names. _[0-9]+$ at the end indicates the different members.

ip <- eupp_interpolate_grib("_ens_surface.grb", at = locations,
                            atname = "name", bilinear = TRUE)
head(ip, n = 2)
##         init               valid step            geometry      name        cp_0
## 1 2017-01-02 2017-01-05 00:00:00   72 POINT (11.39 47.27) Innsbruck 0.008316959
## 2 2017-01-02 2017-01-05 01:00:00   73 POINT (11.39 47.27) Innsbruck 0.008893568
##          cp_1        cp_2        cp_3
## 1 0.007015520 0.005409689 0.008623788
## 2 0.008198328 0.005471552 0.009501466

The same is true when using the long format except .. its the long format.

ip2 <- eupp_interpolate_grib("_ens_surface.grb", at = locations,
                             atname = "name", bilinear = TRUE,
                             wide = FALSE)
head(ip2, n = 3)
##                                                      path domain levtype
## 1 data/fcs/surf/EU_forecast_ctr_surf_params_2017-01_0.grb      g     sfc
## 2 data/fcs/surf/EU_forecast_ctr_surf_params_2017-01_0.grb      g     sfc
## 3 data/fcs/surf/EU_forecast_ctr_surf_params_2017-01_0.grb      g     sfc
##   step_char param class type stream expver leg_number    offset length param_id
## 1        72  cp_0    od   cf   enfo   0001          1 100322160  23412      143
## 2        73  cp_0    od   cf   enfo   0001          1 100829280  23412      143
## 3        74  cp_0    od   cf   enfo   0001          1 101336520  23412      143
##   number       init step               valid            geometry       value
## 1      0 2017-01-02   72 2017-01-05 00:00:00 POINT (11.39 47.27) 0.008316959
## 2      0 2017-01-02   73 2017-01-05 01:00:00 POINT (11.39 47.27) 0.008893568
## 3      0 2017-01-02   74 2017-01-05 02:00:00 POINT (11.39 47.27) 0.009543260
##        name
## 1 Innsbruck
## 2 Innsbruck
## 3 Innsbruck
library("ggplot2")
ggplot(ip2) + geom_line(aes(x = valid, y = value, color = param)) +
    facet_wrap("name")

@TODO: Still cumulated!

Ensemble pressure level data

# Create custom configuration
conf <- eupp_config(product   = "forecast",
                    level     = "pressure",
                    type      = "ens",          # high-resolution forecast run
                    date      = "2017-01-02",   # dates
                    steps     = 72,             # Only forecast step 72
                    members   = 10:11,          # control run + members 10 and 11
                    cache     = "_cache")       # optional

k <- eupp_download_gridded(conf, "_ens_pressure.grb", overwrite = TRUE)

(ip <- eupp_interpolate_grib("_ens_pressure.grb", at = locations,
                             atname = "name", bilinear = TRUE))
##         init      valid step            geometry      name         q_10
## 1 2017-01-02 2017-01-05   72 POINT (11.39 47.27) Innsbruck 0.0009742035
## 2 2017-01-02 2017-01-05   72  POINT (4.35 50.85)  Brussels 0.0001702941
##           q_11     r_10     r_11      t_10      t_11     u_10     u_11
## 1 0.0009548127 76.86321 78.65487 -6.712624 -7.672577 12.63447 8.890619
## 2 0.0004525649 65.38835 80.57696 -5.680254 -7.426374  4.07327 2.303921
##        v_10      v_11    z_10     z_11
## 1 -18.64791 -15.21143 52329.6 52124.89
## 2 -23.63264 -24.68889 54332.4 54019.57