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.15.2
current_version = 3.15.3
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.15.2
version: 3.15.3
version_manager: "bump2version"
website: "https://github.com/NREL"
year_from: "2023"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ GEOPHIRES v3 (2023-2026)
3.15
^^^^

3.15.3: `Acre unit support (HIP-RA-X Reservoir Area) <https://github.com/softwareengineerprogrammer/GEOPHIRES/pull/176>`__ | `release <https://github.com/NREL/GEOPHIRES-X/releases/tag/v3.15.3>`__

3.15: `Calculate S-DAC carbon revenue (BICYCLE); Reservoir Stimulation Capital Cost per Fracture Surface Area <https://github.com/NREL/GEOPHIRES-X/pull/510>`__ | `release <https://github.com/NREL/GEOPHIRES-X/releases/tag/v3.15.2>`__ | **Changed:** S-DAC carbon revenue is now calculated. See `the tracking issue <https://github.com/NatLabRockies/GEOPHIRES-X/issues/341>`__ for details.

3.14
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.15.2.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.15.3.svg
:alt: Commits since latest release
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.15.2...main
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.15.3...main

.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
:target: https://softwareengineerprogrammer.github.io/GEOPHIRES
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.15.2'
version = release = '3.15.3'

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.15.2',
version='3.15.3',
license='MIT',
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
long_description='{}\n{}'.format(
Expand Down
10 changes: 8 additions & 2 deletions src/geophires_x/Parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from abc import ABC

from pint import UndefinedUnitError
from pint.facets.plain import PlainQuantity

from geophires_x.OptionList import GeophiresInputEnum
Expand Down Expand Up @@ -947,8 +948,13 @@ def LookupUnits(sUnitText: str):
return item, uType

# No match was found with the unit text string, so try with the canonical symbol (if different).
symbol = _ureg.get_symbol(sUnitText)
if symbol != sUnitText: return LookupUnits(symbol)
try:
symbol = _ureg.get_symbol(sUnitText)
if symbol != sUnitText:
return LookupUnits(symbol)
except UndefinedUnitError as _uue:
return sUnitText, uType

return None, None


Expand Down
1 change: 1 addition & 0 deletions src/geophires_x/Units.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class AreaUnit(str, Enum):
FEET2 = "ft**2"
INCHES2 = "in**2"
MILES2 = "mi**2"
ACRES = 'acre'


class VolumeUnit(str, Enum):
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.15.2'
__version__ = '3.15.3'
6 changes: 6 additions & 0 deletions tests/hip_ra_x_tests/hip-ra-x-area-acres.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Reservoir Temperature, 212.5
Rejection Temperature, 60.0
Reservoir Porosity, 10.0
Reservoir Area, 109930 acre
Reservoir Thickness, 0.25
Reservoir Life Cycle, 25
11 changes: 10 additions & 1 deletion tests/hip_ra_x_tests/test_hip_ra_x.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,16 @@ def test_hip_ra_input_parameters_init(self):
with self.assertRaises(ValueError):
HipRaInputParameters(1)

def _new_hip_ra_test_instance(self, enable_hip_ra_logging_config=False, pre_re_stash_runner=None) -> HIP_RA_X:
def test_area_acre(self):
result: HipRaResult = HipRaXClient().get_hip_ra_x_result(
HipRaInputParameters(self._get_test_file_path('hip-ra-x-area-acres.txt'))
)

self.assertEqual('km**2', result.result['SUMMARY OF INPUTS']['Reservoir Area']['unit'])
self.assertAlmostEqual(444.9, result.result['SUMMARY OF INPUTS']['Reservoir Area']['value'], places=1)

@staticmethod
def _new_hip_ra_test_instance(enable_hip_ra_logging_config=False, pre_re_stash_runner=None) -> HIP_RA_X:
stash_cwd = Path.cwd()
stash_sys_argv = sys.argv

Expand Down
Loading