Package: dscim
DSCIM: The Data-driven Spatial Climate Impact ModelThis 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.InstallationInstall withpipusing:pipinstalldscimInstall the unreleased bleeding-edge version of the package with:pipinstallgit+https://github.com/climateimpactlab/dscimDependenciesdscimrequires Python > 3.8. Additional compiled packages are required so we recommend installingdsciminto acondaenvironment along with its dependencies.numpypandasxarraymatplotlibdaskdistributedrequestsstatsmodelszarrnetcdf4h5netcdfimpactlab-toolsp_tqdmSupportSource code is available online athttps://github.com/climateimpactlab/dscim. Please file bugs in thebug tracker.This software is Open Source and available under the Apache License, Version 2.0.Structure and logicThe 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]
endStackedDamagestakes care of parsing all monetized damage data from several
sectors and read the data using adask.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:ClassFunctionClimateWrapper class to read all things climate, including GMST and GMSL. You  can pass afair_pathwith a NetCDF with FaIR control and pulse simulations and median FaIR runs. You can usegmst_pathto input a  CSV file with model and year anomaly data, for fitting the damage functions.EconVarsClass 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 detailsStackedDamagesDamages 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.zarrformat 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.