# tglauch/pyvprm architecture

> Architecture diagram of the GitHub repository tglauch/pyvprm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tglauch/pyvprm
- Repository: https://github.com/tglauch/pyvprm

## Overview

pyVPRM is a modular biosphere carbon-flux modeling package, with pyVPRNN as its neural-network partitioning extension. The documented workflow combines satellite and land-cover inputs with meteorological forcing, then estimates or partitions GPP and ecosystem respiration (Reco), whose balance is NEE; flux-tower observations support parameter optimization and footprint-based analysis. The graph preserves these distinct product stages and major documented capabilities. Some subsystem links reflect README descriptions because their implementation was not sampled; those links are marked dashed or omitted where invocation is not evidenced.

Main entry points: [`pyVPRM/vprm_models/pyvprnn_v1.py`](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/pyvprnn_v1.py) (pyVPRNN v1), [`pyVPRM/VPRM.py`](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/VPRM.py) (Project workflow), [`pyVPRM/sat_managers/base_manager.py`](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/sat_managers/base_manager.py) (Satellite manager), [`pyVPRM/vprm_models/pyvprnn.py`](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/pyvprnn.py) (pyVPRNN core)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Environmental inputs"]
  node_sat_core["Satellite manager<br/>[base_manager.py]"]
  node_sat_products["Satellite products"]
  node_modis_download["MODIS download<br/>[downmodis.py]"]
  node_met_base["Meteorology interface<br/>[met_base_class.py]"]
  node_era5["ERA5 forcing"]
end

subgraph group_tower["Tower observations"]
  node_tower_data["Tower observations"]
  node_footprint_base["Footprint analysis"]
  node_footprint_ffp["FFP footprint"]
  node_footprint_km["KM footprint"]
end

subgraph group_vprm["VPRM estimation"]
  node_vprm_entry["Project workflow<br/>[VPRM.py]"]
  node_vprm_base["VPRM model<br/>[vprm_base_model.py]"]
  node_vprm_modified["Modified VPRM"]
  node_vprm_footprint["Footprint VPRM"]
  node_vprm_noxeric["No-xeric VPRM"]
end

subgraph group_nn["Neural partitioning"]
  node_nn_base["pyVPRNN core<br/>[pyvprnn.py]"]
  node_nn_v1["pyVPRNN v1<br/>[pyvprnn_v1.py]"]
  node_nn_v2["pyVPRNN v2<br/>[pyvprnn_v2.py]"]
  node_nn_v3["pyVPRNN v3<br/>[pyvprnn_v3.py]"]
end

subgraph group_support["Shared processing"]
  node_utilities["Spatial and time utilities<br/>[functions.py]"]
  node_plots["Model plotting<br/>[fancy_plot.py]"]
end

node_user(("Researcher"))

node_user -->|"configures"| node_vprm_entry
node_vprm_entry -->|"uses"| node_sat_core
node_sat_core -->|"downloads via"| node_modis_download
node_sat_products -->|"extends"| node_sat_core
node_user -.->|"selects"| node_sat_products
node_user -.->|"obtains forcing"| node_era5
node_era5 -->|"implements"| node_met_base
node_user -.->|"supplies observations"| node_tower_data
node_tower_data -.->|"informs footprint"| node_footprint_base
node_footprint_ffp -->|"extends"| node_footprint_base
node_footprint_km -->|"extends"| node_footprint_base
node_vprm_entry -->|"calls"| node_utilities
node_user -.->|"estimates fluxes"| node_vprm_base
node_vprm_modified -->|"extends"| node_vprm_base
node_vprm_footprint -->|"uses"| node_footprint_ffp
node_vprm_footprint -->|"uses"| node_footprint_km
node_user -.->|"partitions fluxes"| node_nn_base
node_nn_v1 -->|"extends"| node_nn_base
node_nn_v2 -->|"extends"| node_nn_v1
node_nn_v3 -->|"uses"| node_nn_v1
node_nn_base -->|"calls"| node_utilities
node_nn_v1 -->|"uses"| node_plots
node_nn_v3 -->|"calls"| node_utilities

click node_vprm_entry "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/VPRM.py"
click node_sat_core "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/sat_managers/base_manager.py"
click node_sat_products "https://github.com/tglauch/pyvprm/tree/main/pyVPRM/sat_managers"
click node_modis_download "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/lib/downmodis.py"
click node_met_base "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/meteorologies/met_base_class.py"
click node_era5 "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/meteorologies/era5_land_destinE_new.py"
click node_tower_data "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/flux_tower_libs/flux_tower_class.py"
click node_footprint_base "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/flux_tower_libs/base_footprint_class.py"
click node_footprint_ffp "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/flux_tower_libs/FFP_footprint_class.py"
click node_footprint_km "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/flux_tower_libs/KM_footprint_class.py"
click node_vprm_base "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/vprm_base_model.py"
click node_vprm_modified "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/vprm_modified_model.py"
click node_vprm_footprint "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/vprm_base_model_footprint.py"
click node_vprm_noxeric "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/vprm_base_model_no_xeric.py"
click node_nn_base "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/pyvprnn.py"
click node_nn_v1 "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/pyvprnn_v1.py"
click node_nn_v2 "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/pyvprnn_v2.py"
click node_nn_v3 "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/pyvprnn_v3.py"
click node_utilities "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/lib/functions.py"
click node_plots "https://github.com/tglauch/pyvprm/blob/main/pyVPRM/lib/fancy_plot.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sat_core,node_sat_products,node_modis_download,node_met_base,node_era5 toneBlue
class node_tower_data,node_footprint_base,node_footprint_ffp,node_footprint_km toneAmber
class node_vprm_entry,node_vprm_base,node_vprm_modified,node_vprm_footprint,node_vprm_noxeric toneMint
class node_nn_base,node_nn_v1,node_nn_v2,node_nn_v3 toneRose
class node_utilities,node_plots,node_user toneIndigo
```

## Components

### Environmental inputs

- [Satellite manager](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/sat_managers/base_manager.py): `pyVPRM/sat_managers/base_manager.py`
- [Satellite products](https://github.com/tglauch/pyvprm/tree/main/pyVPRM/sat_managers): `pyVPRM/sat_managers`
- [MODIS download](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/lib/downmodis.py): `pyVPRM/lib/downmodis.py`
- [Meteorology interface](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/meteorologies/met_base_class.py): `pyVPRM/meteorologies/met_base_class.py`
- [ERA5 forcing](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/meteorologies/era5_land_destinE_new.py): `pyVPRM/meteorologies/era5_land_destinE_new.py`

### Tower observations

- [Tower observations](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/flux_tower_libs/flux_tower_class.py): `pyVPRM/flux_tower_libs/flux_tower_class.py`
- [Footprint analysis](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/flux_tower_libs/base_footprint_class.py): `pyVPRM/flux_tower_libs/base_footprint_class.py`
- [FFP footprint](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/flux_tower_libs/FFP_footprint_class.py): `pyVPRM/flux_tower_libs/FFP_footprint_class.py`
- [KM footprint](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/flux_tower_libs/KM_footprint_class.py): `pyVPRM/flux_tower_libs/KM_footprint_class.py`

### VPRM estimation

- [Project workflow](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/VPRM.py): `pyVPRM/VPRM.py`
- [VPRM model](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/vprm_base_model.py): `pyVPRM/vprm_models/vprm_base_model.py`
- [Modified VPRM](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/vprm_modified_model.py): `pyVPRM/vprm_models/vprm_modified_model.py`
- [Footprint VPRM](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/vprm_base_model_footprint.py): `pyVPRM/vprm_models/vprm_base_model_footprint.py`
- [No-xeric VPRM](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/vprm_base_model_no_xeric.py): `pyVPRM/vprm_models/vprm_base_model_no_xeric.py`

### Neural partitioning

- [pyVPRNN core](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/pyvprnn.py): `pyVPRM/vprm_models/pyvprnn.py`
- [pyVPRNN v1](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/pyvprnn_v1.py): `pyVPRM/vprm_models/pyvprnn_v1.py`
- [pyVPRNN v2](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/pyvprnn_v2.py): `pyVPRM/vprm_models/pyvprnn_v2.py`
- [pyVPRNN v3](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/vprm_models/pyvprnn_v3.py): `pyVPRM/vprm_models/pyvprnn_v3.py`

### Shared processing

- [Spatial and time utilities](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/lib/functions.py): `pyVPRM/lib/functions.py`
- [Model plotting](https://github.com/tglauch/pyvprm/blob/main/pyVPRM/lib/fancy_plot.py): `pyVPRM/lib/fancy_plot.py`

### Other components

- **Researcher**

## Connections

- Researcher → Project workflow: configures
- Project workflow → Satellite manager: uses (evidence: `pyVPRM/VPRM.py`)
- Satellite manager → MODIS download: downloads via (evidence: `pyVPRM/sat_managers/base_manager.py`)
- Satellite products → Satellite manager: extends (evidence: `pyVPRM/sat_managers/copernicus.py`)
- Researcher → Satellite products: selects
- Researcher → ERA5 forcing: obtains forcing
- ERA5 forcing → Meteorology interface: implements (evidence: `pyVPRM/meteorologies/era5_land_destinE_new.py`)
- Researcher → Tower observations: supplies observations
- Tower observations → Footprint analysis: informs footprint
- FFP footprint → Footprint analysis: extends (evidence: `pyVPRM/flux_tower_libs/FFP_footprint_class.py`)
- KM footprint → Footprint analysis: extends (evidence: `pyVPRM/flux_tower_libs/KM_footprint_class.py`)
- Project workflow → Spatial and time utilities: calls (evidence: `pyVPRM/VPRM.py`)
- Researcher → VPRM model: estimates fluxes
- Modified VPRM → VPRM model: extends (evidence: `pyVPRM/vprm_models/vprm_modified_model.py`)
- Footprint VPRM → FFP footprint: uses (evidence: `pyVPRM/vprm_models/vprm_base_model_footprint.py`)
- Footprint VPRM → KM footprint: uses (evidence: `pyVPRM/vprm_models/vprm_base_model_footprint.py`)
- Researcher → pyVPRNN core: partitions fluxes
- pyVPRNN v1 → pyVPRNN core: extends (evidence: `pyVPRM/vprm_models/pyvprnn_v1.py`)
- pyVPRNN v2 → pyVPRNN v1: extends (evidence: `pyVPRM/vprm_models/pyvprnn_v2.py`)
- pyVPRNN v3 → pyVPRNN v1: uses (evidence: `pyVPRM/vprm_models/pyvprnn_v3.py`)
- pyVPRNN core → Spatial and time utilities: calls (evidence: `pyVPRM/vprm_models/pyvprnn.py`)
- pyVPRNN v1 → Model plotting: uses (evidence: `pyVPRM/vprm_models/pyvprnn_v1.py`)
- pyVPRNN v3 → Spatial and time utilities: calls (evidence: `pyVPRM/vprm_models/pyvprnn_v3.py`)
