# matco77/beyond-gradual-warming architecture

> Architecture diagram of the GitHub repository matco77/beyond-gradual-warming, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/matco77/beyond-gradual-warming
- Repository: https://github.com/matco77/beyond-gradual-warming

## Overview

Beyond Gradual Warming is a thesis research pipeline that estimates crop-yield and household-energy weather response functions from historical European data, then applies them to AMOC-stressed and ISIMIP scenarios. The main path is data preparation, estimation, scenario replay, and impact analysis; robustness and long-run crop bounds are parallel research branches. README documents these capabilities, while sampled excerpts mainly cover climate-data preparation, so some subsystem links are based on the documented pipeline rather than inspected implementation.

Main entry points: [`Amoc/Code/scenario_engine.R`](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/scenario_engine.R) (Scenario engine), [`Amoc/datasets`](https://github.com/matco77/beyond-gradual-warming/tree/main/Amoc/datasets) (Prepared datasets), [`Amoc/Code/regression.R`](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/regression.R) (Crop response), [`Amoc/Code/scenario_replay.R`](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/scenario_replay.R) (Scenario replay)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Historical preparation"]
  node_prep_scripts["Data preparation"]
  node_prepared_data["Prepared datasets"]
end

subgraph group_estimate["Response estimation"]
  node_crop_response["Crop response<br/>[regression.R]"]
  node_energy_response["Energy response<br/>[regression.R]"]
  node_robustness["Robustness checks<br/>[regression.R]"]
  node_long_bound["Long-run bound"]
end

subgraph group_climate["Climate scenarios"]
  node_amoc_data["AMOC indicators"]
  node_amoc_delta["AMOC anomalies"]
  node_isimip_data["ISIMIP climate<br/>[isimip_download.py]"]
  node_delta_fields["ISIMIP deltas"]
  node_scenario_engine["Scenario engine<br/>[scenario_engine.R]"]
  node_scenario_replay["Scenario replay<br/>[scenario_replay.R]"]
  node_crop_replay["Crop replay"]
  node_isimip_replay["ISIMIP replay"]
end

subgraph group_impact["Impact analysis"]
  node_impact_estimates["Impact estimates<br/>[amoc_impact.R]"]
  node_isimip_impact["ISIMIP impacts<br/>[isimip_impact.R]"]
  node_impact_plots["Impact plots"]
  node_results["Results tables"]
end

node_weather_sources(("Historical weather"))
node_economic_sources(("Crop and energy data"))
node_analyst(("Researcher"))

node_weather_sources -->|"prepare inputs"| node_prep_scripts
node_economic_sources -->|"prepare inputs"| node_prep_scripts
node_prep_scripts -->|"write datasets"| node_prepared_data
node_prepared_data -->|"estimate from"| node_crop_response
node_prepared_data -->|"estimate from"| node_energy_response
node_crop_response -->|"check estimates"| node_robustness
node_crop_response -->|"bound effects"| node_long_bound
node_prepared_data -->|"read climate data"| node_amoc_data
node_amoc_data -->|"derive anomalies"| node_amoc_delta
node_analyst -->|"request cutouts"| node_isimip_data
node_isimip_data -->|"build deltas"| node_delta_fields
node_crop_response -->|"supply response"| node_scenario_engine
node_energy_response -->|"supply response"| node_scenario_engine
node_amoc_delta -->|"provide scenarios"| node_scenario_engine
node_delta_fields -->|"provide scenarios"| node_scenario_engine
node_scenario_engine -->|"configure replay"| node_scenario_replay
node_scenario_replay -->|"dispatch crop"| node_crop_replay
node_scenario_replay -->|"dispatch ISIMIP"| node_isimip_replay
node_crop_replay -->|"calculate impacts"| node_impact_estimates
node_isimip_replay -->|"calculate impacts"| node_isimip_impact
node_impact_estimates -->|"write estimates"| node_results
node_isimip_impact -->|"write estimates"| node_results
node_results -->|"plot estimates"| node_impact_plots
node_impact_plots -->|"present findings"| node_analyst

click node_prep_scripts "https://github.com/matco77/beyond-gradual-warming/tree/main/Amoc/Code"
click node_prepared_data "https://github.com/matco77/beyond-gradual-warming/tree/main/Amoc/datasets"
click node_crop_response "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/regression.R"
click node_energy_response "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/regression.R"
click node_robustness "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/regression.R"
click node_long_bound "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/crop_long_difference.R"
click node_amoc_data "https://github.com/matco77/beyond-gradual-warming/tree/main/Amoc/Code/anomaly"
click node_amoc_delta "https://github.com/matco77/beyond-gradual-warming/tree/main/Amoc/Code/anomaly"
click node_isimip_data "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/isimip_download.py"
click node_delta_fields "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/isimip_delta_fields.R"
click node_scenario_engine "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/scenario_engine.R"
click node_scenario_replay "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/scenario_replay.R"
click node_crop_replay "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/scenario_replay_crop.R"
click node_isimip_replay "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/scenario_replay_isimip.R"
click node_impact_estimates "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/amoc_impact.R"
click node_isimip_impact "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/isimip_impact.R"
click node_impact_plots "https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/plot_impact_common.R"
click node_results "https://github.com/matco77/beyond-gradual-warming/tree/main/Amoc/datasets"

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_prep_scripts,node_prepared_data toneBlue
class node_crop_response,node_energy_response,node_robustness,node_long_bound toneAmber
class node_amoc_data,node_amoc_delta,node_isimip_data,node_delta_fields,node_scenario_engine,node_scenario_replay,node_crop_replay,node_isimip_replay toneMint
class node_impact_estimates,node_isimip_impact,node_impact_plots,node_results toneRose
class node_weather_sources,node_economic_sources,node_analyst toneIndigo
```

## Components

### Historical preparation

- [Data preparation](https://github.com/matco77/beyond-gradual-warming/tree/main/Amoc/Code): `Amoc/Code`
- [Prepared datasets](https://github.com/matco77/beyond-gradual-warming/tree/main/Amoc/datasets): `Amoc/datasets`

### Response estimation

- [Crop response](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/regression.R): `Amoc/Code/regression.R`
- [Energy response](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/regression.R): `Amoc/Code/regression.R`
- [Robustness checks](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/regression.R): `Amoc/Code/regression.R`
- [Long-run bound](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/crop_long_difference.R): `Amoc/Code/crop_long_difference.R`

### Climate scenarios

- [AMOC indicators](https://github.com/matco77/beyond-gradual-warming/tree/main/Amoc/Code/anomaly): `Amoc/Code/anomaly`
- [AMOC anomalies](https://github.com/matco77/beyond-gradual-warming/tree/main/Amoc/Code/anomaly): `Amoc/Code/anomaly`
- [ISIMIP climate](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/isimip_download.py): `Amoc/Code/isimip_download.py`
- [ISIMIP deltas](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/isimip_delta_fields.R): `Amoc/Code/isimip_delta_fields.R`
- [Scenario engine](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/scenario_engine.R): `Amoc/Code/scenario_engine.R`
- [Scenario replay](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/scenario_replay.R): `Amoc/Code/scenario_replay.R`
- [Crop replay](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/scenario_replay_crop.R): `Amoc/Code/scenario_replay_crop.R`
- [ISIMIP replay](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/scenario_replay_isimip.R): `Amoc/Code/scenario_replay_isimip.R`

### Impact analysis

- [Impact estimates](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/amoc_impact.R): `Amoc/Code/amoc_impact.R`
- [ISIMIP impacts](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/isimip_impact.R): `Amoc/Code/isimip_impact.R`
- [Impact plots](https://github.com/matco77/beyond-gradual-warming/blob/main/Amoc/Code/plot_impact_common.R): `Amoc/Code/plot_impact_common.R`
- [Results tables](https://github.com/matco77/beyond-gradual-warming/tree/main/Amoc/datasets): `Amoc/datasets`

### Other components

- **Historical weather**
- **Crop and energy data**
- **Researcher**

## Connections

- Historical weather → Data preparation: prepare inputs
- Crop and energy data → Data preparation: prepare inputs
- Data preparation → Prepared datasets: write datasets
- Prepared datasets → Crop response: estimate from
- Prepared datasets → Energy response: estimate from
- Crop response → Robustness checks: check estimates
- Crop response → Long-run bound: bound effects
- Prepared datasets → AMOC indicators: read climate data
- AMOC indicators → AMOC anomalies: derive anomalies
- Researcher → ISIMIP climate: request cutouts
- ISIMIP climate → ISIMIP deltas: build deltas
- Crop response → Scenario engine: supply response
- Energy response → Scenario engine: supply response
- AMOC anomalies → Scenario engine: provide scenarios
- ISIMIP deltas → Scenario engine: provide scenarios
- Scenario engine → Scenario replay: configure replay
- Scenario replay → Crop replay: dispatch crop
- Scenario replay → ISIMIP replay: dispatch ISIMIP
- Crop replay → Impact estimates: calculate impacts
- ISIMIP replay → ISIMIP impacts: calculate impacts
- Impact estimates → Results tables: write estimates
- ISIMIP impacts → Results tables: write estimates
- Results tables → Impact plots: plot estimates
- Impact plots → Researcher: present findings
