Skip to main content

DOI Python package Upload Python Package codecov

DSCIM: The Data-driven Spatial Climate Impact Model

This Python library enables the calculation of sector-specific partial social cost of greenhouse gases (SC-GHG) and SCGHGs that are combined across sectors using a variety of valuation methods and assumptions. The main purpose of this library is to parse the monetized spatial damages from different sectors and integrate them using different options ("menu options") that encompass different decisions, such as discount levels, discount strategies, and different considerations related to economic and climate uncertainty.

Installation

Install with pip using:

pip install dscim

Install the unreleased bleeding-edge version of the package with:

pip install git+https://github.com/climateimpactlab/dscim

Dependencies

dscim requires Python > 3.8. Additional compiled packages are required so we recommend installing dscim into a conda environment along with its dependencies.

  • numpy
  • pandas
  • xarray
  • matplotlib
  • dask
  • distributed
  • requests
  • statsmodels
  • zarr
  • netcdf4
  • h5netcdf
  • impactlab-tools
  • p_tqdm

Support

Source code is available online at https://github.com/climateimpactlab/dscim. Please file bugs in the bug tracker.

This software is Open Source and available under the Apache License, Version 2.0.

Structure and logic

The library is split into several components that implement the hierarchy defined by the menu options. These are the main elements of the library and serve as the main classes to call different menu options.

graph TD
SubGraph1Flow(Storage and I/O)
  subgraph "Storage utilities"
  SubGraph1Flow --> A[Stacked_damages]
  SubGraph1Flow -- Climate Data --> Climate
  SubGraph1Flow -- Economic Data --> EconData
  end

  subgraph "Recipe Book"
  A[StackedDamages] --> B[MainMenu]
  B[MainMenu] --> C[AddingUpRecipe];
  B[MainMenu] --> D[RiskAversionRecipe];
  B[MainMenu] --> E[EquityRecipe]
  end

StackedDamages takes care of parsing all monetized damage data from several sectors and read the data using a dask.distributed.Client. At the same time, this class takes care of ingesting FaIR GMST and GMSL data needed to draw damage functions and calculate FaIR marginal damages to an additional emission of carbon. The data can be read using the following components:

Class Function
Climate Wrapper class to read all things climate, including GMST and GMSL. You can pass a fair_path with a NetCDF with FaIR control and pulse simulations and median FaIR runs. You can use gmst_path to input a CSV file with model and year anomaly data, for fitting the damage functions.
EconVars Class to ingest sector path related data, this includes GDP and population data. Some intermediate variables are also included in this class, check the documentation for more details
StackedDamages Damages wrapper class. This class contains all the elements above and additionally reads all the computed monetized damages. A single path is needed to read all damages, and sectors must be separated by folders. If necessary, the class will save data in .zarr format to make chunking operations more efficient. Check documentation of the class for more details.

and these elements can be used for the menu options:

  • AddingUpRecipe: Adding up all damages and collapse them to calculate a general SCC without valuing uncertainty.
  • RiskAversionRecipe: Add risk aversion certainty equivalent to consumption calculations - Value uncertainty over econometric and climate draws.
  • EquityRecipe: Add risk aversion and equity to the consumption calculations. Equity includes taking a certainty equivalent over spatial impact regions.

Release files for dscim 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dscim 0.7.0
File Size Uploaded
dscim-0.7.0.tar.gz 53.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dscim 0.7.0
File Interpreter ABI Platform
dscim-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 110.1 kB

Release files / dscim-0.7.0.tar.gz

Download URL dscim-0.7.0.tar.gz
Size 53.9 kB
Tags Source
SHA-256 checksum
How to use checksums
79856131dbfa5d0c67b76d5b0de2a2e28f71d6edb668efbabee99ce3656433cf
BLAKE2b-256 checksum
How to use checksums
44caacac2fe7ef872e3181d40d000ac788a2c61b42904b53fb5a94dfb580ef5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2025.

Transparency log

Release files / dscim-0.7.0-py3-none-any.whl

Download URL dscim-0.7.0-py3-none-any.whl
Size 56.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8372cb2b281654f13510f2f9620c2347963bef3c0174320a7b31fbf79cd51972
BLAKE2b-256 checksum
How to use checksums
c7abfa77ef2db0f1d760709beb7245de6dc003ec4feb0e3288c1fb22509c21bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page