# open-et/flux-data-footprint architecture

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

- Interactive diagram: https://gitdiagram.com/open-et/flux-data-footprint
- Repository: https://github.com/open-et/flux-data-footprint

## Overview

flux-data-footprint turns prepared flux-tower time series into daily or monthly, reference-ET-weighted georeferenced footprint rasters. The main workflow validates hourly inputs, calculates hourly footprints, obtains NLDAS weather drivers to compute ASCE reference ET, then weights and writes period rasters. The Kljun footprint model and raster utilities are shared internal layers; a separate Giovanni client can retrieve NLDAS time series. The daily and monthly scripts are sampled, but some implementation details and the Giovanni client’s use by other workflows are not established, so those links are omitted.

Main entry points: [`scripts/Run_AMF_Daily.py`](https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Daily.py) (Daily processing), [`scripts/Run_AMF_Monthly.py`](https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Monthly.py) (Monthly processing), [`scripts/calc_footprint_FFP_climatology.py`](https://github.com/open-et/flux-data-footprint/blob/master/scripts/calc_footprint_FFP_climatology.py) (Kljun FFP model), [`scripts/footprint_funcs.py`](https://github.com/open-et/flux-data-footprint/blob/master/scripts/footprint_funcs.py) (Raster helpers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Period workflows"]
  node_daily["Daily processing<br/>[Run_AMF_Daily.py]"]
  node_monthly["Monthly processing<br/>[Run_AMF_Monthly.py]"]
  node_daily_rasters["Daily weighted rasters<br/>[Run_AMF_Daily.py]"]
  node_monthly_rasters["Monthly weighted rasters<br/>[Run_AMF_Monthly.py]"]
end

subgraph group_model["Footprint modeling"]
  node_footprint_model["Kljun FFP model"]
end

subgraph group_climate["Climate and ET"]
  node_nldas["NLDAS drivers<br/>[Run_AMF_Daily.py]"]
  node_reference_et["ASCE reference ET<br/>[Run_AMF_Daily.py]"]
  node_giovanni_client["Giovanni time-series client"]
end

subgraph group_raster["Raster utilities"]
  node_raster_helpers["Raster helpers<br/>[footprint_funcs.py]"]
end

node_operator(("Research user"))
node_tower_csv["Prepared tower CSV"]
node_giovanni_service["NASA Giovanni service"]

node_operator -->|"runs"| node_daily
node_operator -->|"runs"| node_monthly
node_tower_csv -->|"supplies input"| node_daily
node_tower_csv -->|"supplies input"| node_monthly
node_daily -->|"calculates footprints"| node_footprint_model
node_monthly -->|"calculates footprints"| node_footprint_model
node_daily -->|"uses transforms and masks"| node_raster_helpers
node_monthly -->|"uses transforms and masks"| node_raster_helpers
node_daily -->|"downloads drivers"| node_nldas
node_monthly -->|"downloads drivers"| node_nldas
node_nldas -->|"provides weather inputs"| node_reference_et
node_daily -->|"computes hourly ET"| node_reference_et
node_monthly -->|"computes hourly ET"| node_reference_et
node_daily -->|"writes weighted rasters"| node_daily_rasters
node_monthly -->|"writes weighted rasters"| node_monthly_rasters
node_giovanni_client -->|"requests time series"| node_giovanni_service

click node_daily "https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Daily.py"
click node_monthly "https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Monthly.py"
click node_footprint_model "https://github.com/open-et/flux-data-footprint/blob/master/scripts/calc_footprint_FFP_climatology.py"
click node_raster_helpers "https://github.com/open-et/flux-data-footprint/blob/master/scripts/footprint_funcs.py"
click node_nldas "https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Daily.py"
click node_reference_et "https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Daily.py"
click node_daily_rasters "https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Daily.py"
click node_monthly_rasters "https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Monthly.py"
click node_giovanni_client "https://github.com/open-et/flux-data-footprint/blob/master/scripts/nldas_via_giovanni.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_daily,node_monthly,node_daily_rasters,node_monthly_rasters,node_operator toneBlue
class node_footprint_model toneAmber
class node_nldas,node_reference_et,node_giovanni_client toneMint
class node_raster_helpers toneRose
class node_tower_csv,node_giovanni_service toneIndigo
```

## Components

### Period workflows

- [Daily processing](https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Daily.py): `scripts/Run_AMF_Daily.py`
- [Monthly processing](https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Monthly.py): `scripts/Run_AMF_Monthly.py`
- [Daily weighted rasters](https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Daily.py): `scripts/Run_AMF_Daily.py`
- [Monthly weighted rasters](https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Monthly.py): `scripts/Run_AMF_Monthly.py`

### Footprint modeling

- [Kljun FFP model](https://github.com/open-et/flux-data-footprint/blob/master/scripts/calc_footprint_FFP_climatology.py): `scripts/calc_footprint_FFP_climatology.py`

### Climate and ET

- [NLDAS drivers](https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Daily.py): `scripts/Run_AMF_Daily.py`
- [ASCE reference ET](https://github.com/open-et/flux-data-footprint/blob/master/scripts/Run_AMF_Daily.py): `scripts/Run_AMF_Daily.py`
- [Giovanni time-series client](https://github.com/open-et/flux-data-footprint/blob/master/scripts/nldas_via_giovanni.py): `scripts/nldas_via_giovanni.py`

### Raster utilities

- [Raster helpers](https://github.com/open-et/flux-data-footprint/blob/master/scripts/footprint_funcs.py): `scripts/footprint_funcs.py`

### Other components

- **Research user**
- **Prepared tower CSV**
- **NASA Giovanni service**

## Connections

- Research user → Daily processing: runs (evidence: `scripts/Run_AMF_Daily.py`)
- Research user → Monthly processing: runs (evidence: `scripts/Run_AMF_Monthly.py`)
- Prepared tower CSV → Daily processing: supplies input (evidence: `scripts/Run_AMF_Daily.py`)
- Prepared tower CSV → Monthly processing: supplies input (evidence: `scripts/Run_AMF_Monthly.py`)
- Daily processing → Kljun FFP model: calculates footprints (evidence: `scripts/Run_AMF_Daily.py`)
- Monthly processing → Kljun FFP model: calculates footprints (evidence: `scripts/Run_AMF_Monthly.py`)
- Daily processing → Raster helpers: uses transforms and masks (evidence: `scripts/Run_AMF_Daily.py`)
- Monthly processing → Raster helpers: uses transforms and masks (evidence: `scripts/Run_AMF_Monthly.py`)
- Daily processing → NLDAS drivers: downloads drivers (evidence: `README.rst`)
- Monthly processing → NLDAS drivers: downloads drivers (evidence: `README.rst`)
- NLDAS drivers → ASCE reference ET: provides weather inputs (evidence: `scripts/Run_AMF_Daily.py`)
- Daily processing → ASCE reference ET: computes hourly ET (evidence: `scripts/Run_AMF_Daily.py`)
- Monthly processing → ASCE reference ET: computes hourly ET (evidence: `scripts/Run_AMF_Monthly.py`)
- Daily processing → Daily weighted rasters: writes weighted rasters (evidence: `scripts/Run_AMF_Daily.py`)
- Monthly processing → Monthly weighted rasters: writes weighted rasters (evidence: `scripts/Run_AMF_Monthly.py`)
- Giovanni time-series client → NASA Giovanni service: requests time series (evidence: `scripts/nldas_via_giovanni.py`)
