e_request: Create ECMWFR Request

View source: R/ECMWF_fun.R

e_requestR Documentation

Create ECMWFR Request

Description

Creates a list with data request parameters

Usage

e_request(
  variable = c("snow_density", "snow_depth", "snow_depth_water_equivalent"),
  years,
  months,
  days,
  time = "06:00",
  area = c(49, -125, 24.5, -66.5),
  out_file
)

Arguments

variable

⁠[character]⁠ Only one of "snow_density", "snow_depth", "snow_depth_water_equivalent".

years

⁠[character]⁠ Years for which to download data.

months

⁠[character]⁠ Months for which to download data.

days

⁠[character]⁠ Days for which to download data.

time

⁠[character = "06:00"]⁠ Hours for which to download data, formatted as HH:MM. Hourly data are available for this dataset.

area

⁠[numeric]⁠ Vector specifying bounding box of spatial subset to download. Should be in lat/lon, counter-clockwise from top. Order is c(ymax, xmin, ymin, xmax). Default downloads all of USA.

out_file

⁠[character]⁠ Name of output file. Should end in ".nc".

Details

See vignette "CDS functionality" in package ecmwfr for details on creating requests. Requests can also be created by visiting web API, downloading python code, and using an RStudio function to convert to list.

Value

List

See Also

CDS functionality vignette

Examples


req_list <- e_request(variable = "snow_density",
                      years = 2018:2019,
                      months = 3:4,
                      days = 15,
                      out_file = "test.nc")


bsmity13/snowdl documentation built on Feb. 24, 2024, 9:03 p.m.