Skip to content

Commit 50237ef

Browse files
fix S-DAC profile client parsing
1 parent c1af3f0 commit 50237ef

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/geophires_x/OutputsS_DAC_GT.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def PrintOutputs(self, model) -> tuple:
8888

8989
f.write(NL)
9090
f.write(" **********************" + NL)
91-
f.write(" * S-DAC-GT PROFILE *" + NL)
91+
f.write(" * S-DAC-GT PROFILE *" + NL)
9292
f.write(" **********************" + NL)
9393
f.write("Year Carbon Cumm. Carbon S-DAC-GT S-DAC-GT Cumm. Cumm. Cost Annual Carbon" + NL)
9494
f.write("Since Captured Captured Annual Cost Cash Flow Cost Per Tonne Revenue" + NL)

src/geophires_x_client/geophires_x_result.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,7 @@ def extract_table_header(lines: list) -> list:
804804
'S-DAC-GT Annual Cost (USD/yr)',
805805
'S-DAC-GT Cumm. Cash Flow (USD)',
806806
'Cumm. Cost Per Tonne (USD/tonne)',
807+
'Annual Carbon Revenue (USD/yr)',
807808
]
808809

809810
try:

tests/examples/S-DAC-GT.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Simulation Metadata
66
----------------------
77
GEOPHIRES Version: 3.13.8
88
Simulation Date: 2026-05-19
9-
Simulation Time: 11:37
10-
Calculation Time: 0.140 sec
9+
Simulation Time: 13:57
10+
Calculation Time: 0.137 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -270,7 +270,7 @@ ________________________________________________________________________________
270270

271271

272272
**********************
273-
* S-DAC-GT PROFILE *
273+
* S-DAC-GT PROFILE *
274274
**********************
275275
Year Carbon Cumm. Carbon S-DAC-GT S-DAC-GT Cumm. Cumm. Cost Annual Carbon
276276
Since Captured Captured Annual Cost Cash Flow Cost Per Tonne Revenue

tests/test_geophires_x_client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,18 +590,19 @@ def test_parse_sdacgt_profile(self):
590590
'S-DAC-GT Annual Cost (USD/yr)',
591591
'S-DAC-GT Cumm. Cash Flow (USD)',
592592
'Cumm. Cost Per Tonne (USD/tonne)',
593+
'Annual Carbon Revenue (USD/yr)',
593594
],
594595
)
595596

596597
# Values below need to be synchronized if S-DAC-GT example output values change.
597-
self.assertEqual([1, 78330.8, 78330.8, 17411627.98, 17411627.98, 222.28], sdacgt_profile[1])
598+
self.assertEqual([1, 78330.8, 78330.8, 17411627.98, 17411627.98, 222.28, 14099544.46], sdacgt_profile[1])
598599

599600
self.assertEqual(
600-
[15, 76263.89, 1167207.48, 16952186.81, 259450710.33, 222.28],
601+
[15, 76263.89, 1167207.48, 16952186.81, 259450710.33, 222.28, 13727499.34],
601602
sdacgt_profile[15],
602603
)
603604

604-
self.assertEqual([30, 68860.68, 2253170.17, 15306577.89, 500842063.38, 222.28], sdacgt_profile[30])
605+
self.assertEqual([30, 68860.68, 2253170.17, 15306577.89, 500842063.38, 222.28, 12394922.28], sdacgt_profile[30])
605606

606607
def test_parse_economic_model(self):
607608
result = GeophiresXResult(self._get_test_file_path('examples/example3.out'))

0 commit comments

Comments
 (0)