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.

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/baseline/usecase.py for a complete 9-panel example, and diagnostics/baseline/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/baseline/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-1.0.0.tar.gz (199.0 kB view details)

Uploaded Source

Built Distribution

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

fridapy-1.0.0-py3-none-any.whl (208.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fridapy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0ac9242b5f51ac77d883b7d73ad0fedc8b40408a62c75d6abb2b90247ef8c481
MD5 5cf461189d26bc89eb98d38fbb3bf6bd
BLAKE2b-256 658cb78437cb1ddf4ce62c8fe248defe03d7e37d0b6292d44fe0fd8433c51ca2

See more details on using hashes here.

Provenance

The following attestation bundles were made for fridapy-1.0.0.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-1.0.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for fridapy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01c0b8d9f7b9926c30a1ab3fbf79831c06a1589532f10f6e069a778a0f44c2a7
MD5 25346c1f51ebe17a0673e5bb037dd791
BLAKE2b-256 03d88b70677e00515d8d216515d75bd7241c97162fe037a939dad8b92132fcfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for fridapy-1.0.0-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