damage module

class ezclimate.damage.DLWDamage(tree, bau, cons_growth, ghg_levels, subinterval_len)[source]

Bases: ezclimate.damage.Damage

Damage class for the EZ-Climate model. Provides the damages from emissions and mitigation outcomes.

Parameters:
  • tree (TreeModel object) – provides the tree structure used
  • bau (BusinessAsUsual object) – business-as-usual scenario of emissions
  • cons_growth (float) – constant consumption growth rate
  • ghg_levels (ndarray or list) – end GHG levels for each end scenario
tree

TreeModel object – provides the tree structure used

bau

BusinessAsUsual object – business-as-usual scenario of emissions

cons_growth

float – constant consumption growth rate

ghg_levels

ndarray or list – end GHG levels for each end scenario

dnum

int – number of simulated damage paths

d

ndarray – simulated damages

d_rcomb

ndarray – adjusted simulated damages for recombining tree

cum_forcing

ndarray – cumulative forcing interpolation coeffiecients, used to calculate forcing based mitigation

forcing

Forcing object – class for calculating cumulative forcing and GHG levels

damage_coefs

ndarray – interpolation coefficients used to calculate damages

average_mitigation(m, period)[source]

Calculate the average mitigation for all node in a period.

m : ndarray or list
array of mitigation
period : int
period to calculate average mitigation for
Returns:average mitigations
Return type:ndarray
average_mitigation_node(m, node, period=None)[source]

Calculate the average mitigation until node.

Parameters:
  • m (ndarray or list) – array of mitigation
  • node (int) – node for which average mitigation is to be calculated for
  • period (int, optional) – the period the node is in
Returns:

average mitigation

Return type:

float

damage_function(m, period)[source]

Calculate the damage for every node in a period, based on mitigation actions m.

Parameters:
  • m (ndarray or list) – array of mitigation
  • period (int) – period to calculate damages for
Returns:

damages

Return type:

ndarray

damage_simulation(draws, peak_temp=9.0, disaster_tail=12.0, tip_on=True, temp_map=1, temp_dist_params=None, maxh=100.0, save_simulation=True)[source]

Initializion and simulation of damages, given by ez_climate.DamageSimulation.

Parameters:
  • draws (int) – number of Monte Carlo draws
  • peak_temp (float, optional) – tipping point parameter
  • disaster_tail (float, optional) – curvature of tipping point
  • tip_on (bool, optional) – flag that turns tipping points on or off
  • temp_map (int, optional) – mapping from GHG to temperature * 0: implies Pindyck displace gamma * 1: implies Wagner-Weitzman normal * 2: implies Roe-Baker * 3: implies user-defined normal * 4: implies user-defined gamma
  • temp_dist_params (ndarray or list, optional) – if temp_map is either 3 or 4, user needs to define the distribution parameters
  • maxh (float, optional) – time paramter from Pindyck which indicates the time it takes for temp to get half way to its max value for a given level of ghg
  • cons_growth (float, optional) – yearly growth in consumption
  • save_simulation (bool, optional) – True if simulated values should be save, False otherwise
Returns:

simulated damages

Return type:

ndarray

ghg_level(m, periods=None)[source]

Calculate the GHG levels for more than one period.

Parameters:
  • m (ndarray or list) – array of mitigation
  • periods (int, optional) – number of periods to calculate GHG levels for
Returns:

GHG levels

Return type:

ndarray

ghg_level_period(m, period=None, nodes=None)[source]

Calculate the GHG levels corresponding to the given mitigation. Need to provide either period or nodes.

Parameters:
  • m (ndarray or list) – array of mitigation
  • period (int, optional) – what period to calculate GHG levels for
  • nodes (ndarray or list, optional) – the nodes to calculate GHG levels for
Returns:

GHG levels

Return type:

ndarray

import_damages(file_name='simulated_damages')[source]

Import saved simulated damages. File must be saved in ‘data’ directory inside current working directory. Save imported values in d.

Parameters:file_name (str, optional) – name of file of saved simulated damages
Raises:IOError – If file does not exist.
class ezclimate.damage.Damage(tree, bau)[source]

Bases: object

Abstract damage class for the EZ-Climate model.

Parameters:
  • tree (TreeModel object) – provides the tree structure used
  • bau (BusinessAsUsual object) – business-as-usual scenario of emissions
tree

TreeModel object – provides the tree structure used

bau

BusinessAsUsual object – business-as-usual scenario of emissions

average_mitigation()[source]

The average_mitigation function should return a 1D array of the average mitigation for every node in the period.

damage_function()[source]

The damage_function should return a 1D array of the damages for every node in the period.