pyVRPM is a data-driven model to estimate the carbon flux between the atmosphere and the terrestrial biosphere using multi-spectral satellite observations. A description of the model is published in Geoscientific Model Development (GMD) https://gmd.copernicus.org/articles/18/4713/2025/. If you use this package for you scientific work please cite as follows
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
or using 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}
}
In case of any questions please write an E-Mail to theo.glauch@dlr.de. If you enjoy the model leave a ⭐.
To get startet with pyVPRM check out the example repository: https://github.com/tglauch/pyVPRM_examples.git
With the new version - pyVPRM 5.3 - it is possible to replace the lowess filtering with a more stable Kalman filter. An example of the difference for EVI is shown below for the cropland site DE-RuS using Sentinel-2 data for 2022. The new function can be used by calling vprm_inst.kalman(...) instead of vprm_inst.lowess(...) for instances of the VPRM preprocessor class.
pyVPRM is a Python package for estimating the exchange of CO₂ between the atmosphere and the terrestrial biosphere using the Vegetation Photosynthesis and Respiration Model (VPRM).
The model represents both:
- Gross Primary Productivity (GPP)
- Ecosystem respiration (Reco)
The balance between these two components yields the Net Ecosystem Exchange (NEE).
pyVPRM provides a flexible and modular implementation of VPRM, allowing users to combine different data sources for vegetation, land cover, and meteorological forcing.
- Supports multiple satellite products (e.g. Sentinel-2, MODIS, VIIRS)
- Compatible with various land-cover datasets (e.g. Copernicus Land Cover Service, ESA WorldCover 10 m, MapBiomas)
- Uses standard meteorological reanalyses, such as ECMWF ERA5
- Modular design that facilitates extension and customization
pyVPRM can be used for, among others:
- Parameter optimization of VPRM against eddy-covariance flux tower observations (e.g. FLUXNET, ICOS)
- Regional CO₂ flux estimation and prediction for user-defined domains
- Generation of VPRM input fields for coupled atmospheric models such as the Weather Research and Forecasting (WRF) model
We generally recommend setting up a dedicated virtual environment for using pyVPRM and installing all required dependencies there.
If you are using conda, you may want to follow best practices for mixing conda and pip. The following blog post provides a good overview:
https://www.anaconda.com/blog/using-pip-in-a-conda-environment
pyVPRM requires the Earth System Modeling Framework (ESMF) and its Python interface ESMFpy for all functionalities that involve regridding.
On many HPC systems specialized for Earth system modeling and climate research, ESMF is already pre-installed. If this is the case, make sure that both esmf and esmpy are available in your environment.
If you need to install ESMF yourself, you can find installation instructions here:
- ESMF GitHub repository: https://github.com/esmf-org
- Conda-forge ESMF package: https://github.com/conda-forge/esmf-feedstock
To ensure full ESMF functionality, it is also recommended to install netCDF4.
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 via pip
pip install pyVPRM
To start your own pyVPRM project, you typically need to follow these steps:
- Obtain the required satellite data for your region of interest
- Obtain the corresponding land-cover maps for your region of interest
- Create a project configuration file
- Generate project-specific scripts using the functionality provided by the
VPRMclass inVPRM.py - Run the calculations
- If no interface exists yet for your satellite product or land-cover dataset, implement a new subclass in
pyVPRM/sat_managers/ - For new land-cover products, you must additionally provide a mapping from land-cover classes to VPRM classes.
This mapping is defined in a configuration file stored inpyVPRM/vprm_configs/ - Open-access land-cover datasets:
- Copernicus Global Land Service: https://land.copernicus.eu/en/products/global-dynamic-land-cover
- ESA WorldCover: https://viewer.esa-worldcover.org
- Open-access satellite data:
- MODIS, VIIRS: https://e4ftl01.cr.usgs.gov
- Sentinel-2: https://scihub.copernicus.eu
To help you get started with pyVPRM, we provide a companion repository containing example scripts, each with their own README files and in-line comments:
https://github.com/tglauch/pyVPRM_examples.git
The repository includes examples for:
- Generating WRF input files:
./wrf_preprocessor - Generating VPRM fluxes (GPP / NEE):
./vprm_predictions - Fitting VPRM parameters:
./fit_vprm_parameters - Downloading MODIS/VIIRS data using
pyVPRM:./sat_data_download
Clone the full example repository with:
git clone https://github.com/tglauch/pyVPRM_examples.git
The repository comes with pre-prepared input data, so you can run the examples immediately without downloading or preprocessing any datasets.
The pyVPRM implementation follows a modular design that allows easy replacement and extension of
satellite imagery, land cover maps, meteorological data, flux tower datasets, and VPRM model implementations.
The directory structure is outlined below.
This directory contains the core classes for handling satellite imagery and land cover maps.
The satellite_data_manager class provides the base data structure for all satellite- and land-cover-related calculations in pyVPRM. It implements common functionality such as:
- reprojection
- transformation
- merging
- cropping
All satellite- or land-cover-specific classes (including their respective data loading routines) inherit from this base class and are implemented as separate class files within this directory.
This directory contains classes that provide the meteorological interface for the model.
Meteorological data handling typically depends on the data availability on the user’s system.
A generic and widely applicable option is the Destination Earth platform
(https://platform.destine.eu/).
All meteorology classes inherit from the base class defined in met_base_class.py.
An example implementation for adding a new meteorology source is provided in era5_class_draft.py.
This directory contains the different implementations of the VPRM model.
Each model requires:
- an instance of the VPRM preprocessor class, and
- a corresponding meteorology object
as input.
This directory provides interfaces to different flux tower datasets (e.g. FLUXNET, ICOS, etc.).
It also includes functionality to compute tower footprints from eddy covariance measurements.