Formats CMIP6 data as downloaded through the Copernicus CDS service, using pr_dl_cmip().

pr_fm_cmip(
  path = tempdir(),
  year = 2016,
  offset = 264,
  model = "MIROC6",
  scenario = "ssp5_8_5",
  extent = c(41, -79, 50, -69),
  internal = TRUE
)

Arguments

path

a path to the gridded data

year

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

offset

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

model

which CMIP6 model to use

scenario

"rcp85", "rcp45", "historical" here rcp covers 2006 - 2100 while historical data covers 1950 - 2005

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!!

internal

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

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
if (FALSE) {
cmip5_data <- pr_fm_cmip()
}