Implementation being handled by @aimiktena & @natakokota (I can't assign them directly because they are not added as collaborators on this repo)
Download a fresh copy of 01d-jedi-geothermal-model-rel-gt12-23-16.xlsm and open it in Excel (other programs such as Google Sheets or Numbers on Mac may also work, although Excel is recommended to reduce chances of compatibility issues affecting formulas). It is strongly recommended that you DO NOT REUSE the same original file repeatedly in order to reduce the risk of accidentally editing it. You should be careful to avoid editing the sheet at all throughout this entire process, as it will be hard to catch and correct alterations.
Pick an initial output to calculate from the Summary Results sheet, i.e. Jobs (FTE) Total Impacts in cell B28:
Call the function in get_jedi_geothermal_result using input values from input_params and setting the corresponding output on JediGeothermalResult, i.e.
class JediGeothermalClient:
def __init__(self):
self._logger = _logger
def get_jedi_geothermal_result(self, input_params: JediGeothermalInputParameters) -> JediGeothermalResult:
self._logger.info(f'Calculating JEDI result for: {input_params}')
result: JediGeothermalResult = JediGeothermalResult
result.operating_years_annual_earnings_MUSD = get_operating_years_annual_earnings_MUSD(input_params.resource_depth_m)
# [... other calculations ...]
return result
8. Write one or more tests in [`tests/jedi_geothermal_tests/test_jedi_geothermal.py`](https://github.com/NREL/GEOPHIRES-X/blob/94ddec5e699f3b2915a365333514134abd2dc67e/tests/jedi_geothermal_tests/test_jedi_geothermal.py) i.e.
```python
def test_calculate_operating_years_annual_earnings():
self.assertEqual(500, get_operating_years_annual_earnings_MUSD(100))
Parent issue: https://github.com/NREL/GEOPHIRES-X/issues/169
Implementation being handled by @aimiktena & @natakokota (I can't assign them directly because they are not added as collaborators on this repo)
Download a fresh copy of 01d-jedi-geothermal-model-rel-gt12-23-16.xlsm and open it in Excel (other programs such as Google Sheets or Numbers on Mac may also work, although Excel is recommended to reduce chances of compatibility issues affecting formulas). It is strongly recommended that you DO NOT REUSE the same original file repeatedly in order to reduce the risk of accidentally editing it. You should be careful to avoid editing the sheet at all throughout this entire process, as it will be hard to catch and correct alterations.
Pick an initial output to calculate from the Summary Results sheet, i.e. Jobs (FTE) Total Impacts in cell B28:
Add the output to
JediGeothermalResult
, suffixed with units, i.e.operating_years_annual_earnings_MUSD
: https://github.com/NREL/GEOPHIRES-X/blob/94ddec5e699f3b2915a365333514134abd2dc67e/src/jedi_geothermal/__init__.py#L18-L28Using Excel, follow & write down the formulas that calculate that output until you get back to inputs
Add the required inputs to
JediGeothermalInputParameters
(if not already present), i.e.resource_depth_m
: https://github.com/NREL/GEOPHIRES-X/blob/94ddec5e699f3b2915a365333514134abd2dc67e/src/jedi_geothermal/__init__.py#L31-L40Add a python function to
src/jedi_geothermal/__init__.py
that implements the formula you wrote down, calculating the output from the inputs, i.e.Call the function in
get_jedi_geothermal_result
using input values frominput_params
and setting the corresponding output onJediGeothermalResult
, i.e.