Skip to contents

runs summary and creates raster for a 10 year periods for given list of starting years. uses the summary_by_decades_raster() function and sends params to that, using the decade start year as the 'group id' value

Usage

summary_by_decades_raster(
  mhwdb_conn,
  mhw_table = "arise10_decade_metrics",
  mhw_metric = "int_mean",
  sql_function = "avg",
  decades = c(2040, 2050, 2060),
  ensemble_list_string = NA,
  crs = "EPSG:4087"
)

Arguments

mhw_table

name of the table to use

mhw_metric

character name of metric ( column ) in the table to summarize: mhw_dur, int_mean, etc

decades

vector of integers, the start year of each 10 year period, can overlap

ensemble_list_string

= NA; optional character string. If NA, then it's ignored and all ensembles are included. if it's string that is a list of ensembles to include in format "006,007,008" only those with matching ensemble will be included. ensembles have leading zeros, are 3 digits and this must be a separated list with leading zeros

crs

default 'EPSG:4087', character valid coordinate reference system

sqlfun

= avg; character aggregate function for duckdb, for example avg, count or median, see https://duckdb.org/docs/sql/functions/aggregates,

Value

list of terra rasters of summary statistics, one per decade in decades vector