calcindices_temp: Calculate temperature-related indices for the eastern Bering...

calcindices_tempR Documentation

Calculate temperature-related indices for the eastern Bering Sea shelf

Description

This routine replicates the primary mean temperature and area-below-x indices as found in the cold_pool_index data frame, but allows for user-specified variations.

Usage

calcindices_temp(
  datafile,
  maskpoly,
  select_years = NULL,
  cell_resolution = 5000,
  method = "ste",
  proj_crs = NULL,
  threshold = c(-1, 0, 1, 2),
  bbox = NULL,
  bottomvar = "gear_temperature",
  surfacevar = "surface_temperature"
)

Arguments

datafile

Full filename of .csv file holding point-sampled surface and bottom temperature data

maskpoly

String specifying masking polygon from akgfmaps::get_base_layers, or simple feature object to use as masking polygon

select_years

vector of years for which indices will be calculated

cell_resolution

resolution (m) to use for interpolation raster

method

fitting method to use for interpolation (see data2raster fittype parameter for options)

proj_crs

CRS to use for interpolation, or NULL to use coldpool:::ebs_proj_crs

threshold

vector of temperature threshold values (deg C) for which area-less-than-x indices will be calculated

bbox

Bounding box to use for interpolated raster (see data2raster)

bottomvar

Name of bottom temperaure variable column in the datafile, or NULL to skip calculation of bottom temperature metrics

surfacevar

Name of surface temperaure variable column in the datafile, or NULL to skip calculation of surface temperature metrics

Value

data frame with the following column YEAR: year of indices MEAN_GEAR_TEMPERATURE: mean interpolated and masked bottomvar MEAN_SURFACE_TEMPERATURE: mean interpolated and masked surfacevar MEAN_BT_LT100M: mean interpolated bottomvar within the intersection of the <100m survey strata and masked region AREA_LTE_X: total area (km^2) where temperature is less than X deg C


afsc-gap-products/coldpool documentation built on Sept. 14, 2024, 7:40 p.m.