build_era5_timeseries_request: Builds a request compatible with the CDS for ERA5 time-series...

View source: R/build_era5_timeseries_request.R

build_era5_timeseries_requestR Documentation

Builds a request compatible with the CDS for ERA5 time-series climate variables

Description

'build_era5_timeseries_request' creates a request or set of requests that can be submitted to the Climate Data Store (CDS) with the 'ecmwfr' package, to query the (beta) ERA5 hourly time-series data for a single spatial point. NOTE: currently such time-series data does not include all variables necessary for microclimate modeling. Spatial location and temporal duration are defined by the user, and requests are automatically split by month. The following variables are requested: 2m_temperature, 2m_dewpoint_temperature, surface_pressure, 10m_u_component_of_wind, 10m_v_component_of_wind, total_precipitation.

Usage

build_era5_timeseries_request(
  x,
  y,
  start_time,
  end_time,
  by_year = TRUE,
  filetype = "netcdf",
  outfile_name = "era5_timeseries_out"
)

Arguments

x

The longitude to request data for.

start_time

a POSIXlt object indicating the first hour for which data are required.

end_time

a POSIXlt object indicating the last hour for which data are required.

by_year

logical indicating whether to split the request by year, which might be safe for especially long-duration queries which may be lost if connection with the API is unstable (default is TRUE)

filetype

One of "netcdf" or "csv" (ONLY NETCDF FORMAT CURRENTLY OPERATIONAL)

outfile_name

character prefix for .nc files when downloaded (the year, month, and file extension is automatically added). Keep in mind that you may want to submit multiple (or many) requests, and therefore this prefix should adequately describe a unique query (e.g. by its spatial or temporal extent).

ymin

The latitude to request data for.


everydayduffy/mcera5 documentation built on June 13, 2025, 7:54 p.m.