Skip to content

Commit eba6990

Browse files
clean up code from previous commit
1 parent e10b154 commit eba6990

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

src/geophires_x/Outputs.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -938,15 +938,12 @@ def o(output_param: OutputParameter):
938938
econ_CarbonRevenue = copy.deepcopy(econ.CarbonRevenue)
939939
econ_CarbonCummCashFlow = copy.deepcopy(econ.CarbonCummCashFlow)
940940

941-
# FIXME WIP account for carbon credit duration; use model.sdacgteconomics.CarbonPrice instead
942941
if econ.DoSDACGTCalculations.value:
943-
# econ_CarbonPrice.value = [model.sdacgteconomics.carbon_credit_price.quantity().to(econ.CarbonPrice.CurrentUnits).magnitude] * len(econ.CarbonPrice.value)
944-
# econ_CarbonPrice.value = [model.sdacgteconomics.carbon_credit_price.quantity().to(
945-
# econ.CarbonPrice.CurrentUnits).magnitude] * len(econ.CarbonPrice.value)
946-
947-
# FIXME WIP...
948942
econ_CarbonRevenue = copy.deepcopy(model.sdacgteconomics.CarbonRevenue)
949-
econ_CarbonRevenue.value = [*([0]*model.surfaceplant.construction_years.value), *(model.sdacgteconomics.CarbonRevenue.value)]
943+
econ_CarbonRevenue.value = [
944+
*([0]*model.surfaceplant.construction_years.value),
945+
*model.sdacgteconomics.CarbonRevenue.value
946+
]
950947

951948
def _convert(gt_param, econ_param) -> None:
952949
gt_param.value = gt_param.quantity().to(econ_param.CurrentUnits).magnitude
@@ -955,15 +952,14 @@ def _convert(gt_param, econ_param) -> None:
955952
_convert(econ_CarbonRevenue, econ.CarbonRevenue)
956953

957954
econ_CarbonCummCashFlow = copy.deepcopy(model.sdacgteconomics.CarbonCummCashFlow)
958-
econ_CarbonCummCashFlow.value = [*([0] * model.surfaceplant.construction_years.value),
959-
*(model.sdacgteconomics.CarbonCummCashFlow.value)]
955+
econ_CarbonCummCashFlow.value = [
956+
*([0] * model.surfaceplant.construction_years.value),
957+
*model.sdacgteconomics.CarbonCummCashFlow.value
958+
]
960959

961960
_convert(econ_CarbonCummCashFlow, econ.CarbonCummCashFlow)
962961

963962

964-
# econ_CarbonRevenue = econ.CarbonRevenue if not econ.DoSDACGTCalculations.value else model.sdacgteconomics.CarbonRevenue
965-
# econ_CarbonCummCashFlow = econ.CarbonCummCashFlow if not econ.DoSDACGTCalculations.value else model.sdacgteconomics.CarbonCummCashFlow
966-
967963
f.write('Start ('
968964
+ o(econ.ElecPrice).CurrentUnits.value +
969965
')(' + o(econ.ElecRevenue).CurrentUnits.value +

0 commit comments

Comments
 (0)