Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.13.13
current_version = 3.13.15
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion .cookiecutterrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ default_context:
sphinx_doctest: "no"
sphinx_theme: "sphinx-py3doc-enhanced-theme"
test_matrix_separate_coverage: "no"
version: 3.13.13
version: 3.13.15
version_manager: "bump2version"
website: "https://github.com/NREL"
year_from: "2023"
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GEOPHIRES v3 (2023-2026)
3.13
^^^^

3.13.13: `Well integrity parameterization to trigger redrilling; Drawdown Parameter Schedule; Input params CSV unit and comment parsing <https://github.com/NatLabRockies/GEOPHIRES-X/pull/502>`__ | `release <https://github.com/NREL/GEOPHIRES-X/releases/tag/v3.13.13>`__
3.13.15: `Well integrity parameterization to trigger redrilling; Drawdown Parameter Schedule; Input params CSV unit and comment parsing; State ITC Amount <https://github.com/NatLabRockies/GEOPHIRES-X/pull/502>`__ | `release <https://github.com/NREL/GEOPHIRES-X/releases/tag/v3.13.15>`__

3.13.9: `Add hip-ra-x-result.json schema and HipRaXResult <https://github.com/NatLabRockies/GEOPHIRES-X/pull/499>`__ | `release <https://github.com/NREL/GEOPHIRES-X/releases/tag/v3.13.9>`__

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ Free software: `MIT license <LICENSE>`__
:alt: Supported implementations
:target: https://pypi.org/project/geophires-x

.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.13.13.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.13.15.svg
:alt: Commits since latest release
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.13.13...main
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.13.15...main

.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
:target: https://softwareengineerprogrammer.github.io/GEOPHIRES
Expand Down
1 change: 1 addition & 0 deletions docs/SAM-Economic-Models.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The following table describes how GEOPHIRES parameters are transformed into SAM
| `Starting Heat Sale Price`, `Ending Heat Sale Price`, `Heat Escalation Rate Per Year`, `Heat Escalation Start Year` | Revenue → Capacity Payments | `Fixed amount`, `Capacity payment amount` | `Singleowner` | `cp_capacity_payment_type = 1`, `cp_capacity_payment_amount` | |
| `Starting Cooling Sale Price`, `Ending Cooling Sale Price`, `Cooling Escalation Rate Per Year`, `Cooling Escalation Start Year` | Revenue → Capacity Payments | `Fixed amount`, `Capacity payment amount` | `Singleowner` | `cp_capacity_payment_type = 1`, `cp_capacity_payment_amount` | |
| `Investment Tax Credit Rate` | Incentives → Investment Tax Credit (ITC) | `Federal` → `Percentage (%)` | `Singleowner` | `itc_fed_percent` | Note that unlike the BICYCLE Economic Model's `Total capital costs`, SAM Economic Model's `Total CAPEX` is the total installed cost and does not subtract ITC value (if present). |
| `State Investment Tax Credit Amount` | Incentives → Investment Tax Credit (ITC) | `State` → `Amount ($)` | `Singleowner` | `itc_sta_amount` | |
| `Production Tax Credit Electricity` | Incentives → Production Tax Credit (PTC) | `Federal` → `Amount ($/kWh)` | `Singleowner` | `ptc_fed_amount` | .. N/A |
| `Production Tax Credit Duration` | Incentives → Production Tax Credit (PTC) | `Federal` → `Term (years)` | `Singleowner` | `ptc_fed_term` | .. N/A |
| `Production Tax Credit Inflation Adjusted`, `Inflation Rate` | Incentives → Production Tax Credit (PTC) | `Federal` → `Escalation (%/yr)` | `Singleowner` | `ptc_fed_escal` | If `Production Tax Credit Inflation Adjusted` = True, GEOPHIRES set's SAM's PTC escalation rate to the inflation rate. SAM applies the escalation rate to years 2 and later of the project cash flow. Note that this produces escalation rates that are similar to inflation-adjusted equivalents, but not exactly equal. |
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
year = '2025'
author = 'NREL'
copyright = f'{year}, {author}'
version = release = '3.13.13'
version = release = '3.13.15'

pygments_style = 'trac'
templates_path = ['./templates']
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def read(*names, **kwargs):

setup(
name='geophires-x',
version='3.13.13',
version='3.13.15',
license='MIT',
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
long_description='{}\n{}'.format(
Expand Down
15 changes: 13 additions & 2 deletions src/geophires_x/Economics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,17 @@ def __init__(self, model: Model):
PreferredUnits=PercentUnit.TENTH,
CurrentUnits=PercentUnit.TENTH,
ErrMessage="assume default investment tax credit rate (0)",
ToolTipText="Investment tax credit rate (see docs)"
ToolTipText="Investment tax credit rate (ITC). For SAM Economic Models, this is the federal rate."
)
self.ritc_state_amount = self.ParameterDict[self.ritc_state_amount.Name] = floatParameter(
'State Investment Tax Credit Amount',
DefaultValue=0.0,
Min=0.0,
Max=self.totalcapcost.Max,
UnitType=self.totalcapcost.UnitType,
PreferredUnits=self.totalcapcost.PreferredUnits,
CurrentUnits=self.totalcapcost.CurrentUnits,
ToolTipText='State investment tax credit amount (state ITC).'
)
self.PTR = self.ParameterDict[self.PTR.Name] = floatParameter(
"Property Tax Rate",
Expand Down Expand Up @@ -2775,7 +2785,8 @@ def _warn(_msg: str) -> None:
self.royalty_rate_schedule,
self.royalty_supplemental_payments,
self.construction_capex_schedule,
self.bond_financing_start_year
self.bond_financing_start_year,
self.ritc_state_amount
]
for sam_em_only_param in sam_em_only_params:
if sam_em_only_param.Provided:
Expand Down
3 changes: 3 additions & 0 deletions src/geophires_x/EconomicsSam.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,9 @@ def _get_single_owner_parameters(model: Model) -> dict[str, Any]:
geophires_itc_tenths = Decimal(econ.RITC.value)
ret['itc_fed_percent'] = [float(geophires_itc_tenths * Decimal(100))]

geophires_state_itc_usd = Decimal(econ.ritc_state_amount.quantity().to(convertible_unit('USD')).magnitude)
ret['itc_sta_amount'] = [float(geophires_state_itc_usd)]

if econ.PTCElec.Provided:
ret['ptc_fed_amount'] = [econ.PTCElec.quantity().to(convertible_unit('USD/kWh')).magnitude]

Expand Down
2 changes: 1 addition & 1 deletion src/geophires_x/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.13.13'
__version__ = '3.13.15'
11 changes: 10 additions & 1 deletion src/geophires_x_schema_generator/geophires-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -1857,14 +1857,23 @@
"maximum": 1.0
},
"Investment Tax Credit Rate": {
"description": "Investment tax credit rate (see docs)",
"description": "Investment tax credit rate (ITC). For SAM Economic Models, this is the federal rate.",
"type": "number",
"units": "",
"category": "Economics",
"default": 0.0,
"minimum": 0.0,
"maximum": 1.0
},
"State Investment Tax Credit Amount": {
"description": "State investment tax credit amount (state ITC).",
"type": "number",
"units": "MUSD",
"category": "Economics",
"default": 0.0,
"minimum": 0.0,
"maximum": 100000.0
},
"Property Tax Rate": {
"description": "Property tax rate (see docs)",
"type": "number",
Expand Down
36 changes: 36 additions & 0 deletions tests/geophires_x_tests/test_economics_sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,42 @@ def test_chp_fixed_plant_cost_requires_electrical_plant_cost_allocation_ratio(se

self.assertIn('CHP Electrical Plant Cost Allocation Ratio is required', str(re.exception))

def test_state_itc_amount(self):
def _get_result(state_itc_amount_musd: float, fed_itc_rate_frac: float = 0.0) -> GeophiresXResult:
return GeophiresXClient().get_geophires_result(
ImmutableGeophiresInputParameters(
from_file_path=self._get_test_file_path('generic-egs-case-2_sam-single-owner-ppa.txt'),
params={
'State Investment Tax Credit Amount': state_itc_amount_musd,
'Investment Tax Credit Rate': fed_itc_rate_frac,
'Construction Years': 1,
},
)
)

def _itc_output_vu(r: GeophiresXResult) -> dict[str, float]:
return r.result['ECONOMIC PARAMETERS']['Investment Tax Credit']

def _itc_output_q(r: GeophiresXResult) -> dict[str, float]:
itc_vu = _itc_output_vu(r)
return quantity(itc_vu['value'], itc_vu['unit'])

r_state_itc_amount_only = _get_result(4)

line_item = 'State ITC amount income ($)'
cash_flow_row = self._get_cash_flow_row(r_state_itc_amount_only.result['SAM CASH FLOW PROFILE'], line_item)
self.assertEqual(4_000_000, cash_flow_row[1])
self.assertEqual(quantity(4, 'MUSD'), _itc_output_q(r_state_itc_amount_only))

r_fed_itc_rate_only = _get_result(0, 0.3)
fed_itc_rate_only_q = _itc_output_q(r_fed_itc_rate_only)

r_fed_itc_rate_and_state_itc_amount = _get_result(4, 0.3)
self.assertEqual(
_itc_output_q(r_state_itc_amount_only) + fed_itc_rate_only_q,
_itc_output_q(r_fed_itc_rate_and_state_itc_amount),
)

@staticmethod
def _new_model(
input_file: Path,
Expand Down
Loading