Integrated Assessment Model, based on FRIDA, written in python using sostrades
Project description
fridapy
A coupled climate–economy–society system-dynamics model, based on the WorldTrans FRIDA v2.1 integrated assesment model and re-implemented in Python as a set of SoSTrades disciplines solved by an MDA (multidisciplinary analysis) coupling. This version replicates the original FRIDA model v2.1 results, using a simplified (tuned) ocean carbon model.
Installation
fridapy depends on sostrades-core, which is not published on PyPI, so it
must be installed first from GitHub (this is not our package — see
os-climate/sostrades-core):
pip install git+https://github.com/os-climate/sostrades-core.git@v5.3.4
pip install fridapy # or, from a checkout: pip install -e .
Equivalently, install the pinned runtime in one step:
pip install -r requirements.txt
pip install -e .
For the diagnostic / ensemble / plotting scripts under diagnostics/, install the
extra:
pip install -e ".[diagnostics]" # adds matplotlib, scipy
Quickstart
Run the full model for a single climate case:
import numpy as np
from sostrades_core.execution_engine.execution_engine import ExecutionEngine
DISCIPLINES = [
'Demographics', 'Economy', 'Energy', 'Emissions', 'Climate', 'LandUse',
'GovernmentRegulations', 'BehavioralChoices', 'BehavioralChange',
'Resources', 'SeaLevel', 'SeaLevelRiseImpacts', 'PlanetaryBoundaries',
]
time = np.arange(1980, 2150 + 1e-9, 1.0)
study = 'fridapy'
ee = ExecutionEngine(study)
ee.select_root_process(repo='fridapy', mod_id='process')
ee.configure()
values = {f'{study}.{study}.{d}.time': time for d in DISCIPLINES}
values[f'{study}.{study}.Climate.climate_case'] = 50 # 1–100
ee.load_study_from_input_dict(values)
ee.dm.set_values_from_dict({
f'{study}.{study}.max_mda_iter': 300,
f'{study}.{study}.tolerance': 1e-3,
f'{study}.{study}.inner_mda_name': 'MDAGaussSeidel',
})
ee.execute()
gdp = ee.dm.get_value(f'{study}.Real_GDP')
See diagnostics/usecase.py for a
complete 9-panel example, and
diagnostics/run_ensemble.py
for ensemble runs (local or Modal).
Repository structure
| Path | Contents |
|---|---|
fridapy/disciplines/ |
the 13 SoSTrades disciplines |
fridapy/process/ |
the MDA process builder |
fridapy/data/ |
packaged runtime reference data (forcing series, climate cases) |
diagnostics/ |
ensemble runners, calibration, validation, plotting |
docs/ |
design notes for each major mechanism |
data/ |
full development dataset (Stella FRIDA.isdb source, calibration inputs) |
Data sources
The packaged fridapy/data/ files (frida_input_data.csv, climate_cases.json)
are derived from the FRIDA v2.1 model. The FRIDA reference uncertainty envelopes used by some diagnostics come from Schoenberg, W. (2025),
FRIDA v2.1 Endogenous Model Behavior (EMB) 100000 member ensemble, Zenodo,
10.5281/zenodo.15396799 (CC-BY-4.0);
that ~270 MB archive is not bundled — see
diagnostics/analyze_ensemble.py
for how to obtain it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fridapy-0.1.0.tar.gz.
File metadata
- Download URL: fridapy-0.1.0.tar.gz
- Upload date:
- Size: 168.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a100e185916098ef0200bc632e24ca8685e06f5c01f099cd3118684fe7869d89
|
|
| MD5 |
23187641b6292798f974eff9ecee884e
|
|
| BLAKE2b-256 |
0dc897dbfdd8ec46fd0586cf7729d61248b60f1cf58fb5b14cf6c38f8627c680
|
Provenance
The following attestation bundles were made for fridapy-0.1.0.tar.gz:
Publisher:
pypi-release.yml on SallyDa/fridapy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fridapy-0.1.0.tar.gz -
Subject digest:
a100e185916098ef0200bc632e24ca8685e06f5c01f099cd3118684fe7869d89 - Sigstore transparency entry: 1937910256
- Sigstore integration time:
-
Permalink:
SallyDa/fridapy@b20d28befc666b5fa2494b90debb4de2b031d706 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/SallyDa
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@b20d28befc666b5fa2494b90debb4de2b031d706 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fridapy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fridapy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 178.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dba504650accc877a04726b3efa71ee23cb77c132df63b586e0bc70a7a50478
|
|
| MD5 |
dd25e2b3e03c13c48ef84f18c1006047
|
|
| BLAKE2b-256 |
87c7e406c3b1d8de6dd0600b4fc8d88b60ee9601f5c46a18608835283ccbbf14
|
Provenance
The following attestation bundles were made for fridapy-0.1.0-py3-none-any.whl:
Publisher:
pypi-release.yml on SallyDa/fridapy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fridapy-0.1.0-py3-none-any.whl -
Subject digest:
7dba504650accc877a04726b3efa71ee23cb77c132df63b586e0bc70a7a50478 - Sigstore transparency entry: 1937910374
- Sigstore integration time:
-
Permalink:
SallyDa/fridapy@b20d28befc666b5fa2494b90debb4de2b031d706 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/SallyDa
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@b20d28befc666b5fa2494b90debb4de2b031d706 -
Trigger Event:
release
-
Statement type: