Skip to contents

Extract the stressor magnitude data from each sheet in the Excel workbook.

Usage

StressorMagnitudeWorkbook(filename = NA, scenario_worksheet = NA)

Arguments

filename

A string. Relative file name to the stressor magnitude Excel workbook.

scenario_worksheet

A string. Worksheet name for the scenario.

Value

A stressor magnitude list object for the CEMPRA

Details

For more information about data format requirements, see the Data Upload section of the vignette. Optional From_Year and To_Year columns may be supplied. When present, they are used only by the population model to restrict a stressor (per HUC) to an activation window (active between From_Year and To_Year, inclusive); they are ignored by the Joe Model. Stressors with missing/blank values, or files without these columns, are applied to all years as before (backwards compatible).

The Stressor_cat column is OPTIONAL and is normally a user label only (the original value is preserved in Stressor_cat_orig), with two exceptions. (1) The reserved value "Total_Mortality" (exact spelling) aggregates all rows so tagged into a single synthetic Total_Mortality stressor per HUC: the Means are summed and the SDs are pooled in quadrature (sqrt(sum(SD^2))), dropping NA components (all-NA -> 0). A matching Total_Mortality curve must exist in the stressor-response workbook for the aggregate to have an effect. Near-miss spellings warn. (2) If the stressor-response workbook disambiguated duplicate stressor names as "<Stressor>_<Stressor_cat>", dose rows are aligned to those full names at model run time (see align_dose_stressor_names, with a warning). Duplicate stressor names within this workbook are otherwise left untouched: legacy files legitimately list multiple component rows per stressor with Stressor_cat as a component label.