![]() |
PyHelios 0.1.11
|
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:
Definition at line 107 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. | |
| __del__ (self) | |
| Destructor to ensure C++ resources freed even without 'with' statement. | |
| 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 119 of file StomatalConductance.py.
| pyhelios.StomatalConductance.StomatalConductanceModel.__del__ | ( | self | ) |
Destructor to ensure C++ resources freed even without 'with' statement.
Definition at line 194 of file StomatalConductance.py.
| pyhelios.StomatalConductance.StomatalConductanceModel.__enter__ | ( | self | ) |
Context manager entry.
Definition at line 179 of file StomatalConductance.py.
| pyhelios.StomatalConductance.StomatalConductanceModel.__exit__ | ( | self, | |
| exc_type, | |||
| exc_value, | |||
| traceback ) |
Context manager exit with proper cleanup.
Definition at line 183 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 225 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 213 of file StomatalConductance.py.
| pyhelios.StomatalConductance.StomatalConductanceModel.getNativePtr | ( | self | ) |
Get the native pointer for advanced operations.
Definition at line 204 of file StomatalConductance.py.
| bool pyhelios.StomatalConductance.StomatalConductanceModel.is_available | ( | self | ) |
Check if StomatalConductanceModel is available in current build.
Definition at line 583 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 |
Definition at line 543 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 |
Definition at line 568 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 |
Definition at line 261 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 |
Definition at line 429 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 |
Definition at line 327 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 |
Definition at line 393 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 |
Definition at line 470 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 |
Definition at line 295 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 |
Definition at line 511 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 |
Definition at line 361 of file StomatalConductance.py.
| pyhelios.StomatalConductance.StomatalConductanceModel.context = context |
Definition at line 126 of file StomatalConductance.py.
| pyhelios.StomatalConductance.StomatalConductanceModel.stomatal_model = None |
Definition at line 127 of file StomatalConductance.py.