pyVPRM and its extension pyVPRNN are data-driven models for analyzing and estimating carbon flux exchange between the atmosphere and the terrestrial biosphere — from single flux-tower footprints up to global scale — using multi-spectral satellite observations.
📄 Paper: Glauch et al. (2025), pyVPRM: a next-generation vegetation photosynthesis and respiration model for the post-MODIS era, Geoscientific Model Development, 18(14), 4713–4742. A pyVPRNN paper is in preparation.
🚀 New here? Start with the example repository — it's the fastest way to see the pipeline end to end.
If you use this package in your research, please cite:
Glauch, T., Marshall, J., Gerbig, C., Botía, S., Gałkowski, M., Vardag, S. N., & Butz, A. (2025). pyVPRM: A next-generation vegetation photosynthesis and respiration model for the post-MODIS era. Geoscientific Model Development, 18(14), 4713–4742. https://doi.org/10.5194/gmd-18-4713-2025
BibTeX
@Article{gmd-18-4713-2025,
AUTHOR = {Glauch, T. and Marshall, J. and Gerbig, C. and Bot\'{\i}a, S. and Ga{\l}kowski, M. and Vardag, S. N. and Butz, A.},
TITLE = {\textit{pyVPRM}: a next-generation vegetation photosynthesis and respiration model for the post-MODIS era},
JOURNAL = {Geoscientific Model Development},
VOLUME = {18},
YEAR = {2025},
NUMBER = {14},
PAGES = {4713--4742},
URL = {https://gmd.copernicus.org/articles/18/4713/2025/},
DOI = {10.5194/gmd-18-4713-2025}
}Open an issue, or reach out directly: theo.glauch@dlr.de
⭐ If pyVPRM is useful for your work, consider starring the repo — it helps visibility and continued support for the project.
pyVPRM is a Python package for estimating CO₂ exchange between the atmosphere and the terrestrial biosphere using the Vegetation Photosynthesis and Respiration Model (VPRM).
VPRM represents two opposing fluxes — Gross Primary Productivity (GPP), the uptake of CO₂ through photosynthesis, and ecosystem respiration (Reco), the release of CO₂ back to the atmosphere. Their balance gives the Net Ecosystem Exchange (NEE), the net flux actually measured at a flux tower or resolved on a model grid.
pyVPRM provides a flexible, modular implementation that lets you mix and match data sources for vegetation, land cover, and meteorological forcing:
- Satellite products — Sentinel-2, MODIS, VIIRS, and others
- Land-cover datasets — Copernicus Land Cover Service, ESA WorldCover (10 m), MapBiomas
- Meteorological forcing — standard reanalyses such as ECMWF ERA5
- Modular architecture — built to be extended and customized rather than used only as-is
- Optimize VPRM parameters against eddy-covariance flux tower observations (FLUXNET, ICOS, ...)
- Estimate and predict CO₂ fluxes for any user-defined domain, from regional to global scale
- Generate VPRM input fields for coupled atmospheric models such as the Weather Research and Forecasting (WRF) model
- Partition measured fluxes into GPP and Reco using a process-informed neural network approach (pyVPRNN)
- Interpret partitioned GPP/Reco responses to meteorological drivers using explainable AI
We recommend setting up a dedicated virtual environment for pyVPRM and installing all dependencies there.
If you're using conda, it's worth following best practices for mixing conda and pip — this post from Anaconda gives a good overview: Using pip in a conda environment.
pyVPRM requires the Earth System Modeling Framework (ESMF) and its Python interface, ESMPy, for any functionality involving regridding.
Many HPC systems built for Earth system modeling and climate research already have ESMF pre-installed — if so, just confirm that both esmf and esmpy are available in your environment. If not, you'll need to install it yourself:
Installing netCDF4 alongside ESMF is also recommended, for full functionality.
conda create -n pyvprm python=3.14
conda activate pyvprm
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install dask netCDF4 esmf esmpyThen install pyVPRM itself via pip:
pip install pyVPRMIf you're actively developing
pyVPRM(rather than just using it), install it as an editable clone instead so local edits are picked up immediately without reinstalling.
To start your own pyVPRM project, you'll typically:
- Obtain the satellite data for your region of interest
- Obtain the corresponding land-cover map(s) for your region of interest
- Create a project configuration file
- Generate project-specific scripts using the
VPRMclass inVPRM.py - Run the calculations
- Land cover
- Satellite imagery
- MODIS / VIIRS: LP DAAC Data Pool
- Sentinel-2: Copernicus Data Space Ecosystem (the former Copernicus Open Access Hub / SciHub was permanently retired in November 2023 — use this instead)
If no interface exists yet for your satellite product or land-cover dataset:
- Implement a new subclass in
pyVPRM/sat_managers/ - For a new land-cover product, also provide a mapping from its land-cover classes to VPRM classes, defined in a config file under
pyVPRM/vprm_configs/
pyVPRM follows a modular design: satellite imagery, land cover maps, meteorological data, flux tower datasets, and VPRM model implementations can each be swapped or extended independently. The directory layout reflects this:
Core classes for handling satellite imagery and land cover maps.
satellite_data_manager is the base class for all satellite- and land-cover-related data in pyVPRM, providing shared functionality — reprojection, transformation, merging, cropping — that every product-specific subclass builds on. Each supported satellite or land-cover product has its own subclass file in this directory.
Configuration files defining, for each supported land-cover product, the mapping from that product's own land-cover classes to VPRM's internal vegetation classes (plus the associated tmin/topt/tmax/tlow temperature parameters per class). Required for any land-cover product you add — see Extending pyVPRM above.
Classes providing the meteorological interface to the model.
Meteorological data handling depends heavily on what's available on your own system — a generic, widely-usable option is the Destination Earth platform. All meteorology classes inherit from met_base_class.py; era5_class_draft.py is a worked example for adding a new meteorology source.
The different VPRM model implementations. Each one takes a VPRM preprocessor instance and a meteorology object as input.
Interfaces to flux tower datasets (FLUXNET, ICOS, etc.), including functionality for computing tower footprints from eddy-covariance measurements.