Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fridapy-0.1.1.tar.gz (168.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fridapy-0.1.1-py3-none-any.whl (177.7 kB view details)

Uploaded Python 3

File details

Details for the file fridapy-0.1.1.tar.gz.

File metadata

  • Download URL: fridapy-0.1.1.tar.gz
  • Upload date:
  • Size: 168.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fridapy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e72e04edb431a3348ea87d3f71289cb54ee93590ac1cac99a44aecf3673da4c7
MD5 a2008be1ba36c6305e9be9308003bea8
BLAKE2b-256 c2d52a069d77e901be36fc2f04fc81b260bc399b0b3db3680a86c9b705432c1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for fridapy-0.1.1.tar.gz:

Publisher: pypi-release.yml on SallyDa/fridapy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fridapy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fridapy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 177.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fridapy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 91d5ab635429d2cedf2e7479ea5a6b6cfd6103f84f75527d0b1f3f237b8ccff1
MD5 42ea59c8c66e36b7df9fd21010bd78aa
BLAKE2b-256 b2f4a2b9c38902882be9ceae557034134d87794a8b811b28fb01b86f99d73f01

See more details on using hashes here.

Provenance

The following attestation bundles were made for fridapy-0.1.1-py3-none-any.whl:

Publisher: pypi-release.yml on SallyDa/fridapy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page