calc_GISSM | R Documentation |
GISSM represents the frequency of years when big sagebrush seeds germinate and seedlings survive in undisturbed natural vegetation (Schlaepfer et al. 2014).
calc_GISSM(
x,
soillayer_depths_cm,
params = parameters_GISSM_bigsagebrush(),
site_latitude = NULL,
has_soil_temperature = NULL,
years = NULL,
simTime1 = NULL,
simTime2 = NULL,
debug_output = 0L,
path = NULL,
filename_tag = "GISSM"
)
x |
A named list or an object of
rSOILWAT2 class |
soillayer_depths_cm |
A numeric vector. The lower bounds of simulated soil layers. |
params |
A named list. See |
site_latitude |
A numeric value.
Required if |
has_soil_temperature |
A logical value or |
years |
A numeric vector or |
simTime1 |
A named list or |
simTime2 |
A named list or |
debug_output |
An integer value. Level of additional outputs.
If |
path |
A character string. The path to the directory where additional output should be written to disk. |
filename_tag |
A character string. File name without extension used for writing additional output. |
A named list with one element:
A data.frame tabulating success/failure for Germination_Emergence and for SeedlingSurvival_1stSeason for each regeneration year.
If debug_output
is 2
, then seven additional elements
are provided for debugging purposes:
Number of days per year with positive outcomes.
Seasonal timing of most frequent positive outcomes.
Time to germinate.
Days without germination.
Consecutive years without germination.
Consecutive years without seedling recruitment.
Causes of seedling mortality.
Time information is checked for consistency only minimally;
unexpected output may be produced if
x
, years
, simTime1
, or simeTim2
contain
inconsistent time content.
Schlaepfer, D.R., Lauenroth, W.K. & Bradford, J.B. (2014). Modeling regeneration responses of big sagebrush (Artemisia tridentata) to abiotic conditions. Ecol Model, 286, 66-77.
sw_in <- rSOILWAT2::sw_exampleData
res <- rSOILWAT2::sw_exec(inputData = sw_in)
# Example 1: use rSOILWAT2 output directly to run GISSM
GISSM_r1 <- calc_GISSM(
x = res,
soillayer_depths_cm = rSOILWAT2::swSoils_Layers(sw_in)[, 1],
site_latitude = rSOILWAT2::swSite_IntrinsicSiteParams(sw_in)[["Latitude"]],
has_soil_temperature =
rSOILWAT2::swSite_SoilTemperatureFlag(sw_in) &&
!rSOILWAT2::has_soilTemp_failed()
)
# Example 2: use list of daily values to run GISSM
# populate daily values from rSOILWAT2 output as here or from other model
dt <- "Day"
tmp_swp <- slot(slot(res, "SWPMATRIC"), dt)
tmp_snow <- slot(slot(res, "SNOWPACK"), dt)
tmp_airtemp <- slot(slot(res, "TEMP"), dt)
tmp_soiltemp <- slot(slot(res, "SOILTEMP"), dt)
has_sl_minmeanmax <- grepl(
"Lyr_1_avg_C",
colnames(tmp_soiltemp),
fixed = TRUE
)
cns_sl <- if (any(has_sl_minmeanmax)) {
# rSOILWAT2 since v5.3.0
paste0("Lyr_1_", c("min", "avg", "max"), "_C")
} else {
# rSOILWAT2 before v5.3.0
# Daily mean soil temperature in the absence of daily min/max
rep("Lyr_1", 3)
}
GISSM_r2 <- calc_GISSM(
x = list(
SWP_MPa = -1 / 10 * tmp_swp[, -(1:2), drop = FALSE],
Snowpack_SWE_mm = 10 * tmp_snow[, "snowpackWaterEquivalent_cm"],
air_Tmin_C = tmp_airtemp[, "min_C"],
air_Tmean_C = tmp_airtemp[, "avg_C"],
air_Tmax_C = tmp_airtemp[, "max_C"],
shallowsoil_Tmin_C = tmp_soiltemp[, cns_sl[[1]]],
shallowsoil_Tmean_C = tmp_soiltemp[, cns_sl[[2]]],
shallowsoil_Tmax_C = tmp_soiltemp[, cns_sl[[3]]]
),
soillayer_depths_cm = rSOILWAT2::swSoils_Layers(sw_in)[, 1],
site_latitude = rSOILWAT2::swSite_IntrinsicSiteParams(sw_in)[["Latitude"]],
years =
rSOILWAT2::swYears_StartYear(sw_in):rSOILWAT2::swYears_EndYear(sw_in)
)
all.equal(GISSM_r1, GISSM_r2)
# Calculate the frequency of years when big sagebrush seeds germinate
# and seedlings survive in undisturbed natural vegetation
# (Schlaepfer et al. 2014)
colMeans(GISSM_r1[["outcome"]][, -1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.