Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

The pyrealm logo: a green leaf over the shining sun.


PyPI - Version PyPI - Python Version Documentation Status codecov Test and build pre-commit.ci status SPEC 0 — Minimum Supported Dependencies

The pyrealm package provides a toolbox implementing some key models for estimating plant productivity, growth and demography in Python. The outputs of different models can be then easily fed into other models within pyrealm to allow productivity estimates to be fed forward into estimation of net primary productivity, growth and ultimately plant community demography.

The pyrealm package currently includes:

  • The P Model for estimating optimal rates of plant photosynthesis given the balance between carbon capture and water loss. This includes recent extensions to incorporate the effects of water stress, slow acclimation processes, models of C3/C4 competition and carbon isotope fractionation.
  • The SPLASH model for calculating soil moisture and actual evapotranspiration.
  • Initial components of a demography module for modelling plant functional types, cohorts, communities and canopies, including allocation calculations using the T Model.
  • A suite of core physics functions and other utilities used to support the modules above.

For more details, see the package website: https://pyrealm.readthedocs.io/.

Version overview

The pyrealm package uses semantic versioning and the list below summarise the major changes:

  • Version 3.0.0: extended and updated phenology and demography modules, small breaking changes to standardise function and class names and arguments.
  • Version 2.0.0: wide refactor of P Model code to a new API, extension of the package functionality to include the SPLASH v1 model and experimental modules developing functionality for plant demography and phenology.
  • Version 1.0.0: initial implementation of the P Model and associated functionality

We strongly recommend that you use the most recent major version. The documentation includes a migration guide to help update existing code.

Using pyrealm

The pyrealm package requires Python 3.12 or greater and we currently test all pyrealm code using Python 3.12, 3.13 and 3.14. We release new package versions through PyPi and you can install the most recent release using pip:

pip install pyrealm

You can now get started using pyrealm. For example, to calculate the estimated gross primary productivity of a C3 plant in a location, start a Python interpreter, using python, python3 or ipython depending on your installation, and run:

import numpy as np
from pyrealm.pmodel import PModelEnvironment, PModel

# Calculate the photosynthetic environment given the conditions
env = PModelEnvironment(
    tc=np.array([20]),
    vpd=np.array([1000]),
    co2=np.array([400]),
    patm=np.array([101325.0]),
    fapar=np.array([1]),
    ppfd=np.array([300]),
)

# Calculate the predictions of the P Model for a C3 plant
pmodel_c3 = PModel(env)

# Report the GPP in micrograms of carbon per m2 per second.
pmodel_c3.gpp

This should give the following output:

array([116.80365553])

The package website provides worked examples of using pyrealm, for example to:

These worked examples also show how pyrealm can be used within Python scripts or Jupyter notebooks and how to use pyrealm with large datasets loaded using numpy or xarray with pyrealm classes and functions.

Citing pyrealm

The pyrealm repository can be cited following the information in the citation file. If you are using pyrealm in research, it is better to cite the DOI of the specific release from Zenodo.

Developing pyrealm

If you are interested in contributing to the development of pyrealm, please read the guide for contributors. Please do also read the code of conduct for contributing to this project.

Support and funding

Development of the pyrealm package has been supported by the following grants and institutions:

Metadata

Release files for pyrealm 3.0.0rc5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyrealm 3.0.0rc5
File Size Uploaded Provenance Actions
pyrealm-3.0.0rc5.tar.gz 62.0 MB With provenance Details for pyrealm-3.0.0rc5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyrealm 3.0.0rc5
File Interpreter ABI Platform Actions
pyrealm-3.0.0rc5-py3-none-any.whl Python 3 none any Details for pyrealm-3.0.0rc5-py3-none-any.whl

Total release size: 62.2 MB

Release files / pyrealm-3.0.0rc5.tar.gz

Download URL pyrealm-3.0.0rc5.tar.gz
Size 62.0 MB
Tags Source
SHA-256 checksum
How to use checksums
8dc257f725cc46a451c8eae85d2c71c353ce075ccd693e054b8492af5bfcc046
BLAKE2b-256 checksum
How to use checksums
ba5c2f4039ed125548dce9f1d49625f5db98611d7e4634dde809ec2fa825a31a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / pyrealm-3.0.0rc5-py3-none-any.whl

Download URL pyrealm-3.0.0rc5-py3-none-any.whl
Size 181.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5c4edde3fed44d889fdb2e825eec8eb519325528c0574b50fedf4185d821932
BLAKE2b-256 checksum
How to use checksums
2e9a563553baded291a461977a359a7a72f9ab76ca2ae2106841aa4bb18e53e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for pyrealm 3.0.0rc5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyrealm-3.0.0rc5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page