ingest_globalfields: Ingest from global fields

View source: R/ingest_globalfields.R

ingest_globalfieldsR Documentation

Ingest from global fields

Description

Read climate data from files as global fields

Usage

ingest_globalfields(
  siteinfo,
  source,
  getvars,
  dir,
  timescale,
  standardise_units = TRUE,
  layer = NULL,
  verbose = FALSE
)

Arguments

siteinfo

A data frame with rows for each site and columns 'lon' for longitude, 'lat' for latitude, 'date_start' and 'date_end' specifying required dates.

source

A character used as identifiyer for the type of data source ("watch_wfdei", or "cru").

getvars

A named list of characters specifying the variable names in the source dataset corresponding to standard names "temp" for temperature.

dir

A character specifying the directory where data is located. "prec" for precipitation, "patm" for atmospheric pressure, "vpd" for vapour pressure deficit, "netrad" for net radiation, "swin" for shortwave incoming radiation.

timescale

A character or vector of characters, specifying the time scale of data used from the respective source (if multiple time scales are available, otherwise is disregarded).

standardise_units

A logical specifying whether units in ingested data are to be standardised following ingestr-standard units.

layer

(Optional) A character string specifying the layer from a shapefile or a raster brick to be read or to be used to identify file name for gsde.

verbose

if TRUE, additional messages are printed.

Value

A data frame (tibble) containing the time series of ingested data, nested for each site.

Examples

## Not run: inputdata <- ingest_bysite()


stineb/ingestr documentation built on July 21, 2024, 6:39 p.m.