model.scenario
Base classes of all scenario objects
The base year for prognostication for this scenario. The base year may be in the past, but it marks the dividing line between what is considered 'historical' data vs 'prognosticated' data. It is also the starting point for all cumulative operations (total emissions, etc.)
The base pds adoption, if this scenario uses an Existing Prognostication pds adoption (otherwise None)
AC scalar parameters that are most important for defining this scenario.
(Excludes adoption-related parameters.)
Initialize the advanced controls object for this scenario based on the various cases. The first argument may be an instantiated advanced controls argument, or a string naming the requested scenario, or None. The second argument is a list of all the available named scenarios, and the last is the default scenario to use if None is given.
Set values to override the default ca settings
config_overrides: list( tuple(param, region, value) ), where region may be '*' to change all regions
Initialize the pds and ref adoption bases for this scenario to one of several different types, depending on the parameters of the scenario. Note this function only initializes the base ref and pds adoptions: the HelperTables object ht still needs to be initialized after.
Also note: if an individual solution class needs to do its own custom adoption
initialization, it should do that _before_ calling initialize_adoption_bases
.
initialize_adoption_bases
will not overwrite self.ad
, self.pds_ca
, etc., if they
have already been initialized (except in the case of a user-supplied adoption, which
does override all other options).
Returns a set of data values that are used to initialize the Helper Tables object
The net impact of this solution on the energy grid over time relative to the reference case.
This result may be positive (if the solution requires additional electricity to operate), negative (if the
adoption of this technology lowers energy use) or zero (if this solution doesn't impact the grid at all).
Units: TWh
Create the self.tm object based on the information in self._ref_tam_sources and self._pds_tam_sources.
Overrides to individual values in the tamconfig can also be specified in the config_values argument, which should be a list of tuples (param_name, region, value)
Other configuration values may be passed directly to tam.TAM via **args.
Total land area per region, by year. (Land area remains constant over time; this format is used because it is consistent with TAM)
AC scalar parameters that are most important for defining this scenario.
(Excludes adoption-related parameters.)
Load the named jsonfile, and replace relative filenames within it with absolute ones based on the same directory. Works for tam, ad, configs. By default, replaces fields named 'filename'. If the special field name '*' is given, then _any_ string-valued dictionary value is replaced.
Now with added super-powers: detects if we are doing an integration, and if so, checks for the integration version of the same json file.
Write a data sources structure out to its standard location for solution_name. Processes filename fields to write only the relative file name. Also remove any fields that have values that are not simple. This is rather hacky, and we should implement more careful control later.