pygcam.carbonTax¶
Functions for generating carbon tax constraints.
API¶
- pygcam.carbonTax.genCarbonTax(value, years, rate, regions=None, market='global')¶
Generate the text of an XML file defining a global carbon tax starting at value and increasing by rate annually. Generate values for the give years. The first year in years is assumed to be the year at which the tax starts at value.
- Parameters
value – (float) the initial value of the tax ($/tonne)
years – (list(int)) years to set carbon taxes
rate – (float) annual rate of increase.
- Returns
(str) the contents of the XML file
- pygcam.carbonTax.genCarbonTaxFile(filename, value, startYear=2020, endYear=2100, timestep=5, rate=0.05, regions=None, market='global')¶
Generate an XML file defining a global carbon tax starting at value and increasing by rate annually. Generate values for the years startYear to endYear, inclusive, and set a new tax level every timestep years. By default, the tax is applied from 2020 to 2100, at 5 year timesteps with an annual increase of 5%.
- Parameters
filename – (str) the path of the XML file to create
value – (float) the initial value of the tax ($/tonne)
startYear – (int) the year in which to establish the carbon tax
endYear – (int) the final year of the carbon tax.
timestep – (int) the number of years after which to update the tax level
rate – (float) annual rate of increase
- Returns
none
- pygcam.carbonTax.genLinkedBioCarbonPolicyFile(filename, market='global', regions=None, forTax=True, forCap=False)¶
Create the XML for a linked policy to include LUC CO2 in a CO2 cap or tax policy (or both). This function generates the equivalent of any of the 4 files in input/policy/: global_ffict.xml (forTax=False, forCap=False) global_ffict_in_constraint.xml (forTax=False, forCap=True) global_uct.xml (forTax=True, forCap=False) global_uct_in_constraint.xml (forTax=True, forCap=True)
However, unlike those files, the market need not be global, and the set of regions to which to apply the policy can be specified.
- Parameters
filename – (str) the pathname of the XML file to create
market – (str) the name of the market for which to create the linked policy
regions – (list of str or None) the regions to apply the policy to, or None to indicate all regions.
forTax – (bool) True if the linked policy should apply to a CO2 tax
forCap – (bool) True if the linked policy should apply to a CO2 cap
- Returns
none