pr_fm_era5: Formatting ERA5 data

View source: R/pr_fm_era5.R

pr_fm_era5R Documentation

Formatting ERA5 data

Description

Formats ERA5 data as downloaded through the Copernicus CDS service, using pr_dl_era5().

Usage

pr_fm_era5(
  path = tempdir(),
  file = "era5.nc",
  year = 2016,
  offset = 264,
  internal = TRUE,
  extent
)

Arguments

path

a path to the gridded data

file

a netCDF containing ERA5 data, by default this will be a file named era5.nc. Alternatively you can point to a different file in the path (e.g. when you downloaded multiple source files)

year

year to process (requires year - 1 to be present / downloaded)

offset

offset of the time series in DOY (default = 264, sept 21)

internal

TRUE / FALSE, write data structure to file as RDS (default = FALSE)

extent

vector with coordinates defining the region of interest defined as xmin, xmax, ymin, ymax in lat/lon (default = c(-80, -70, 40, 50)), note that this differs from the download routine!!

Value

data structure formatted for phenor model optimization and validation

Examples

# run with default settings
# look for alternative models on the CMIP6
# downscaled data page
## Not run: 
cmip5_data <- pr_fm_cmip()

## End(Not run)

bluegreen-labs/phenor documentation built on Sept. 2, 2023, 10:34 a.m.