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 distribution accessor images unitful categories root energy-systems routing
Last synced: about 13 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 (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2025-04-11T16:35:50.000Z (16 days ago)
- Last Synced: 2025-04-13T00:35:37.987Z (15 days ago)
- Language: Python
- Homepage: https://pyrealm.readthedocs.io/
- Size: 134 MB
- Stars: 30
- Watchers: 3
- Forks: 9
- Open Issues: 55
- Releases: 8
-
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 2.0.0 development
New functionality being implemented after version 1.0.0 has lead to some immediate
breaking changes in the API, for example in the handling of quantum yield settings in
the class signatures for the PModel
and SubdailyPModel
. As the package uses
semantic versioning, these changes to the API require that new
releases be made under a new major version.
We will be publishing a series of "release candidates" of the 2.0.0 package. These will
be used to identify issues with the current API and try to stabilise a new API. The
content of version 2.0.0 is not yet finalised, so these release candidates may also add
new functionality.
We recommend that you update to the most recent release candidate of version 2.0.0. The
documentation now includes a migration
guide to help update
existing code.
pyrealm
Using The pyrealm
package requires Python 3 and the currently supported Python versions are:
3.10, 3.11 and 3.12. 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.
pyrealm
Citing 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.
pyrealm
Developing 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: [email protected] affiliation: Department of Life Sciences, Imperial College London orcid: 'https://orcid.org/0000-0002-7005-1394' - given-names: Alienor family-names: Lavergne email: [email protected] affiliation: Department of Life Sciences, Imperial College London - given-names: Vivienne family-names: Groner email: [email protected] affiliation: Department of Life Sciences, Imperial College London - given-names: Marion family-names: Weinzierl email: [email protected] affiliation: Institute of Computing for Climate Science, University of Cambridge - given-names: Tianzhang family-names: Cai email: [email protected] affiliation: Institute of Computing for Climate Science, University of Cambridge - given-names: Surbhi family-names: Goel email: [email protected] affiliation: Institute of Computing for Climate Science, University of Cambridge - given-names: Alexander family-names: Smith email: [email protected] affiliation: Institute of Computing for Climate Science, University of Cambridge - given-names: James family-names: Emberton email: [email protected] affiliation: Institute of Computing for Climate Science, University of Cambridge - given-names: Amy family-names: Pike email: [email protected] 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: [email protected]
- 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: 65
- Release event: 3
- Issues event: 129
- Watch event: 10
- Delete event: 63
- Member event: 4
- Issue comment event: 216
- Push event: 419
- Pull request review event: 186
- Pull request review comment event: 130
- Pull request event: 148
- Fork event: 1
Last Year
- Create event: 65
- Release event: 3
- Issues event: 129
- Watch event: 10
- Delete event: 63
- Member event: 4
- Issue comment event: 216
- Push event: 419
- Pull request review event: 186
- Pull request review comment event: 130
- Pull request event: 148
- Fork event: 1
Committers metadata
Last synced: 5 days ago
Total Commits: 1,925
Total Committers: 13
Avg Commits per committer: 148.077
Development Distribution Score (DDS): 0.259
Commits in past year: 835
Committers in past year: 9
Avg Commits per committer in past year: 92.778
Development Distribution Score (DDS) in past year: 0.341
Name | Commits | |
---|---|---|
David Orme | d****e | 1427 |
James Emberton | j****n@g****m | 146 |
tztsai | 1****4@q****m | 88 |
MarionBWeinzierl | m****5@c****k | 70 |
pre-commit-ci[bot] | 6****] | 60 |
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
- cam.ac.uk: 1
- qq.com: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 256
Total pull requests: 252
Average time to close issues: about 2 months
Average time to close pull requests: 14 days
Total issue authors: 13
Total pull request authors: 13
Average comments per issue: 1.07
Average comments per pull request: 1.92
Merged pull request: 220
Bot issues: 0
Bot pull requests: 46
Past year issues: 146
Past year pull requests: 142
Past year average time to close issues: 19 days
Past year average time to close pull requests: 12 days
Past year issue authors: 9
Past year pull request authors: 10
Past year average comments per issue: 0.89
Past year average comments per pull request: 2.11
Past year merged pull request: 124
Past year bot issues: 0
Past year bot pull requests: 31
Top Issue Authors
- davidorme (185)
- MarionBWeinzierl (25)
- j-emberton (17)
- tztsai (7)
- surbhigoel77 (6)
- AmyOctoCat (3)
- a-smith-github (3)
- arne-exe (2)
- sjavis (2)
- sallymatson (2)
- mondus (2)
- Syuizen (1)
- VallesMarinerisExplorer (1)
Top Pull Request Authors
- davidorme (147)
- pre-commit-ci[bot] (31)
- tztsai (17)
- MarionBWeinzierl (16)
- github-actions[bot] (15)
- j-emberton (9)
- surbhigoel77 (5)
- AmyOctoCat (4)
- Alielav (4)
- a-smith-github (1)
- arne-exe (1)
- sjavis (1)
- sallymatson (1)
Top Issue Labels
- bug (38)
- enhancement (33)
- rse (33)
- code review (13)
- documentation (13)
- roadmap (11)
- core devs (9)
- meta (9)
- icebox (3)
- outreach (1)
- duplicate (1)
- question (1)
- testing (1)
Top Pull Request Labels
- enhancement (14)
- rse (7)
- code review (2)
- roadmap (2)
- documentation (2)
- core devs (1)
- testing (1)
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 2,406 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 24
- Total maintainers: 1
pypi.org: pyrealm
Python tools for modelling plant productivity and demography.
- Homepage: https://pyrealm.readthedocs.io/
- Documentation: https://pyrealm.readthedocs.io/
- Licenses: MIT
- Latest release: 1.0.0 (published 10 months ago)
- Last Synced: 2025-04-26T13:39:43.949Z (1 day ago)
- Versions: 24
- Dependent Packages: 0
- Dependent Repositories: 1
- Downloads: 2,406 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: 14.794152420380565