Versions and migration
The pyrealm package is still being actively developed and the functionality in the
package is being extended and revised. This document is describes the main changes in
functionality between major versions and provides code migration notes for changes in
the API of pyrealm code.
Migration from 1.0 to version 2.0
The versions of PModel and SubdailyPModel in pyrealm version 1.0 were based on
the original implementation of the rpmodel package (Stocker et al., 2020) and the R
code supporting (Mengoli et al., 2022), respectively. The two implementations:
were inconsistent in the names used for attributes common across the two models,
contained duplicated internal code, and
differed in the default settings.
In addition, several core methods used within the calculations of both models had been
rewritten to provide a more flexible and extensible framework for new research methods.
So, version 2.0 provides a complete reworking of the package, with a particular focus
on better integrating the PModel and
SubdailyPModel classes. This has led to a large
number of breaking changes in the API. As the package uses semantic
versioning, these changes to the API required that we move to a new
major version.
One general change is that array inputs are no longer required to have identical shapes.
This was often an issue when one input was constant over a particular axis - like
elevation over a time series. Most functionality in pyrealm now requires only that
the shapes of the inputs can be broadcast to each other.
The main user facing changes are shown below, but do also look at the log of
changes for more detail. Most changes were introduced in version 2.0.0
but we have used version 2.0.1 to add some additional changes: these are noted below.
Renamed functions
There were some function names mixed from calc_ and calculate_. For consistency,
we aligned these mixed names to calculate_.
The renamed functions are:
calculate_patm calculates the atmospheric pressure from elevation.
calculate_kmm calculates the Michaelis Menten coefficient.
calculate_gammastar calculates the photorespiratory CO2 compensation point.
calculate_co2_to_ca converts Co2 part per million to Pascals.
calculate_soilmstress_mengoli calculates the Mengoli et al. empirical soil
moisture stress factor.
calculate_soilmstress_stocker calculates Stocker’s empirical soil moisture stress factor.
calculate_ftemp_inst_rd calculates temperature scaling of dark respiration.
calculate_ns_star calculates the relative viscosity of water.
calculate_enthalpy_vaporisation calculates the enthalpy of vaporization.
calculate_specific_heat calculates the specific heat of air.
calculate_vp_sat calculates vapour pressure of saturated air.
calculate_saturation_vapour_pressure_slope calculates the slope of the
saturation vapour pressure curve.
calculate_psychrometric_constant calculates the psychrometric constant.
CarbonIsotopes.calculate_c3_discrimination calculates c3 isotopic discrimination.
CarbonIsotopes.calculate_c4_discrimination calculates c4 isotopic discrimination.
CarbonIsotopes.calculate_c4_discrimination_vonC calculates c4 isotopic discrimination
using the method from (von Caemmerer et al., 2014).
calculate_density_h2o calculates water density.
calculate_viscosity_h2o calculates the viscosity of water.
Water viscosity and density
The rpmodel package used complex algorithms for calculating water density and
viscosity. These provide high precision but are computationally demanding and give
results that only differ slightly from much simpler alternatives. From version 2.0.1,
pyrealm provides a range of options for calculating water density and viscosity and
changes the default algorithms to faster and simpler approaches.
These settings are controlled using the
CoreConst class, which can be passed to the
core_const argument of pyrealm functions and classes. The default settings now use:
CoreConst(water_density_method="fisher", water_viscosity_method="vogel")
The behaviour of version 1.0 can be reproduced using:
CoreConst(water_density_method="jones_harris_eq6", water_viscosity_method="huber")
The PModelEnvironment class
The PModel and SubdailyPModel were inconsistent in the API for providing FAPAR and
PPFD. Both of these variables are now required parts of the
PModelEnvironment, with a default value of
one. As a result:
The
PModelno longer requires use of thePModel.estimate_productivity()method to estimate GPP and this has been redacted.The
faparandppfdarguments have been removed fromSubdailyPModel().
Internally, the PModelEnvironment now automatically calculates temperature in Kelvin
and can be used more flexibly with additional forcing variables for new methods.
The quantum yield of photosynthesis (\(\phi_0\))
The PModel in 1.0.0 supported fixed and temperature
dependent \(\phi_0\) through the do_ftemp_kphio argument. The
SubdailyPModel only supported temperature dependent
\(\phi_0\). Both classes also used the kphio argument to override the default values
and these defaults differed between the two models: PModel used default values taken
from Stocker et al. (2020) that depended on do_ftemp_kphio and SubdailyPModel
used the theoretical maximum value of 1/8.
Both classes now use
method_kphioandreference_kphioand the argumentskphioanddo_ftemp_kphiohave been removed.The
method_kphioargument now uses an extendable set of options for calculating \(\phi_0\) so that new methods can be added seamlessly. Currently,pyrealmprovides ‘fixed’ and ‘temperature’ along with an experimental ‘sandoval’ method that models the effects of growth temperature and aridity on \(\phi_0\).All of the available method choices to
PModelandSubdailyPModelnow use \(\phi_0 = 1/8\) as the default value but this can be overridden usingreference_kphio.
Since this involves a change in the default behaviour that leads to different
predictions, the PModel class in version 2.0.0 issues a warning to alert users.
Arrhenius scaling of \(J_{max}\) and \(V_{cmax}\)
In 1.0.0, PModel used an Arrhenius relationship with a
peak at intermediate temperatures (Kattge and Knorr, 2007) to calculate \(J_{max25}\) and
\(V_{cmax25}\), although in practice the implementation did not exhibit the correct peaked
form. In contrast, the SubdailyPModel used a simple
Arrhenius scaling without a peak.
Both classes now take the
method_arrheniusargument to specify the form of this scaling.Both classes now default to using the
simplemethod of Arrhenius scaling. We strongly recommend the use of this method over the experimentalkattge_knorrmethod.
Method choices in the Subdaily PModel
As noted above, in version 1.0.0, the SubdailyPModel was fixed to use the standard C3
calculation of optimal \(\chi\), temperature-dependent estimation of \(\phi_0\), simple
Arrhenius scaling and estimation of \(J_{max}\) and \(V_{cmax}\) limitation following
Wang et al. (2017). The class now accepts the four method arguments used by the
standard PModel (method_optchi, method_kphio, method_arrhenius and
method_jmaxlim).
The Acclimation Model
In 1.0.0, the SubdailyPModel model required a large
number of options that were used to set the details of the acclimation model to be used.
The
fs_scalerargument was used to provide aSubdailyScalerobject that established the timing of the observations and provided scaling between the daily and subdaily scales.The
alpha,allow_holdover,allow_partial_dataandfill_kindarguments were then used to modify the functions used to generate the acclimation model.
All of this functionality has now been brought together into a single
AcclimationModel class that integrates all of those
settings into a single object. In addition:
The standalone
memory_effectfunction has become theAcclimationModel.apply_acclimationmethod, although the underlying exponential moving average function is now available as theexponential_moving_average()function.The standalone
convert_pmodel_to_subdailyfunction is now thePModel.to_subdailymethod.
Code comparison
The tabs below show the calculation of a PModel and SubdailyPModel using version
1.0.0 and version 2.0.0 of pyrealm.
# Create the PModelEnvironment
pm_env = PModelEnvironment(
tc=tc,
patm=patm,
vpd=vpd,
co2=co2
)
# Fit the standard P Model
standard_model = PModel(
env=pm_env,
method_optchi="prentice14",
do_ftemp_kphio=False,
kphio=1 / 8
)
pmodC3.estimate_productivity(fapar=fapar, ppfd=ppfd)
# Create the SubdailyScaler
fsscaler = SubdailyScaler(datetimes)
fsscaler.set_window(
window_center=np.timedelta64(12, "h"),
half_width=np.timedelta64(1, "h"),
)
# Fit the subdaily model
subdailyC3 = SubdailyPModel(
env=pm_env,
kphio=1 / 8,
method_optchi="prentice14",
fapar=fapar,
ppfd=ppfd,
fs_scaler=fsscaler,
alpha=1 / 15,
allow_holdover=True,
)
# Create the PModelEnvironment, including FAPAR and PPFD
pm_env = PModelEnvironment(
tc=tc,
patm=patm,
vpd=vpd,
co2=co2,
fapar=fapar,
ppfd=ppfd,
)
# Fit the standard P Model - 'estimate_productivity' not required
standard_model = PModel(
env=pm_env,
method_optchi="prentice14",
method_kphio="fixed",
reference_kphio=1 / 8, # Although this is now the default.
)
# Create the acclimation model - merging acclimation functions into a common class
acclim_model = AcclimationModel(
datetimes,
alpha=1 / 15,
allow_holdover=True
)
acclim_model.set_window(
window_center=np.timedelta64(12, "h"),
half_width=np.timedelta64(1, "h"),
)
# Fit the subdaily model - which now accepts all of the alternative method
# arguments used by the PModel class.
subdaily_model = SubdailyPModel(
env=pm_env,
acclim_model=acclim_model,
method_kphio="fixed",
method_optchi="prentice14",
reference_khio=1 / 8, # Again, this is the default.
)
Duplication of results from version 1.0
The default settings in version 2.0 have been chosen to give appropriate and consistent predictions. If you do need to duplicate the exact values calculated under version 1.0, then follow the code examples below. We do not recommend using these settings but they may be useful in validating code migration. Note that setting ``method_arrhenius=”kattge_knorr”` is only required to duplicate predictions of \(V_{cmax25}\) and \(J_{max25}\).
# Create the PModelEnvironment
pm_env = PModelEnvironment(
tc=tc,
patm=patm,
vpd=vpd,
co2=co2
fapar=fapar,
ppfd=ppfd,
mean_growth_temperature=tc,
)
# With temperature dependent phi_0
ret = PModel(
env = pm_env,
method_kphio="temperature",
method_arrhenius="kattge_knorr",
reference_kphio=0.081785,
)
# Without temperature dependent phi_0
ret = PModel(
env = pm_env,
method_kphio="fixed",
method_arrhenius="kattge_knorr",
reference_kphio=0.049977,
)
Supporting functions for the P Model
The pyrealm.pmodel.functions module provides a set of functions specific to the
calculations of the P Model and SubdailyPModel. Many of the functions used
pmodel_const and core_const arguments to pass in constant values, but all are now
unpacked so that the specific constants needed for each function are clear in the
function signatures. In addition, the calculate_ftemp_kphio and calculate_ftemp_inst_vcmax
functions have been removed as they provided specific configurations of the more general
calculate_simple_arrhenius_factor and calculate_kattge_knorr_arrhenius_factor that
now replace them in the module.
Changes Log
Changes summary for pyrealm
This document provides a brief overview of the main changes to pyrealm at each of the
released versions. More detail can be found at the GitHub release page for each version.
See also the migration page for help in moving between versions.
2.0.1
As well as bugfixes, version 2.0.1 is a slight violation of semantic versioning and picks up some API and default changes that were overlooked in 2.0.0.
We have changed the names of some functions and methods to give a more consistent naming convention.
We have aligned function names from mixed
calc_andcalculate_tocalculate_.The
CalcCarbonIsotopesclass has been renamed toCarbonIsotopes: none of the other class names include an ‘action’.
Bugfixes
Stomatal conductance in the SubdailyPModel was incorrectly calculated from \(A_c\) rather than \(A = min(A_c, A_j)\) (#603).
The P Model implementations were not passing required additional variables down the Arrhenius scaling methods, which stopped some of those methods being usable (#582).
Updates to the
numpypackage needed broke the calculation of the SPLASH model when used on a single site (#626).
Changes
The
pyrealmpackage now supports a wider range of functions for calculating water density and viscosity. The default methods used bypyrealmhave been swapped from computationally complex high-precision methods used inrpmodel(think physics labs) to simpler but much faster approaches.We have added new experimental code supporting the calculation of phenological timeseries of LAI and fAPAR.
2.0.0
Version 2.0.0 introduces major breaking changes in the structure of some functionality,
notably the API of the pmodel module, as well as introducing new functionality.
The
PModelandSubdailyPModelclasses have been extensively restructured to align the attributes and methods and to remove repeated code. Many of these changes are internal but the model signatures have changed and several of the attributes have been renamed.Breaking changes:
The
SubdailyPModelattributes giving actual predicted estimates of \(V_{cmax}\) and \(J_{max}\) for observations (subdaily_vcmax,subdaily_vcmax25,subdaily_jmaxandsubdaily_jmax25) have been renamed to simplyvcmax,vcmax25,jmaxandjmax25to align with the observation estimates inPModel.The
SubdailyPModelattributes giving the daily optimum and realised values for \(V_{cmax25}\), \(J_{max25}\) and \(\xi\) have been renamed for more clarity:vcmax25_opt,vcmax25_real,jmax25_opt,jmax25_real,xi_optandxi_realhave changed tovcmax25_daily_optimal,vcmax25_daily_realised,jmax25_daily_optimal,jmax25_daily_realised,xi_daily_optimalandxi_daily_realised.The
PModel.estimate_productivitymethod was required to pass in FAPAR and PPFD to scale up LUE predictions to GPP and to estimate other predictions. This has been deprecated with addition of FAPAR and PPFD to thePModelEnvironmentand GPP is now calculated automatically.The
convert_pmodel_to_subdailyfunction has been deprecated in favour of the newPModel.to_subdailymethod.
The
PModelEnvironmentclass has been updated. It now requires that the user also providesfaparandppfddata, currently with no default values. The provision of additional variables has also been made more flexible, allowing users to provide arbitrary extra variables to the environment. This makes it easier to adopt new PModel methods implementations with new required variables.Breaking change: Need to specify
faparandppfdinPModelEnvironment.The
bounds_checkerfunction has been retired and replaced with theBoundsCheckerclass, which provides more flexible and user-configurable bounds checking. This functionality is used within other classes and does not introduce breaking changes.A new system for providing alternative calculations of quantum yield (\(\phi_0\)) in the P Model, using the new
pyrealm.pmodel.quantum_yieldmodule. This module now provides an expandable set of implementations of the quantum yield calculation, and currently supports the previous fixed and temperature dependent \(\phi_0\) approaches but also David Sandoval’s extension for estimating the impact of water stress on \(\phi_0\).Breaking changes:
The signatures of the
PModelandSubdailyPModelclasses have changed: the argumentskphioanddo_ftemp_kphiohave been replaced bymethod_kphioandreference_kphio.In addition to changing the implementation, the default values of \(\phi_0\) have changed. In
1.0.0, thePModelfollowed Stocker et al. (2020) in using default values of either 0.081785 or 0.049977, depending on whether the model applied temperature correction to \(\phi_0\). These values were tuned to the particular model setup and the application of a water stress penalty. ThePModelandSubdailyPModelnow both default to the theoretical maximum quantum yield of photosynthesis (\(\phi_0 = 1/8\)).
The implementation of \(J_{max}\) and \(V_{cmax}\) limitation has been updated to provide a more flexible and expandable system. The changes are mostly internal, but there are two breaking changes:
The PModel option
method_jmaxlim = 'c4'has been removed - it only ever generated an instruction to use the settingsmethod_optchi='c4'andmethod_jmaxlim='simple'to duplicate therpmodelargumentmethod_jmaxlim='c4'.The PModel option
method_jmaxlim = 'simple'has been renamed tomethod_jmaxlim ='none', which is more informative!
The implementations of
PModelandSubdailyPModelin version 1.0.0 used different Arrhenius temperature scaling relationships for \(V_{cmax}\) and \(J_{max}\).PModelfollowedrpmodelin using an implementation of Kattge and Knorr (2007)’s peaked Arrhenius model, whereSubdailyPModelused a simple unpeaked form. Both P Model implementations now take an explicit setting for themethod_arrheniusand we provide thesimpleandkattge_knorroptions. The available methods are likely to change - and we only recommendmethod_arrhenius=simpleat present - but this API for setting this option should be stable.Breaking change The API has changed as noted above - critically, using default settings, the reported values for \(V_{cmax25}\) and \(J_{max25}\) using
PModelwill change between v1 and v2, with the shift fromkattge_knorrtosimpleas the default factors.Many of the arguments to
SubdailyPModelhave been brought together into a newAcclimationModelclass. This replacesSubdailyScalerand bundles all of the settings for acclimation into a single class. The following is therefore a breaking change:SubdailyScalerhas been replaced withAcclimationModel, and the following arguments toSubdailyPModelare now arguments toAcclimationModel:alpha,allow_holdover,allow_partial_data,update_point,fill_kind(asfill_method).
The legacy implementation
SubdailyPModel_JAMEShas been deprecated. This implementation duplicated the original Mengoli et al JAMES code. This was largely a proof of concept implementation, misses some key parts of the acclimation model and the internal calculations are sufficiently different that there is a high maintenance cost to updating it to the new API in version 2.0.0.The
fill_fromargument tofill_daily_to_subdailywas only required forSubdailyPModel_JAMESand so this has also been deprecated.
The functions
calculate_ftemp_kphioandcalculate_ftemp_inst_vcmaxprovided narrow use cases with code duplication. They have been replaced by two broader Arrhenius functions:calculate_simple_arrhenius_factorandcalculate_kattge_knorr_arrhenius_factor. The functions inpyrealm.pmodel.functionshave been updated to take specific arguments rather than just takingPModelConstsandCoreConstsobjects.The
pyrealm.core.watermodule now providesconvert_water_mm_to_moles,convert_water_moles_to_mmandcalculate_water_molar_volume.The first components in the experimental
demographymodule, providing an integrated set of submodules that provide: plant functional types, size-structured cohorts, plant communities, a community canopy model and an implementation of the T Model for allocation and growth. Release2.0.0-rc.3fixed some details of updating cohort counts when adding or dropping cohorts from a community (#481) and moves calculation of per stem GPP outside of StemAllocation rather than pinning it to use the big leaf approximation (#480). Release2.0.0-rc.4replaced the canopy and light capture model, which had been incorrectly implemented.An initial implementation of the “two leaf, two stream” model of light interception. This is still in experimental form, but provides an extension to the default big-leaf approximation used to model light interception for the P Model.
The first components of the experimental
phenologymodule have been added. The main functionality in version2.0.0is theFaparLimitationclass that calculates annual limits to \(f_{APAR}\) and \(LAI\) based on energy and water limitation of GPP. The module includes a new golden dataset inpyrealm_build_data.phenology. This module is supported by the newcore.time_series.AnnualValueCalculatorclass, which is designed to calculate annual values over time series data with varying temporal resolution. Later releases will extend this module to implement the calculation of daily predictions of leaf area index and fAPAR from annual limitations and productivity.An extension of the Subdaily P Model that allows the initial realised responses to be provided rather than assuming that they are equal to the initial optimal responses.
The
pyrealm.splashmodule has been heavily revised to break out functions within the classes into standalone functions. This adds thepyrealm.core.solarmodule, providing core solar calculations.Restructuring of the developer tools for testing code performance to provide a simpler local performance testing routine, and added a CI test to ensure the performance tests are kept up to date with the package API.
Update to using
poetry 2.0
1.0.0
Addition of a more pythonic re-implementation of the SPLASH v1.0 model with a more flexible user interface and faster calculation.
Revision of the optimal chi calculation internals - better internal structure and extensible framework, with option to constrain xi values to allow slow acclimation of xi.
Updated implementation of the SubdailyPModel (renamed from FastSlowPModel) to use the new optimal chi structure and allow it to be used with all optimal chi models, including C4 photosynthesis.
Updated and revised unit testing.
Dropped support for Python 3.9 for first main release and to adopt more recent typing syntax and added Python 3.12.
Updated code to work with the recent release of
numpy 2.0.Updated the developer tool chain to move to
rufffor code linting and formatting.
0.10.1
Addition of draft extension of subdaily memory_effect function that allows for missing data arising from non-estimable Jmax and Vcmax.
0.10.0
Implementation of the Mengoli et al 2023 soil moisture penalty factor. The existing calc_soilmstress function is now calc_soilmstress_stocker and the new function is calc_soilmstress_mengoli.
The soilmstress argument to PModel is removed and both the Mengoli and Stocker approaches are now intended to be applied as penalties to GPP after P Model fitting, allowing the two to be compared from the same P Model outputs.
0.9.0
Draft implementation of slow responses in P Model using weighted average approach
Substantial maintenance review
User facing breaking changes:
Support for scalar inputs removed - numpy arrays now expected as inputs.
Python minimum version is now 3.9
Hygrometric functions moved from utilities to new hygro module
Param classes are now Const classes.
Stomatal conductance not estimated when VPD = 0.
Detailed changes:
Moved support python versions to >=3.9, <3.11
Update to poetry 1.2+
Implementing mypy checking via pre-commit and package config
Fixed mypy errors (missing types, clashes etc)
Updated typing to use consistent NDArray and remove edge case code to handle scalar inputs. Users now expected to provide arrays.
Using importlib to single source package version from pyproject.toml
Moved test/ to tests/ and added init.py - module paths in testing.
Partial restructure of TModel code and extended test suite
Extended test suite for hygrometric functions, bug fix in HygroConst.
Better definition and handling of class attributes to avoid unnecessary Optional types in init methods.
Updated docstrings, particularly class attributes now docstringed in place.
bounds_checker module merged into utilities module
Huge pmodel.py file split into a pmodel module and pmodel, functions, isotopes and competition submodules. All members still exposed via pyrealm.pmodel for ease of use/backwards compatibility. References to API links updated.
param_classes.py used as the basis for a new constants module with smaller better documented files and XYZConst naming scheme.
‘(pmodel)_params’ style arguments updated to ‘const’, docs updated to match.
C3C4 competition private functions now exposed as stand-alone functions with cleaner docs and demo usage.
Reorganisation of website index and page structure, nitpicking of links turned on and broken links fixed.
Switch away from astrorefs to sphinxcontrib.bibtex, which now supports author_year citation styling.
Constrain estimation of g_s to exclude VPD = 0 and ca - ci = 0, which give values tending to limit of infinity.
0.8.1
Updates and fixes and docs on soil moisture optimal chi methods (
lavergne20_c4)Shifting package management to using poetry and implementing better QA toolchain including pre-commit suite.
Moving docs out of root and into docs/source, docs/build etc.
0.8.0
Addition of a parallel C4 method for the
lavergne20CalcOptimalChi method. The methods are now calledlavergne20_c3andlavergne20_c4.Addition of default theta model parameters for
lavergne20_c4giving beta predictions as 1/9 of those for C3.Update of soil moisture option handling in PModel to avoid conflicting approaches (rootzonestress, soilmstress, lavergne20_cX).
Updated docs for the CalcOptimalChi methods and soil moisture page.
Addition of an explicit ExperimentalFeatureWarning - currently rootzonestress and lavergne20_c4.
0.7.0
Implementation of alternative methods for CalcOptimalChi, including Lavergne et al 2020 soil theta estimation of beta, c4 with negigible photorespiration.
Addition of optional soil theta to PModelEnvironment, underpinning the lavergne2020 CalcOptimalChi method.
Alteration of PModel arguments. Since there are now different options for simulating C3/C4, the c4 argument is replaced with method_optchi, which sets C3/C4 status internally from the method selected.
Refactor and integration of Alienor’s CalcCarbonIsotopes and C3C4Competition models, from: https://github.com/Alielav/pyrealm/tree/alienorlavergne
Refactor of utilities TemporalInterpolator and DailyRepresentativeValues to handle multiple dimensions and ragged arrays of indices.
Extended pytest framework to include TemporalInterpolator, DailyRepresentativeValues, CalcCarbonIsotopes and C3C4Competition.
0.6.0
Breaking change to inputs to CalcOptimalChi - now uses PModelEnvironment object directly, not named args for kmm etc.
PModel testing update: new set of input test values of 100 values across envt space, not just 4 arbitrary values. Updated R outputs.
Restructure of test_pmodel - much cleaner use of parameterisations args.
Addition of units to utilities.summarize_attr and extensive addition of units throughout docs.
Flexibility in the units of PPFD - previous versions were agnostic about However, that leads to nonsensical values of Jmax and Vcmax, which must the units of PPFD - so that the scaling of GPP could be set by the user. be in µmol m-2 s-1. So, PPFD now must also be in µmol m-2 s-1.
Bug in Jmax calculation - not carrying ftemp_kphio correctly into calculation - corrected by baking ftemp_kphio correction to kphio early.
Breaking change to calculation of Jmax and Vcmax. Previous versions followed rpmodel in using a more complex calculation for Jmax and Vcmax that allowed Stocker’s empirical soil moisture effects (beta(theta)) to be worked back into Vcmax then Jmax, rd and gs. pyrealm no longer does this: the soil moisture correction is applied only to LUE and the getter function for vcmax, jmax, gs and rd issue a warning that they are uncorrected when soil moisture effects are applied.
Internal changes - the CalcLUEVcmax class has been retired. This structuring was integral to the soil moisture correction approach, but with that change, a simple JmaxLimitation class replaces it.
Updated value of param_classes.PModelParam.soilmstress_b to published default
0.5.6
Bugs in calculation of Jmax and g_s fixed.
Fixed issue with utilities.summarize_attr with masked arrays containing all NaN values
0.5.5
Fixing the calculation of stomatal conductance for C4 plants - not infinite
Added estimate_productivity.md in docs to show behaviour of those variables for C3 and C4 - revealed some issues!
0.5.4
Updated CalcOptimalChi to return an actual estimate of chi for C4 plants, not just 1.0. Updated documentation and examples to illustrate.
0.5.3
Replaced ConstrainedArray and masked arrays with input_bounds_checker and ‘masking’ using np.nan. See notes in pyrealm/bounds_checker.py. This was revisited even before release to remove built in masking completely and just provide some warnings on sane ranges. A hard limit for temps < 25°C is imposed due to the behaviour of calc_density_h2o.
0.5.2
Fix for critical bug in mj calculation - using masked arrays is fragile, need to consider this - and the constraint approach which generates masked inputs.
0.5.1
Minor tweaks to utilities param classes
Backtrack on constrained_arrays - unexpected issues with chained use. Currently just turning off a single constraint.
0.5.0
Refactor of constrained_array modules to use a class factory that acts as both a constraint and a check on existing constraint types.
Implementation of the utilities module, currently including some hygrometric conversions and shared utility functions.
Refactor of PModel and Iabs scaling
Better repr and new summarize() functions in pmodel module.
0.4.0
Refactor of the PModel to separate calc of gammastar etc, from the pmodel itself: PModelEnvironment and PModel classes.
Implementation of ConstrainedArray class to clip inputs to biologically meaningful ranges and to identify that clipping has occurred. Particular issue with serious numerical instability in calc_density_h2o, but now adopted a general solution to clipping inputs.
Expansion of PModel testing to include a global array giving a wider range of inputs including edge cases.
Created option for using a rootzonestress option (Rodolfo Nobrega)
0.3.1
Restructure of requirements and install_requires for better pip install
0.3.0
Refactor of parameter classes into param_classes module with consistent ParamClass baseclass for import/export and dataclass based interface.
0.2.0
Implementation of the T model
0.1.4
Rescaled ftemp_kphio to remove double division error
Disabled C4 pytests while rpmodel retains this issue.
0.1.3
Clipping negative values in calc_ftemp_kphio
0.1.2
Fixing problems with setup for PyPi publication.
0.1.1
(aka hotfix/bad_setup). Fixing problems in setup.py
0.1.0
First release of pyrealm. Implementation of P model