gdrsclib
Data Fields
gdrs_struct Struct Reference

This is the main struct that contains data from the sqlite3 database and calculated values. More...

#include <gdrs.h>

Data Fields

struct appdata ad
 Basic information about dimensions: number of countries, start year, end year. More...
 
char ** iso3
 The ISO 3-letter code for the country. More...
 
int thisyear
 Store the current year. More...
 
int cumsince
 Calculate responsibility from this year. More...
 
int emergstart
 Start year of "emergency progam". More...
 
float billpercgwp
 Bill as percent of GWP. More...
 
float respweight
 Responsibility weight. More...
 
float dt_low
 Development threshold – in PPP. More...
 
float dt_high
 Luxury threshold – in MER. More...
 
float lux_thresh_mult
 Tax multiplier for incomes above luxury threshold. More...
 
int interp_between_thresholds
 If true, interpolate capacity and responsibility between thresholds. More...
 
float capfrac
 Income counted toward capacity between thresholds. More...
 
float emisselast
 Emissions elasticity. More...
 
int usesequence
 Boolean: true if Annex 1 countries act first (sequencing) More...
 
int sequenceyear
 End of the first committment period with sequencing: only A1 up to here. More...
 
float a1_perc_rdxn
 If sequencing, % below ref year that A1 must reduce it's emissions by sequence year. More...
 
int a1refyear
 The year compared to which A1 reduces emissions (e.g., 1990 or 2005) More...
 
int use_lag
 Apply a (varying) time lag between mitigation investment and realized reductions. More...
 
float a1_shape_param
 If sequencing, exponent on tfrac^a1_shape_param that affects how rapidly A1 countries approach target. More...
 
int assign_mitgap_to
 If sequencing: either 1 (Annex 1) or 2 (Annex 2) for who bears responsibility for mitigation gap. More...
 
struct fixedfactor annex1
 Filter for Annex 1 countries. More...
 
struct fixedfactor annex2
 Filter for Annex 2 countries. More...
 
struct fixedfactor frozen
 Emissions that are "frozen" following the first sequencing period. More...
 
struct datablock bl_fossil
 Baseline fossil emissions. More...
 
int use_lulucf
 Flag whether to include land-use change emissions. More...
 
struct datablock bl_lulucf
 Baseline land use, land-use change, and forestry. More...
 
int use_nonco2
 Flag whether to include non-CO2 gases. More...
 
struct datablock bl_nonco2
 Baseline non-CO2 gases. More...
 
int use_netexports
 Flag whether to include emissions embodied in traded goods. More...
 
struct datablock bl_netexports
 Baseline net exports, for embodied carbon. More...
 
int do_luxcap
 Flag whether to use luxury-capped baselines. More...
 
int use_kab
 Flag whether to use Kyoto-adjusted baselines (KABs) More...
 
int kab_only_ratified
 Flag whether to only include countries that ratified the Kyoto agreement. More...
 
struct datablock baseline
 Baseline emissions, the sum of all selected baseline components. More...
 
struct datablock volrdxn
 Voluntary reductions. More...
 
struct datablock a1domrdxn
 Annex 1 domestic reductions (if sequencing) More...
 
struct datablock gdp
 GDP in MER. More...
 
struct datablock pop
 Population in people. More...
 
struct datablock scalpop
 Scaled population, in billions (calculated as 1.0e-9 * population) More...
 
struct datablock ppp2mer
 Ratio of GDP in PPP to GDP in MER. More...
 
struct datablock ybar_ppp
 Mean income in PPP. More...
 
struct datablock gini
 Gini coefficient. More...
 
struct datablock sdlog
 Standard deviation of log income, estimated from Gini assuming lognormal distribution. More...
 
int emerg_path_id
 Integer ID indicating which emergency path to use. More...
 
struct timeseries emergpath
 The emergency pathway in GtC. More...
 
struct datablock r
 Responsibility (calculated) More...
 
struct datablock c
 Capacity (calculated) More...
 
struct datablock rci
 Responsibility-Capacity Indicator (calculated) More...
 
struct fixedfactor rci_lagged
 Averaged RCI for mitigation smoothing. More...
 
struct datablock lux_emiss
 Emissions over the luxury threshold (calculated) More...
 
struct datablock lux_emiss_applied
 Luxury emissions actually used in adjusted baseline (calculated) More...
 
struct datablock alloc_gdrs
 Emissions allocation (calculated) More...
 
struct datablock pop_above_dl
 Population above development threshold (calculated) More...
 
struct datablock pop_above_lux
 Population above luxury threshold (calculated) More...
 
struct datablock zl
 Development threshold converted to "z" variable \( z = \frac{1}{\sigma} \ln\left(y/\bar y\right) + \frac{1}{2}\sigma\). More...
 
struct datablock zu
 Luxury threshold converted to "z" variable \( z = \frac{1}{\sigma} \ln\left(y/\bar y\right) + \frac{1}{2}\sigma\). More...
 
struct timeseries yu_adj
 Adjusted luxury threshold to ensure that adjusted baseline is not below emergency pathway. More...
 
struct datablock zu_adj
 Adjusted luxury threshold as "z" variable \( z = \frac{1}{\sigma} \ln\left(y/\bar y\right) + \frac{1}{2}\sigma\). More...
 
struct datablock kab_gap
 Gap between Kyoto-adjusted baseline and standard baseline. More...
 
struct fixedfactor kyoto_startep_frac_1990
 For Annex I countries, Kyoto committments at the start of the emergency program as a fraction of 1990. More...
 
struct fixedfactor kyoto_startep_frac
 For Annex I countries, Kyoto committments at the start of the emergency program as a fraction of BaU. More...
 
struct fixedfactor kyoto_ratified
 A filter equal to 1.0 if ratified and 0.0 if not. More...
 
int num_tax_levels
 Number of entries in the tax level table in the database. More...
 
struct tax_entry tax_levels [TAX_MAX_ENTRIES]
 Table of tax levels with associated information. More...
 
struct datablock tax_revenue_mer_dens [TAX_MAX_ENTRIES]
 Table to hold contribution to tax in different countries & years for the different tax levels (multiplied by pop & prob dens–summable over countries) More...
 
struct datablock tax_revenue_ppp_dens [TAX_MAX_ENTRIES]
 Table to hold contribution to tax in different countries & years for the different tax levels (multiplied by pop & prob dens–summable over countries) More...
 
struct datablock tax_income_mer_dens [TAX_MAX_ENTRIES]
 Table to hold tax income in MER terms (multiplied by pop & prob density–summable over countries) More...
 
struct datablock tax_income_ppp_dens [TAX_MAX_ENTRIES]
 Table to hold tax income in PPP terms (multiplied by pop & prob density–summable over countries) More...
 
struct datablock tax_pop_dens [TAX_MAX_ENTRIES]
 Table to hold pop & prob dens at different tax levels. More...
 
struct datablock tax_pop_below [TAX_MAX_ENTRIES]
 Table to hold population below the tax line. More...
 

Detailed Description

This is the main struct that contains data from the sqlite3 database and calculated values.

Definition at line 92 of file gdrs.h.

Field Documentation

◆ a1_perc_rdxn

float a1_perc_rdxn

If sequencing, % below ref year that A1 must reduce it's emissions by sequence year.

Definition at line 108 of file gdrs.h.

◆ a1_shape_param

float a1_shape_param

If sequencing, exponent on tfrac^a1_shape_param that affects how rapidly A1 countries approach target.

Definition at line 111 of file gdrs.h.

◆ a1domrdxn

struct datablock a1domrdxn

Annex 1 domestic reductions (if sequencing)

Definition at line 128 of file gdrs.h.

◆ a1refyear

int a1refyear

The year compared to which A1 reduces emissions (e.g., 1990 or 2005)

Definition at line 109 of file gdrs.h.

◆ ad

struct appdata ad

Basic information about dimensions: number of countries, start year, end year.

Definition at line 93 of file gdrs.h.

◆ alloc_gdrs

struct datablock alloc_gdrs

Emissions allocation (calculated)

Definition at line 144 of file gdrs.h.

◆ annex1

struct fixedfactor annex1

Filter for Annex 1 countries.

Definition at line 113 of file gdrs.h.

◆ annex2

struct fixedfactor annex2

Filter for Annex 2 countries.

Definition at line 114 of file gdrs.h.

◆ assign_mitgap_to

int assign_mitgap_to

If sequencing: either 1 (Annex 1) or 2 (Annex 2) for who bears responsibility for mitigation gap.

Definition at line 112 of file gdrs.h.

◆ baseline

struct datablock baseline

Baseline emissions, the sum of all selected baseline components.

Definition at line 126 of file gdrs.h.

◆ billpercgwp

float billpercgwp

Bill as percent of GWP.

Definition at line 98 of file gdrs.h.

◆ bl_fossil

struct datablock bl_fossil

Baseline fossil emissions.

Definition at line 116 of file gdrs.h.

◆ bl_lulucf

struct datablock bl_lulucf

Baseline land use, land-use change, and forestry.

Definition at line 118 of file gdrs.h.

◆ bl_netexports

struct datablock bl_netexports

Baseline net exports, for embodied carbon.

Definition at line 122 of file gdrs.h.

◆ bl_nonco2

struct datablock bl_nonco2

Baseline non-CO2 gases.

Definition at line 120 of file gdrs.h.

◆ c

struct datablock c

Capacity (calculated)

Definition at line 139 of file gdrs.h.

◆ capfrac

float capfrac

Income counted toward capacity between thresholds.

Definition at line 104 of file gdrs.h.

◆ cumsince

int cumsince

Calculate responsibility from this year.

Definition at line 96 of file gdrs.h.

◆ do_luxcap

int do_luxcap

Flag whether to use luxury-capped baselines.

Definition at line 123 of file gdrs.h.

◆ dt_high

float dt_high

Luxury threshold – in MER.

Definition at line 101 of file gdrs.h.

◆ dt_low

float dt_low

Development threshold – in PPP.

Definition at line 100 of file gdrs.h.

◆ emerg_path_id

int emerg_path_id

Integer ID indicating which emergency path to use.

Definition at line 136 of file gdrs.h.

◆ emergpath

struct timeseries emergpath

The emergency pathway in GtC.

Definition at line 137 of file gdrs.h.

◆ emergstart

int emergstart

Start year of "emergency progam".

Definition at line 97 of file gdrs.h.

◆ emisselast

float emisselast

Emissions elasticity.

Definition at line 105 of file gdrs.h.

◆ frozen

struct fixedfactor frozen

Emissions that are "frozen" following the first sequencing period.

Definition at line 115 of file gdrs.h.

◆ gdp

struct datablock gdp

GDP in MER.

Definition at line 129 of file gdrs.h.

◆ gini

struct datablock gini

Gini coefficient.

Definition at line 134 of file gdrs.h.

◆ interp_between_thresholds

int interp_between_thresholds

If true, interpolate capacity and responsibility between thresholds.

Definition at line 103 of file gdrs.h.

◆ iso3

char** iso3

The ISO 3-letter code for the country.

Definition at line 94 of file gdrs.h.

◆ kab_gap

struct datablock kab_gap

Gap between Kyoto-adjusted baseline and standard baseline.

Definition at line 151 of file gdrs.h.

◆ kab_only_ratified

int kab_only_ratified

Flag whether to only include countries that ratified the Kyoto agreement.

Definition at line 125 of file gdrs.h.

◆ kyoto_ratified

struct fixedfactor kyoto_ratified

A filter equal to 1.0 if ratified and 0.0 if not.

Definition at line 154 of file gdrs.h.

◆ kyoto_startep_frac

struct fixedfactor kyoto_startep_frac

For Annex I countries, Kyoto committments at the start of the emergency program as a fraction of BaU.

Definition at line 153 of file gdrs.h.

◆ kyoto_startep_frac_1990

struct fixedfactor kyoto_startep_frac_1990

For Annex I countries, Kyoto committments at the start of the emergency program as a fraction of 1990.

Definition at line 152 of file gdrs.h.

◆ lux_emiss

struct datablock lux_emiss

Emissions over the luxury threshold (calculated)

Definition at line 142 of file gdrs.h.

◆ lux_emiss_applied

struct datablock lux_emiss_applied

Luxury emissions actually used in adjusted baseline (calculated)

Definition at line 143 of file gdrs.h.

◆ lux_thresh_mult

float lux_thresh_mult

Tax multiplier for incomes above luxury threshold.

Definition at line 102 of file gdrs.h.

◆ num_tax_levels

int num_tax_levels

Number of entries in the tax level table in the database.

Definition at line 155 of file gdrs.h.

◆ pop

struct datablock pop

Population in people.

Definition at line 130 of file gdrs.h.

◆ pop_above_dl

struct datablock pop_above_dl

Population above development threshold (calculated)

Definition at line 145 of file gdrs.h.

◆ pop_above_lux

struct datablock pop_above_lux

Population above luxury threshold (calculated)

Definition at line 146 of file gdrs.h.

◆ ppp2mer

struct datablock ppp2mer

Ratio of GDP in PPP to GDP in MER.

Definition at line 132 of file gdrs.h.

◆ r

struct datablock r

Responsibility (calculated)

Definition at line 138 of file gdrs.h.

◆ rci

struct datablock rci

Responsibility-Capacity Indicator (calculated)

Definition at line 140 of file gdrs.h.

◆ rci_lagged

struct fixedfactor rci_lagged

Averaged RCI for mitigation smoothing.

Definition at line 141 of file gdrs.h.

◆ respweight

float respweight

Responsibility weight.

Definition at line 99 of file gdrs.h.

◆ scalpop

struct datablock scalpop

Scaled population, in billions (calculated as 1.0e-9 * population)

Definition at line 131 of file gdrs.h.

◆ sdlog

struct datablock sdlog

Standard deviation of log income, estimated from Gini assuming lognormal distribution.

Definition at line 135 of file gdrs.h.

◆ sequenceyear

int sequenceyear

End of the first committment period with sequencing: only A1 up to here.

Definition at line 107 of file gdrs.h.

◆ tax_income_mer_dens

struct datablock tax_income_mer_dens[TAX_MAX_ENTRIES]

Table to hold tax income in MER terms (multiplied by pop & prob density–summable over countries)

Definition at line 159 of file gdrs.h.

◆ tax_income_ppp_dens

struct datablock tax_income_ppp_dens[TAX_MAX_ENTRIES]

Table to hold tax income in PPP terms (multiplied by pop & prob density–summable over countries)

Definition at line 160 of file gdrs.h.

◆ tax_levels

struct tax_entry tax_levels[TAX_MAX_ENTRIES]

Table of tax levels with associated information.

Definition at line 156 of file gdrs.h.

◆ tax_pop_below

struct datablock tax_pop_below[TAX_MAX_ENTRIES]

Table to hold population below the tax line.

Definition at line 162 of file gdrs.h.

◆ tax_pop_dens

struct datablock tax_pop_dens[TAX_MAX_ENTRIES]

Table to hold pop & prob dens at different tax levels.

Definition at line 161 of file gdrs.h.

◆ tax_revenue_mer_dens

struct datablock tax_revenue_mer_dens[TAX_MAX_ENTRIES]

Table to hold contribution to tax in different countries & years for the different tax levels (multiplied by pop & prob dens–summable over countries)

Definition at line 157 of file gdrs.h.

◆ tax_revenue_ppp_dens

struct datablock tax_revenue_ppp_dens[TAX_MAX_ENTRIES]

Table to hold contribution to tax in different countries & years for the different tax levels (multiplied by pop & prob dens–summable over countries)

Definition at line 158 of file gdrs.h.

◆ thisyear

int thisyear

Store the current year.

Definition at line 95 of file gdrs.h.

◆ use_kab

int use_kab

Flag whether to use Kyoto-adjusted baselines (KABs)

Definition at line 124 of file gdrs.h.

◆ use_lag

int use_lag

Apply a (varying) time lag between mitigation investment and realized reductions.

Definition at line 110 of file gdrs.h.

◆ use_lulucf

int use_lulucf

Flag whether to include land-use change emissions.

Definition at line 117 of file gdrs.h.

◆ use_netexports

int use_netexports

Flag whether to include emissions embodied in traded goods.

Definition at line 121 of file gdrs.h.

◆ use_nonco2

int use_nonco2

Flag whether to include non-CO2 gases.

Definition at line 119 of file gdrs.h.

◆ usesequence

int usesequence

Boolean: true if Annex 1 countries act first (sequencing)

Definition at line 106 of file gdrs.h.

◆ volrdxn

struct datablock volrdxn

Voluntary reductions.

Definition at line 127 of file gdrs.h.

◆ ybar_ppp

struct datablock ybar_ppp

Mean income in PPP.

Definition at line 133 of file gdrs.h.

◆ yu_adj

struct timeseries yu_adj

Adjusted luxury threshold to ensure that adjusted baseline is not below emergency pathway.

Definition at line 149 of file gdrs.h.

◆ zl

struct datablock zl

Development threshold converted to "z" variable \( z = \frac{1}{\sigma} \ln\left(y/\bar y\right) + \frac{1}{2}\sigma\).

Definition at line 147 of file gdrs.h.

◆ zu

struct datablock zu

Luxury threshold converted to "z" variable \( z = \frac{1}{\sigma} \ln\left(y/\bar y\right) + \frac{1}{2}\sigma\).

Definition at line 148 of file gdrs.h.

◆ zu_adj

struct datablock zu_adj

Adjusted luxury threshold as "z" variable \( z = \frac{1}{\sigma} \ln\left(y/\bar y\right) + \frac{1}{2}\sigma\).

Definition at line 150 of file gdrs.h.


The documentation for this struct was generated from the following file: