Skip to content

Commit f752c3f

Browse files
Electricity breakeven price/LCOE display name
1 parent 330c7f5 commit f752c3f

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

src/geophires_x/Economics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,6 +1582,7 @@ def __init__(self, model: Model):
15821582

15831583
self.LCOE = self.OutputParameterDict[self.LCOE.Name] = OutputParameter(
15841584
Name="LCOE",
1585+
display_name='Electricity breakeven price',
15851586
UnitType=Units.ENERGYCOST,
15861587
PreferredUnits=EnergyCostUnit.CENTSSPERKWH,
15871588
CurrentUnits=EnergyCostUnit.CENTSSPERKWH

src/geophires_x/Outputs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def PrintOutputs(self, model: Model):
202202
f.write(f' Average Cooling Production: {np.average(model.surfaceplant.cooling_produced.value):10.2f} ' + model.surfaceplant.cooling_produced.CurrentUnits.value + NL)
203203

204204
if model.surfaceplant.enduse_option.value in [EndUseOptions.ELECTRICITY]:
205-
f.write(f' Electricity breakeven price: {model.economics.LCOE.value:10.2f} ' + model.economics.LCOE.CurrentUnits.value + NL)
205+
f.write(f' {model.economics.LCOE.display_name}: {model.economics.LCOE.value:10.2f} {model.economics.LCOE.CurrentUnits.value}\n')
206206
elif model.surfaceplant.enduse_option.value in [EndUseOptions.HEAT] and \
207207
model.surfaceplant.plant_type.value not in [PlantType.ABSORPTION_CHILLER]:
208208
f.write(f' Direct-Use heat breakeven price (LCOH): {model.economics.LCOH.value:10.2f} ' + model.economics.LCOH.CurrentUnits.value + NL)
@@ -214,7 +214,7 @@ def PrintOutputs(self, model: Model):
214214
EndUseOptions.COGENERATION_TOPPING_EXTRA_ELECTRICITY,
215215
EndUseOptions.COGENERATION_BOTTOMING_EXTRA_ELECTRICITY,
216216
EndUseOptions.COGENERATION_PARALLEL_EXTRA_ELECTRICITY]:
217-
f.write(f' Electricity breakeven price: {model.economics.LCOE.value:10.2f} ' + model.economics.LCOE.CurrentUnits.value + NL)
217+
f.write(f' {model.economics.LCOE.display_name}: {model.economics.LCOE.value:10.2f} {model.economics.LCOE.CurrentUnits.value}\n')
218218
f.write(f' Direct-Use heat breakeven price (LCOH): {model.economics.LCOH.value:10.2f} ' + model.economics.LCOH.CurrentUnits.value + NL)
219219

220220
f.write(f' Number of production wells: {model.wellbores.nprod.value:10.0f}'+NL)

src/geophires_x_schema_generator/__init__.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,28 +168,22 @@ def get_result_json_schema(self, output_params_json) -> dict:
168168
if param_name in properties:
169169
_log.warning(f'Param {param_name} is already in properties: {properties[param_name]}')
170170

171-
param = (
172-
{
173-
# 'categories': [],
174-
}
175-
if param_name not in properties
176-
else properties[param_name]
177-
)
178-
179-
# param['categories'].append(category)
171+
param = {} if param_name not in properties else properties[param_name]
180172

181173
if param_name in output_params:
182174
output_param = output_params[param_name]
183175
param['type'] = output_param['json_parameter_type']
184176
description = output_param['ToolTipText']
185177
if 'output_parameter_name' in output_param:
186-
description = f'{output_param["output_parameter_name"]}. {description}'
178+
if description is not None and description != '':
179+
description = f'{output_param["output_parameter_name"]}. {description}'
180+
else:
181+
description = output_param['output_parameter_name']
187182
param['description'] = description
188183
param['units'] = (
189184
output_param['CurrentUnits'] if isinstance(output_param['CurrentUnits'], str) else None
190185
)
191186

192-
# properties[param_name] = param.copy()
193187
cat_properties[param_name] = param.copy()
194188

195189
properties[category] = {'type': 'object', 'properties': cat_properties}

src/geophires_x_schema_generator/geophires-result.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
"End-Use": {},
1313
"Surface Application": {},
1414
"Average Net Electricity Production": {},
15-
"Electricity breakeven price": {},
15+
"Electricity breakeven price": {
16+
"type": "number",
17+
"description": "LCOE",
18+
"units": "cents/kWh"
19+
},
1620
"Average Direct-Use Heat Production": {},
1721
"Direct-Use heat breakeven price": {},
1822
"Direct-Use heat breakeven price (LCOH)": {},
@@ -37,7 +41,7 @@
3741
"Segment 4 Geothermal gradient": {},
3842
"LCOE": {
3943
"type": "number",
40-
"description": "",
44+
"description": "LCOE",
4145
"units": "cents/kWh"
4246
},
4347
"LCOH": {

0 commit comments

Comments
 (0)