calc_SMTRs: Calculate soil moisture and soil temperature regimes and...

View source: R/SoilMoistureTemperatureRegimes.R

calc_SMTRsR Documentation

Calculate soil moisture and soil temperature regimes and underlying conditions

Description

Calculations are based on SSS (2014, 2015) and explained in detail in the vignette( topic = "SoilMoistureRegimes_SoilTemperatureRegimes", package = "rSOILWAT2" ).

Usage

calc_SMTRs(
  sim_in,
  sim_out = NULL,
  sim_agg = NULL,
  soil_TOC = NULL,
  has_soil_temperature = TRUE,
  opt_SMTR = list(aggregate_at = "conditions", crit_agree_frac = 0.9, use_normal = TRUE,
    SWP_dry = -1.5, SWP_sat = -0.033, impermeability = 0.9),
  simTime1 = NULL,
  simTime2 = NULL,
  verbose = FALSE,
  msg_tag = NULL
)

Arguments

sim_in

An object of class swInputData. The rSOILWAT2 simulation input.

sim_out

An object of class swOutput. The rSOILWAT2 simulation output. If NULL then sim_agg must be provided instead.

sim_agg

A named list. The prepared rSOILWAT2 simulation output. If NULL then sim_out must be provided so that the elements of sim_agg can be determined internally. The list contains: "soiltemp.dy.all", "soiltemp.yr.all", "soiltemp.mo.all", "vwcmatric.dy.all", "swpmatric.dy.all", "prcp.yr", "prcp.mo", "pet.mo", and "temp.mo". Note: if sim_agg has already been calculated for other reasons, then passing sim_agg may be faster than passing sim_out, which (re-)calculates sim_agg.

soil_TOC

A numeric vector. Total soil organic matter in g C / kg soil for each soil layer. If NULL, then internally set to 0.

has_soil_temperature

A logical value. Set to TRUE, if soil temperature values have been simulated.

opt_SMTR

A named list. Parameters for the calculation of the regimes:

  • aggregate_at: A character string. Determines the approach for regime determination; we recommend the value of "conditions". See details.

  • crit_agree_frac: A numeric value. The aggregation agreement level (e.g., 0.5 = majority; 1 = all); we recommend a value of 0.9.

  • use_normal: A logical value. If TRUE, then "normal years" as defined by (Soil Survey Staff 2014: p.29) are determined (note: should be at least a time period of 30 years); if FALSE, then all years are used for the calculation of regimes. We recommend to determine "normal years".

  • SWP_dry: A numeric value. Soil water potential (MPa) below which soils are considered dry; we recommend a value of -1.5 MPa.

  • SWP_sat: A numeric value. Soil water potential (MPa) above which soils are considered saturated; we recommend a value of -0.033 MPa.

  • impermeability: A numeric value. The value above which the code considers a soil layer to be impermeable. We recommend a value of 0.9.

simTime1

A list with named elements. Calculated internally if NULL; alternatively, it can be generated by a call to the function setup_time_simulation_run.

simTime2

A list with named elements. Calculated internally if NULL; alternatively, it can be generated by a call to the function simTiming_ForEachUsedTimeUnit.

verbose

A logical value. If TRUE more messages are printed.

msg_tag

A character string. Tag that is pre-appended to each verbose message.

Value

A list with the following elements:

  • regimes_done: if successful calculation of soil moisture and soil temperature regimes then TRUE otherwise FALSE

  • has_simulated_SoilTemp: if soil temperature was simulated then 1 otherwise 0

  • has_realistic_SoilTemp: if simulated soil temperature values are realistic then 1 otherwise 0

  • has_Ohorizon: if soil profile may have an O-horizon, then TRUE otherwise FALSE

  • Lanh_depth: a numeric vector of length two

  • MCS_depth: a numeric vector of length two

  • Fifty_depth: a numeric value

  • permafrost_yrs: number of years with permafrost conditions

  • SMR_normalyears: years considered "normal"

  • SMR_normalyears_N: number of years considered "normal"

  • cond_annual: a numeric matrix with annual values of underlying conditions used to determine soil moisture and soil temperature regimes

  • STR: soil temperature regimes

  • SMR: soil moisture regimes

Details

The argument aggregate_at determines at which level aggregations to regimes are carried out:

  • data: Determine conditions and regimes based on aggregated mean soil moisture/temperature values.

  • conditions Determine conditions based on time-series values of soil moisture/temperature values; determine regimes based on aggregated mean conditions.

  • regime: Determine conditions and regimes based on time-series values of soil moisture/temperature values.

References

Soil Survey Staff (2014). Keys to soil taxonomy, 12th ed. USDA Natural Resources Conservation Service, Washington, DC.

Soil Survey Staff (2015). Illustrated guide to soil taxonomy. USDA Natural Resources Conservation Service, National Soil Survey Center, Lincoln, Nebraska.

Examples

sw_in <- rSOILWAT2::sw_exampleData
sw_out <- rSOILWAT2::sw_exec(inputData = sw_in)
SMTR <- calc_SMTRs(sim_in = sw_in, sim_out = sw_out)


DrylandEcology/rSW2funs documentation built on June 28, 2023, 2:51 a.m.