![]() |
LandscapeDNDC 1.37.0
|
Threshold conditions that gate a time-windowed event (time="t1 -> t2" XML attribute).
More...
#include </var/lib/jenkins/workspace/landscapedndc-builds/crabmeat-src/scientific/event/events/eventbase.h>
Public Member Functions | |
| event_trigger_t () | |
| Thresholds triggering windowed events: no condition given. | |
| int | forest_threshold_count () const |
| Number of given forest thresholds (thin, harvest, regrow) | |
| bool | have_trigger () const |
| True if any threshold condition is given. | |
| lerr_t | check (char const *) const |
| Checks consistency of given thresholds, logs all problems. | |
| void | drop () |
| Removes all thresholds and marks them as dropped (invalid input) | |
Public Attributes | |
| std::string | species |
| double | dvs_min |
| double | dvs_max |
| double | fraction_field_capacity |
| std::string | water_management |
| double | agb_cut |
| double | basal_area_min |
| bool | dropped |
Threshold conditions that gate a time-windowed event (time="t1 -> t2" XML attribute).
All given conditions must be satisfied simultaneously for the event to fire at a particular time step. If no conditions are set, no threshold test is performed (see per-event dispatch rules below).
Available XML attributes on the <trigger> child element:
species — species checked for DVS/AGB; if omitted, the sum over all present plants is used.fraction_dvs_min [0–1] — minimum development stage (alias: fraction_gdd).fraction_dvs_max [0–1] — maximum development stage.fraction_field_capacity [-] — fires only when volumetric soil water in the top 20 cm is at most this fraction of field capacity.watermanagement — "flooded" (surface water > 0.02 m) or "drained" (no surface water).agb_cut [kgC ha⁻¹] — (cut only) fires when aboveground biomass ≥ value; same unit as cut::remains_absolute. <trigger>; refers to the cohort named by the enclosing event's name attribute:basal_area_min [m² ha⁻¹] (thin only)stand_volume_min [m³ ha⁻¹] (thin, harvest, regrow)top_height_min [m] (thin, harvest, regrow)dbh_min [m] (harvest only) — mean DBHInvalid or inconsistent thresholds (e.g. more than one forest threshold, or a forest threshold on an unsupported event) are logged and dropped; event_trigger_t::dropped is set to true and the windowed event fires once at the window start.
Per-event dispatch semantics (see also Events):
| ldndc::event::event_trigger_t::event_trigger_t | ( | ) |
Thresholds triggering windowed events: no condition given.
References agb_cut, basal_area_min, dropped, dvs_max, dvs_min, fraction_field_capacity, species, and water_management.
Referenced by drop().

| lerr_t ldndc::event::event_trigger_t::check | ( | char const * | _event_name | ) | const |
Checks consistency of given thresholds, logs all problems.
checks consistency of given conditions (logs all problems)
References agb_cut, basal_area_min, dvs_max, dvs_min, forest_threshold_count(), fraction_field_capacity, and water_management.

| void ldndc::event::event_trigger_t::drop | ( | ) |
Removes all thresholds and marks them as dropped (invalid input)
removes all conditions and marks thresholds as dropped
References dropped, and event_trigger_t().

| int ldndc::event::event_trigger_t::forest_threshold_count | ( | ) | const |
Number of given forest thresholds (thin, harvest, regrow)
number of valid forest threshold fields set (0 or 1)
References basal_area_min.
Referenced by check(), and have_trigger().

| bool ldndc::event::event_trigger_t::have_trigger | ( | ) | const |
True if any threshold condition is given.
References agb_cut, dvs_max, dvs_min, forest_threshold_count(), fraction_field_capacity, and water_management.

| double ldndc::event::event_trigger_t::agb_cut |
XML attr agb_cut (cut only) — fire when AGB ≥ value [kgC ha⁻¹]
Referenced by check(), event_trigger_t(), and have_trigger().
| double ldndc::event::event_trigger_t::basal_area_min |
forest thresholds (exactly one allowed per trigger): basal_area_min [m² ha⁻¹] (thin), stand_volume_min [m³ ha⁻¹] (thin/ harvest/,regrow)top_height_min [m] (thin/ harvest/,regrow)dbh_min [m] (harvest)
Referenced by check(), event_trigger_t(), and forest_threshold_count().
| bool ldndc::event::event_trigger_t::dropped |
true if thresholds were given but are invalid/inconsistent and were dropped; the event fires once at the window start
Referenced by drop(), and event_trigger_t().
| double ldndc::event::event_trigger_t::dvs_max |
XML attr fraction_dvs_max — maximum DVS [0–1]
Referenced by check(), event_trigger_t(), and have_trigger().
| double ldndc::event::event_trigger_t::dvs_min |
XML attr fraction_dvs_min (alias fraction_gdd) — minimum DVS [0–1]
Referenced by check(), event_trigger_t(), and have_trigger().
| double ldndc::event::event_trigger_t::fraction_field_capacity |
XML attr fraction_field_capacity — soil water (0–20 cm) ≤ fraction of FC [-]
Referenced by check(), event_trigger_t(), and have_trigger().
| std::string ldndc::event::event_trigger_t::species |
XML attr species — species checked for DVS/AGB; empty = sum of all plants
Referenced by event_trigger_t().
| std::string ldndc::event::event_trigger_t::water_management |
XML attr watermanagement — "flooded" (surface water > 0.02 m) or "drained"
Referenced by check(), event_trigger_t(), and have_trigger().