![]() |
0.1.8
|
High-level interface for stomatal conductance modeling and gas exchange calculations. More...
High-level interface for stomatal conductance modeling and gas exchange calculations.
This class provides a user-friendly wrapper around the native Helios stomatal conductance plugin with automatic plugin availability checking and graceful error handling.
The stomatal conductance model implements five different stomatal response models:
The plugin includes a species library with pre-calibrated coefficients for common plant species (Almond, Apple, Avocado, Grape, Lemon, Olive, Walnut, etc.).
Both steady-state and dynamic (time-stepping) calculations are supported, with configurable time constants for stomatal opening and closing dynamics.
System requirements:
Examples
Definition at line 109 of file StomatalConductance.py.
Public Member Functions | |
__init__ (self, Context context) | |
Initialize StomatalConductanceModel with graceful plugin handling. | |
__enter__ (self) | |
Context manager entry. | |
__exit__ (self, exc_type, exc_value, traceback) | |
Context manager exit with proper cleanup. | |
getNativePtr (self) | |
Get the native pointer for advanced operations. | |
None | enableMessages (self) |
Enable console output messages from the stomatal conductance model. | |
None | disableMessages (self) |
Disable console output messages from the stomatal conductance model. | |
None | run (self, Optional[List[int]] uuids=None, Optional[float] dt=None) |
Run the stomatal conductance model. | |
None | setBWBCoefficients (self, BWBCoefficients coeffs, Optional[List[int]] uuids=None) |
Set Ball-Woodrow-Berry model coefficients. | |
None | setBBLCoefficients (self, BBLCoefficients coeffs, Optional[List[int]] uuids=None) |
Set Ball-Berry-Leuning model coefficients. | |
None | setMOPTCoefficients (self, MOPTCoefficients coeffs, Optional[List[int]] uuids=None) |
Set Medlyn et al. | |
None | setBMFCoefficients (self, BMFCoefficients coeffs, Optional[List[int]] uuids=None) |
Set Buckley-Mott-Farquhar model coefficients. | |
None | setBBCoefficients (self, BBCoefficients coeffs, Optional[List[int]] uuids=None) |
Set Bailey model coefficients. | |
None | setBMFCoefficientsFromLibrary (self, str species, Optional[List[int]] uuids=None) |
Set BMF model coefficients using the built-in species library. | |
None | setDynamicTimeConstants (self, float tau_open, float tau_close, Optional[List[int]] uuids=None) |
Set time constants for dynamic stomatal opening and closing. | |
None | optionalOutputPrimitiveData (self, str label) |
Add optional output primitive data to the Context. | |
None | printDefaultValueReport (self, Optional[List[int]] uuids=None) |
Print a report detailing usage of default input values. | |
bool | is_available (self) |
Check if StomatalConductanceModel is available in current build. | |
Public Attributes | |
context = context | |
stomatal_model = None | |
pyhelios.StomatalConductance.StomatalConductanceModel.__init__ | ( | self, | |
Context | context ) |
Initialize StomatalConductanceModel with graceful plugin handling.
context | Helios Context instance |
TypeError | If context is not a Context instance |
StomatalConductanceModelError | If stomatal conductance plugin is not available |
Definition at line 121 of file StomatalConductance.py.
pyhelios.StomatalConductance.StomatalConductanceModel.__enter__ | ( | self | ) |
Context manager entry.
Definition at line 181 of file StomatalConductance.py.
pyhelios.StomatalConductance.StomatalConductanceModel.__exit__ | ( | self, | |
exc_type, | |||
exc_value, | |||
traceback ) |
Context manager exit with proper cleanup.
Definition at line 185 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.disableMessages | ( | self | ) |
Disable console output messages from the stomatal conductance model.
StomatalConductanceModelError | If operation fails |
Definition at line 217 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.enableMessages | ( | self | ) |
Enable console output messages from the stomatal conductance model.
StomatalConductanceModelError | If operation fails |
Definition at line 205 of file StomatalConductance.py.
pyhelios.StomatalConductance.StomatalConductanceModel.getNativePtr | ( | self | ) |
Get the native pointer for advanced operations.
Definition at line 196 of file StomatalConductance.py.
bool pyhelios.StomatalConductance.StomatalConductanceModel.is_available | ( | self | ) |
Check if StomatalConductanceModel is available in current build.
Definition at line 595 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.optionalOutputPrimitiveData | ( | self, | |
str | label ) |
Add optional output primitive data to the Context.
label | Name of primitive data to output (e.g., "Ci", "gs", "E") |
ValueError | If label is invalid |
StomatalConductanceModelError | If operation fails |
Examples
Definition at line 553 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.printDefaultValueReport | ( | self, | |
Optional[List[int]] | uuids = None ) |
Print a report detailing usage of default input values.
uuids | Optional list of primitive UUIDs. If None, reports on all primitives. |
StomatalConductanceModelError | If operation fails |
Examples
Definition at line 580 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.run | ( | self, | |
Optional[List[int]] | uuids = None, | ||
Optional[float] | dt = None ) |
Run the stomatal conductance model.
This method supports multiple execution modes: - Steady state for all primitives: run() - Dynamic with timestep for all primitives: run(dt=60.0) - Steady state for specific primitives: run(uuids=[1, 2, 3]) - Dynamic with timestep for specific primitives: run(uuids=[1, 2, 3], dt=60.0)
uuids | Optional list of primitive UUIDs to process. If None, processes all primitives. |
dt | Optional timestep in seconds for dynamic simulation. If None, runs steady-state. |
ValueError | If parameters are invalid |
StomatalConductanceModelError | If calculation fails |
Examples
Definition at line 255 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.setBBCoefficients | ( | self, | |
BBCoefficients | coeffs, | ||
Optional[List[int]] | uuids = None ) |
Set Bailey model coefficients.
coeffs | BB model coefficients (pi_0, pi_m, theta, sigma, chi) |
uuids | Optional list of primitive UUIDs. If None, applies to all primitives. |
ValueError | If coefficients are invalid |
StomatalConductanceModelError | If operation fails |
Examples
Definition at line 433 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.setBBLCoefficients | ( | self, | |
BBLCoefficients | coeffs, | ||
Optional[List[int]] | uuids = None ) |
Set Ball-Berry-Leuning model coefficients.
coeffs | BBL model coefficients (gs0, a1, D0) |
uuids | Optional list of primitive UUIDs. If None, applies to all primitives. |
ValueError | If coefficients are invalid |
StomatalConductanceModelError | If operation fails |
Examples
Definition at line 325 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.setBMFCoefficients | ( | self, | |
BMFCoefficients | coeffs, | ||
Optional[List[int]] | uuids = None ) |
Set Buckley-Mott-Farquhar model coefficients.
coeffs | BMF model coefficients (Em, i0, k, b) |
uuids | Optional list of primitive UUIDs. If None, applies to all primitives. |
ValueError | If coefficients are invalid |
StomatalConductanceModelError | If operation fails |
Examples
Definition at line 395 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.setBMFCoefficientsFromLibrary | ( | self, | |
str | species, | ||
Optional[List[int]] | uuids = None ) |
Set BMF model coefficients using the built-in species library.
species | Species name from the library (e.g., "Almond", "Apple", "Grape", "Walnut") |
uuids | Optional list of primitive UUIDs. If None, applies to all primitives. |
ValueError | If species name is invalid |
StomatalConductanceModelError | If operation fails |
Examples
Definition at line 476 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.setBWBCoefficients | ( | self, | |
BWBCoefficients | coeffs, | ||
Optional[List[int]] | uuids = None ) |
Set Ball-Woodrow-Berry model coefficients.
coeffs | BWB model coefficients (gs0, a1) |
uuids | Optional list of primitive UUIDs. If None, applies to all primitives. |
ValueError | If coefficients are invalid |
StomatalConductanceModelError | If operation fails |
Examples
Definition at line 291 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.setDynamicTimeConstants | ( | self, | |
float | tau_open, | ||
float | tau_close, | ||
Optional[List[int]] | uuids = None ) |
Set time constants for dynamic stomatal opening and closing.
tau_open | Time constant (seconds) for stomatal opening |
tau_close | Time constant (seconds) for stomatal closing |
uuids | Optional list of primitive UUIDs. If None, applies to all primitives. |
ValueError | If time constants are invalid |
StomatalConductanceModelError | If operation fails |
Examples
Definition at line 519 of file StomatalConductance.py.
None pyhelios.StomatalConductance.StomatalConductanceModel.setMOPTCoefficients | ( | self, | |
MOPTCoefficients | coeffs, | ||
Optional[List[int]] | uuids = None ) |
Set Medlyn et al.
optimality model coefficients.
coeffs | MOPT model coefficients (gs0, g1) |
uuids | Optional list of primitive UUIDs. If None, applies to all primitives. |
ValueError | If coefficients are invalid |
StomatalConductanceModelError | If operation fails |
Examples
Definition at line 361 of file StomatalConductance.py.
pyhelios.StomatalConductance.StomatalConductanceModel.context = context |
Definition at line 128 of file StomatalConductance.py.
pyhelios.StomatalConductance.StomatalConductanceModel.stomatal_model = None |
Definition at line 129 of file StomatalConductance.py.