pyrealm
Providing an integrated toolbox for modelling plant productivity, growth and demography using Python.
https://github.com/ImperialCollegeLondon/pyrealm
Category: Biosphere
Sub Category: Plants and Vegetation
Keywords from Contributors
energy-system-model crop images distribution accessor categories root mesh pypi routing
Last synced: about 19 hours ago
JSON representation
Repository metadata
Development of the pyrealm package, providing an integrated toolbox for modelling plant productivity, growth and demography using Python.
- Host: GitHub
- URL: https://github.com/ImperialCollegeLondon/pyrealm
- Owner: ImperialCollegeLondon
- License: mit
- Created: 2020-12-01T17:31:18.000Z (about 5 years ago)
- Default Branch: develop
- Last Pushed: 2025-11-27T16:11:16.000Z (28 days ago)
- Last Synced: 2025-11-28T05:57:44.308Z (28 days ago)
- Language: Python
- Homepage: https://pyrealm.readthedocs.io/
- Size: 145 MB
- Stars: 33
- Watchers: 2
- Forks: 10
- Open Issues: 60
- Releases: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
README.md
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
1.0.0: initial implementation of the P Model and associated functionality - 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.
We strongly recommend that you update to version 2.0.0. The documentation
includes a migration
guide to help update
existing code using version 1.0.0.
Using pyrealm
The pyrealm package requires Python 3.11 or greater and we currently test all
pyrealm code using Python 3.11, 3.12 and 3.13. We make released package versions
available via PyPi and also generate DOIs for each
release via Zenodo. 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=1, ppfd=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([76.42544948])
The package website provides worked examples of using pyrealm, for example to:
- fit the P
Model, - include acclimation in estimating light use
efficiency
, and - estimate C3/C4
competition.
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:
- The REALM project, funded by
an ERC grant to Prof. Colin Prentice
(Imperial College London). - The LEMONTREE project, funded by Schmidt
Sciences through the VESRI
programme
to support an international research team lead by Prof. Sandy Harrison (University of
Reading). - The Virtual Rainforest project, funded by a
Distinguished Scientist award from the NOMIS
Foundation
to Prof. Robert Ewers (Imperial College London) - Research software engineering support from the Institute of Computing for Climate
Science at the University of Cambridge, through the Virtual
Institute for Scientific
Software
program funded by Schmidt Sciences.
Citation (CITATION.cff)
cff-version: 1.2.0
title: pyrealm
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: C. David L.
family-names: Orme
email: d.orme@imperial.ac.uk
affiliation: Department of Life Sciences, Imperial College London
orcid: 'https://orcid.org/0000-0002-7005-1394'
- given-names: Alienor
family-names: Lavergne
email: alienor.lavergne@springernature.com
affiliation: Department of Life Sciences, Imperial College London
- given-names: Vivienne
family-names: Groner
email: v.groner@imperial.ac.uk
affiliation: Department of Life Sciences, Imperial College London
- given-names: Marion
family-names: Weinzierl
email: mw925@cam.ac.uk
affiliation: Institute of Computing for Climate Science, University of Cambridge
- given-names: Tianzhang
family-names: Cai
email: tc684@cam.ac.uk
affiliation: Institute of Computing for Climate Science, University of Cambridge
- given-names: Surbhi
family-names: Goel
email: sg2147@cam.ac.uk
affiliation: Institute of Computing for Climate Science, University of Cambridge
- given-names: Alexander
family-names: Smith
email: as3402@cam.ac.uk
affiliation: Institute of Computing for Climate Science, University of Cambridge
- given-names: James
family-names: Emberton
email: je484@cam.ac.uk
affiliation: Institute of Computing for Climate Science, University of Cambridge
- given-names: Amy
family-names: Pike
email: ap766@cam.ac.uk
affiliation: Institute of Computing for Climate Science, University of Cambridge
repository-code: 'https://github.com/ImperialCollegeLondon/pyrealm'
url: 'https://pyrealm.readthedocs.io'
repository: 'https://pypi.org/project/pyrealm/'
abstract: >-
The pyrealm package provides an integrated set of Python 3
modules for modelling plant productivity, growth and
demography and the estimation of growing conditions.
license: MIT
Owner metadata
- Name: Imperial College London
- Login: ImperialCollegeLondon
- Email: icgithub-support@imperial.ac.uk
- Kind: organization
- Description: Imperial College main code repository
- Website:
- Location: Imperial College London
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/1220306?v=4
- Repositories: 311
- Last ynced at: 2023-03-14T09:25:14.124Z
- Profile URL: https://github.com/ImperialCollegeLondon
GitHub Events
Total
- Create event: 89
- Release event: 6
- Issues event: 159
- Watch event: 13
- Delete event: 91
- Member event: 4
- Issue comment event: 271
- Push event: 564
- Pull request review event: 262
- Pull request review comment event: 188
- Pull request event: 195
- Fork event: 3
Last Year
- Create event: 80
- Release event: 6
- Issues event: 145
- Watch event: 11
- Delete event: 78
- Member event: 4
- Issue comment event: 235
- Push event: 511
- Pull request review comment event: 175
- Pull request event: 175
- Pull request review event: 237
- Fork event: 2
Committers metadata
Last synced: about 2 months ago
Total Commits: 2,215
Total Committers: 14
Avg Commits per committer: 158.214
Development Distribution Score (DDS): 0.303
Commits in past year: 642
Committers in past year: 7
Avg Commits per committer in past year: 91.714
Development Distribution Score (DDS) in past year: 0.421
| Name | Commits | |
|---|---|---|
| David Orme | d****e | 1543 |
| MarionBWeinzierl | m****5@c****k | 178 |
| James Emberton | j****n@g****m | 146 |
| tztsai | 1****4@q****m | 88 |
| pre-commit-ci[bot] | 6****] | 84 |
| Sam Avis | a****6@g****m | 42 |
| TZCai | 1****9@1****m | 39 |
| Surbhi Goel | s****7@g****m | 38 |
| Sally | s****n@g****m | 17 |
| Alexander Smith | a****x@g****m | 15 |
| arne | s****e@g****m | 13 |
| Amy Pike | a****e@h****k | 6 |
| vgro | v****o | 5 |
| github-actions[bot] | 4****] | 1 |
Committer domains:
- hotmail.co.uk: 1
- github.com: 1
- 163.com: 1
- qq.com: 1
- cam.ac.uk: 1
Issue and Pull Request metadata
Last synced: about 2 months ago
Total issues: 224
Total pull requests: 416
Average time to close issues: about 2 months
Average time to close pull requests: 14 days
Total issue authors: 14
Total pull request authors: 12
Average comments per issue: 0.74
Average comments per pull request: 1.99
Merged pull request: 332
Bot issues: 1
Bot pull requests: 97
Past year issues: 98
Past year pull requests: 207
Past year average time to close issues: 16 days
Past year average time to close pull requests: 6 days
Past year issue authors: 7
Past year pull request authors: 7
Past year average comments per issue: 0.53
Past year average comments per pull request: 1.53
Past year merged pull request: 165
Past year bot issues: 1
Past year bot pull requests: 54
Top Issue Authors
- davidorme (150)
- MarionBWeinzierl (31)
- j-emberton (17)
- tztsai (5)
- sjavis (4)
- surbhigoel77 (4)
- AmyOctoCat (3)
- arne-exe (2)
- sallymatson (2)
- a-smith-github (2)
- Syuizen (1)
- mondus (1)
- github-actions[bot] (1)
- VallesMarinerisExplorer (1)
Top Pull Request Authors
- davidorme (222)
- pre-commit-ci[bot] (83)
- MarionBWeinzierl (31)
- tztsai (25)
- github-actions[bot] (14)
- j-emberton (12)
- sjavis (9)
- surbhigoel77 (8)
- AmyOctoCat (7)
- arne-exe (2)
- sallymatson (2)
- a-smith-github (1)
Top Issue Labels
- bug (32)
- enhancement (26)
- rse (17)
- roadmap (11)
- meta (8)
- documentation (8)
- core devs (7)
- code review (2)
- icebox (2)
- duplicate (1)
- testing (1)
- outreach (1)
Top Pull Request Labels
- enhancement (21)
- documentation (10)
- rse (9)
- roadmap (3)
- code review (2)
- testing (2)
- core devs (1)
Package metadata
- Total packages: 3
-
Total downloads:
- pypi: 3,018 last-month
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 1 (may contain duplicates)
- Total versions: 44
- Total maintainers: 1
proxy.golang.org: github.com/ImperialCollegeLondon/pyrealm
- Homepage:
- Documentation: https://pkg.go.dev/github.com/ImperialCollegeLondon/pyrealm#section-documentation
- Licenses: mit
- Latest release: v2.0.0+incompatible (published 3 months ago)
- Last Synced: 2025-10-29T20:09:55.738Z (about 2 months ago)
- Versions: 8
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.395%
- Average: 5.576%
- Dependent repos count: 5.758%
proxy.golang.org: github.com/imperialcollegelondon/pyrealm
- Homepage:
- Documentation: https://pkg.go.dev/github.com/imperialcollegelondon/pyrealm#section-documentation
- Licenses: mit
- Latest release: v2.0.0+incompatible (published 3 months ago)
- Last Synced: 2025-10-29T20:09:56.171Z (about 2 months ago)
- Versions: 8
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.395%
- Average: 5.576%
- Dependent repos count: 5.758%
pypi.org: pyrealm
Python tools for modelling plant productivity and demography.
- Homepage: https://pyrealm.readthedocs.io/
- Documentation: https://pyrealm.readthedocs.io/
- Licenses: MIT License
- Latest release: 2.0.0 (published 3 months ago)
- Last Synced: 2025-10-29T20:09:56.234Z (about 2 months ago)
- Versions: 28
- Dependent Packages: 0
- Dependent Repositories: 1
- Downloads: 3,018 Last month
-
Rankings:
- Dependent packages count: 10.052%
- Forks count: 15.314%
- Average: 17.149%
- Stargazers count: 18.46%
- Downloads: 20.28%
- Dependent repos count: 21.642%
- Maintainers (1)
Dependencies
- netCDF4 *
- pre-commit *
- pytest *
- pyyaml *
- actions/checkout v2 composite
- actions/setup-python v2 composite
- browniebroke/pre-commit-autoupdate-action main composite
- peter-evans/create-pull-request v3 composite
- abatilo/actions-poetry v2.1.6 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pre-commit/action v3.0.0 composite
- 131 dependencies
- Bottleneck ^1.3.5
- dacite ^1.6.0
- numpy ^1.16.5
- python >=3.9,<3.11
- scipy ^1.7.3
- tabulate ^0.8.10
Score: 15.18466893313743