model.unitadoption

Unit Adoption module.

def cumulative_degraded_land( total_area_per_region, units_adopted, disturbance_rate, delay_protection_1yr, degradation_rate, protected_or_unprotected):
class UnitAdoption(model.data_handler.DataHandler):

Implementation for the Unit Adoption module.

Arguments

ac: advanced_controls.py object, settings to control model operation. soln_ref_funits_adopted: Annual functional units adopted in the Reference scenario. soln_pds_funits_adopted: Annual functional units adopted in the PDS scenario. ref_total_adoption_units: dataframe of TAM/TLA/TOA per region for the Reference scenario. pds_total_adoption_units: dataframe of TAM/TLA/TOA per region for the PDS scenario. repeated_cost_for_iunits (bool): whether there is a repeated first cost to maintaining implementation units at a specified level in soln_pds_new_iunits_reqd, soln_ref_new_iunits_reqd, & conv_ref_new_iunits. electricity_unit_factor (float): a factor to multiply the electricity-related results by. For example, Land solutions typically multiply by 1e6 because their basic land unit is a million hectares but the electricity use (for irrigation, etc) is calculated per hectare.

Quirks options

bug_cfunits_double_count (bool): enable bug-for-bug compatibility replacement_period_offset: There are two different formulas used by the Excel for calculating replacement period, which differ by a constant '1' added in some places to the code. I don't really understand this (the added constant doesn't make sense to me), but it is clear that different models need this set differently. I'm setting the default to 1 because that was the original behavior. The other used value is 0.

UnitAdoption( ac, soln_ref_funits_adopted, soln_pds_funits_adopted, ref_total_adoption_units=None, pds_total_adoption_units=None, repeated_cost_for_iunits=False, electricity_unit_factor=1.0, bug_cfunits_double_count=False, replacement_period_offset=1)
def ref_population(self):

Population by region for the reference case. SolarPVUtil 'Unit Adoption Calculations'!P16:Z63

def ref_gdp(self):

GDP by region for the reference case. SolarPVUtil 'Unit Adoption Calculations'!AB16:AL63

def ref_gdp_per_capita(self):

GDP per capita for the reference case. SolarPVUtil 'Unit Adoption Calculations'!AN16:AX63

def ref_tam_per_capita(self):

Total Addressable Market per capita for the reference case. SolarPVUtil 'Unit Adoption Calculations'!BA16:BK63

def ref_tam_per_gdp_per_capita(self):

Total Addressable Market per unit of GDP per capita for the reference case. SolarPVUtil 'Unit Adoption Calculations'!BM16:BW63

def ref_tam_growth(self):

Growth in Total Addressable Market for the reference case. SolarPVUtil 'Unit Adoption Calculations'!BY16:CI63

def pds_population(self):

Population by region for the Project Drawdown Solution case. SolarPVUtil 'Unit Adoption Calculations'!P68:Z115

def pds_gdp(self):

GDP by region for the Project Drawdown Solution case. SolarPVUtil 'Unit Adoption Calculations'!AB68:AL115

def pds_gdp_per_capita(self):

GDP per capita for the Project Drawdown Solution case. SolarPVUtil 'Unit Adoption Calculations'!AN68:AX115

def pds_tam_per_capita(self):

Total Addressable Market per capita for the Project Drawdown Solution case. SolarPVUtil 'Unit Adoption Calculations'!BA68:BK115

def pds_tam_per_gdp_per_capita(self):

Total Addressable Market per unit of GDP per capita for the Project Drawdown Solution case. SolarPVUtil 'Unit Adoption Calculations'!BM68:BW115

def pds_tam_growth(self):

Growth in Total Addressable Market for the Project Drawdown Solution case. SolarPVUtil 'Unit Adoption Calculations'!BY68:CI115

def cumulative_reduction_in_total_degraded_land(self):

This is the increase in undegraded land in the PDS versus the REF (cumulatively in any year), and can be traced to the direct action of increasing SOLUTION adoption. Units: millions ha. Calculation: Undegraded Land in the PDS Scenario - Undegraded Land in REF Scenario ForestProtection 'Unit Adoption Calculations'!DR253:DS298

def annual_reduction_in_total_degraded_land(self):

This is the decrease in total degraded land in the PDS versus the REF in each year. Units: Millions ha. Note: in excel this is calculated from several tables but we can achieve the same results directly from cumulative_reduction_in_total_degraded_land(). ForestProtection 'Unit Adoption Calculations'!CG253:CH298

def pds_cumulative_degraded_land_unprotected(self):

This represents the total land degraded that was never protected in the PDS assuming the rate entered on the Advanced Controls sheet. This rate is applied only to the land that is not covered by the SOLUTION (ie land not artificially protected) and that is not degraded. The impact of protection may be delayed (at User's input on Advanced Controls) and therefore the degradation rate may depend on the current year's or previous year's protection. ForestProtection 'Unit Adoption Calculations'!CG135:CH181

def pds_cumulative_degraded_land_protected(self):

Even Protected Land suffers from Degradation via Disturbances (perhaps due to natural or anthropogenic means such as logging, storms, fires or human settlement). The Rate of this Disturbance is Entered on Advanced Controls, and is assumed equal in the PDS and REF. This Disturbance Rate affects annually, the degradation of Protected Land, but is expected to be much less than the Degradation Rate of Unprotected Land. ForestProtection 'Unit Adoption Calculations'!EI135:EJ181

def pds_total_undegraded_land(self):

This represents the total land that is not degraded in any particular year of the PDS. It takes the TLA and removes the degraded land, which is the same as summing the undegraded land under the SOLUTION and At Risk land. Units: Millions ha Calculation: Total land/TLA - Land Degraded that was Unprotected - Protected Land that is Degraded (via a Disturbance) in Current Year ForestProtection 'Unit Adoption Calculations'!DS135:DT181

def ref_cumulative_degraded_land_unprotected(self):

This represents the total land degraded that was never protected in the REF assuming the rate entered on the Advanced Controls sheet. This rate is applied only to the land that is not covered by the SOLUTION (ie land not artificially protected) and that is not degraded. The impact of protection may be delayed (at User's input on Advanced Controls) and therefore the degradation rate may depend on the current year's or previous year's protection. ForestProtection 'Unit Adoption Calculations'!CG197:CH244

def ref_cumulative_degraded_land_protected(self):

Even Protected Land suffers from Degradation via Disturbances (perhaps due to natural or anthropogenic means such as logging, storms, fires or human settlement). The Rate of this Disturbance is Entered on Advanced Controls, and is assumed equal in the PDS and REF. This Disturbance Rate affects annually, the degradation of Protected Land, but is expected to be much less than the Degradation Rate of Unprotected Land. ForestProtection 'Unit Adoption Calculations'!EI197:EJ244

def ref_total_undegraded_land(self):

This represents the total land that is not degraded in any particular year of the REF. It takes the TLA and removes the degraded land, which is the same as summing the undegraded land under the SOLUTION and At Risk land. Units: Millions ha Calculation: Total land/TLA - Land Degraded that was Unprotected - Protected Land that is Degraded (via a Disturbance) in Current Year ForestProtection 'Unit Adoption Calculations'!DS197:DT244

def soln_pds_cumulative_funits(self):

Cumulative Functional Units Utilized. SolarPVUtil 'Unit Adoption Calculations'!Q134:AA181

def soln_pds_tot_iunits_reqd(self):

Total iunits required each year. SolarPVUtil 'Unit Adoption Calculations'!AX134:BH181

def soln_pds_new_iunits_reqd(self):

New implementation units required (includes replacement units)

Should reflect the unit lifetime assumed in the First Cost tab. For simplicity assumed a fix lifetime rather than a gaussian distribution, but this can be changed if needed.

This is used to calculate Advanced Controls Output of Solution Implementation Units Adopted. This is also used to Calculate First Cost, Marginal First Cost and NPV. SolarPVUtil 'Unit Adoption Calculations'!AG136:AQ182

def soln_pds_big4_iunits_reqd(self):

Implementation units required in USA/EU/China/India vs Rest of World. SolarPVUtil 'Unit Adoption Calculations'!BN136:BS182

def soln_ref_cumulative_funits(self):

Cumulative functional units. SolarPVUtil 'Unit Adoption Calculations'!Q197:AA244

def soln_ref_tot_iunits_reqd(self):

Total implementation units required. SolarPVUtil 'Unit Adoption Calculations'!AX197:BH244

def soln_ref_new_iunits_reqd_RRS(self):

New implementation units required (includes replacement units), RRS version SolarPVUtil 'Unit Adoption Calculations'!AG197:AQ244

def soln_ref_new_iunits_reqd_LAND(self):

New implementation units required (includes replacement units), LAND version Afforestation 'Unit Adoption Calculations'!AG197:AQ244

def soln_ref_new_iunits_reqd(self):

New implementation units required (includes replacement units)

Should reflect the unit lifetime assumed in the First Cost tab. For simplicity assumed a fix lifetime rather than a gaussian distribution, but this can be changed if needed.

This table is also used to Calculate Marginal First Cost and NPV.

def soln_net_annual_funits_adopted(self):

Net annual functional units adopted.

Return value is a DataFrame with an index of years, columns for each region and floating point data values.

This represents the total additional functional units captured either by the CONVENTIONAL mix of technologies/practices in the REF case scenario, OR total growth of the SOLUTION in the PDS scenario, i.e. in addition to the current growth of the SOLUTION in the REF scenario.

This is used to calculate the Operating Cost, Grid, Fuel, Direct and (optionally) Indirect Emissions. SolarPVUtil 'Unit Adoption Calculations'!B251:L298

def net_annual_land_units_adopted(self):

Similar to soln_net_annual_funits_adopted, for Land models. Conservation Agriculture 'Unit Adoption Calculations'!B251:L298

def conv_ref_tot_iunits(self):

Note that iunits = land units for LAND models. From Excel: 'Total cumulative units of the conventional or legacy practice installed by year.

Reflects the total increase in the installed base units less the installation of Solution/technology units. Assumes a binary market with demand for either the defined Conventional Unit (or a weighted average of a mix of technologies/practices) or a Solution Unit. NOTE for integration: In REF case a weighted factor needs to account for current technology mix; for PDS case proposed technology mix needs to be reflected here.'

SolarPVUtil 'Unit Adoption Calculations'!Q251:AA298

def conv_ref_annual_tot_iunits(self):

Number of Implementation Units of the Conventional practice/technology that would be needed in the REF Scenario to meet the Functional Unit Demand met by the PDS Implementation Units in the PDS Scenario. This is equivalent to the number of Annual Active CONVENTIONAL units that would have been needed in REF but are not needed in PDS scenario, since SOLUTION units are used as a direct replacement for CONVENTIONAL units. Implementation Conventional Units = ((Total Annual Functional Units(PDS) - Total Annual Functional units (REF) ) / Average Annual Use Per Conventional Unit)

SolarPVUtil 'Unit Adoption Calculations'!AX251:BH298

def conv_ref_new_iunits(self):

New implementation units required (includes replacement units)

Number of Additional Implementation Units of the Conventional practice/technology that would be needed in the REF Scenario to meet the Functional Unit Demand met by the PDS Implementation Units in the PDS Scenario. This is equivalent to the number of Active CONVENTIONAL units that would have been sold/produced in REF but are not sold/produced in PDS scenario, since SOLUTION units are used as a direct replacement for CONVENTIONAL units.

SolarPVUtil 'Unit Adoption Calculations'!AG251:AQ298

def soln_pds_net_grid_electricity_units_saved(self):

Energy Units (e.g. TWh, tonnes oil equivalent, million therms, etc.) are calculated by multiplying the net annual functional units adopted by the annual energy saved per unit (specified in the main controls). In some rare cases the energy saved per unit installed may vary by region and/or time, in which case a separate tab for that variable may prove necessary.

SolarPVUtil 'Unit Adoption Calculations'!B307:L354 Irrigation Efficiency 'Unit Adoption Calculations'!B307:L354, 10^6 electricity_unit_factor

def soln_pds_net_grid_electricity_units_used(self):

Energy Units Used (TWh) are calculated by multiplying the net annual functional units adopted by the average annual electricity used by the solution per functional unit (specified in the main controls) minus net annual functional units adopted by the average annual electricity used by the conventional technologies/practices (specified in the main controls). In some rare cases the energy saved per unit installed may vary by region and/or time, in which case a separate tab for that variable may prove necessary.

SolarPVUtil 'Unit Adoption Calculations'!Q307:AA354 Irrigation Efficiency 'Unit Adoption Calculations'!Q307:AA354, 10^6 electricity_unit_factor

def soln_pds_fuel_units_avoided(self):

Fuel consumption avoided annually. Fuel avoided = CONVENTIONAL stock avoided * Volume consumed by CONVENTIONAL unit per year * Fuel Efficiency of SOLUTION

SolarPVUtil 'Unit Adoption Calculations'!AD307:AN354

def soln_pds_direct_co2_emissions_saved(self):

Direct emissions of CO2 avoided, in tons. SolarPVUtil 'Unit Adoption Calculations'!AT307:BD354

def soln_pds_direct_ch4_co2_emissions_saved(self):

Direct emissions of CH4 avoided, in tons of equivalent CO2.

SolarPVUtil 'Unit Adoption Calculations'!BF307:BP354

def soln_pds_direct_n2o_co2_emissions_saved(self):

Direct emissions of N2O avoided, in tons of CO2 equivalents.

SolarPVUtil 'Unit Adoption Calculations'!BR307:CB354

def net_land_units_after_emissions_lifetime(self):

Emissions after the calculated lifetime (which is often very long, ex: 100 years)

This table is used to calculate the Annual Direct Emissions of all GH Gases if the User selects "Annual" accounting (ie the direct emissions are released for a certain number of years rather than only in the year of adoption).

Conservation Agriculture 'Unit Adoption Calculations'!EI251:ES298

def soln_pds_annual_land_area_harvested(self):

Land Area Harvested is used to estimate the impact of harvesting the product of the land on Carbon Sequestration (CO2 Calcs) and on Emissions (CO2 Calcs):

Since some land is cleared every x years, it cannot sequester Carbon in that year, not until the land is fully re-planted by the following year. When land is cleared, there are emissions created from at least some of the material on the land, these emissions are calculated based on this table.

There is a year's delay before the x-year harvesting frequency begins due to planting time in the first year. After that, the x-year frequency continues. Afforestation 'Unit Adoption Calculations'!EH135:ER182

def direct_co2eq_emissions_saved_land(self):

ForestProtection 'Unit Adoption Calculations'!AT307:AU354

def direct_co2_emissions_saved_land(self):

ForestProtection 'Unit Adoption Calculations'!BF307:BG354

def direct_n2o_co2_emissions_saved_land(self):

ForestProtection 'Unit Adoption Calculations'!BR307:BS354

def direct_ch4_co2_emissions_saved_land(self):

ForestProtection 'Unit Adoption Calculations'!CD307:CE354