Skip to content

Commit cc6a8ee

Browse files
Merge pull request #176 from softwareengineerprogrammer/acre-unit
Acre unit support (HIP-RA-X reservoir area) [v3.15.3]
2 parents 05c827a + 7587c7d commit cc6a8ee

11 files changed

Lines changed: 34 additions & 10 deletions

File tree

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 3.15.2
2+
current_version = 3.15.3
33
commit = True
44
tag = True
55

.cookiecutterrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ default_context:
5454
sphinx_doctest: "no"
5555
sphinx_theme: "sphinx-py3doc-enhanced-theme"
5656
test_matrix_separate_coverage: "no"
57-
version: 3.15.2
57+
version: 3.15.3
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ GEOPHIRES v3 (2023-2026)
88
3.15
99
^^^^
1010

11+
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>`__
12+
1113
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.
1214

1315
3.14

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ Free software: `MIT license <LICENSE>`__
5858
:alt: Supported implementations
5959
:target: https://pypi.org/project/geophires-x
6060

61-
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.15.2.svg
61+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.15.3.svg
6262
:alt: Commits since latest release
63-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.15.2...main
63+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.15.3...main
6464

6565
.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
6666
:target: https://softwareengineerprogrammer.github.io/GEOPHIRES

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
year = '2025'
1919
author = 'NREL'
2020
copyright = f'{year}, {author}'
21-
version = release = '3.15.2'
21+
version = release = '3.15.3'
2222

2323
pygments_style = 'trac'
2424
templates_path = ['./templates']

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def read(*names, **kwargs):
1313

1414
setup(
1515
name='geophires-x',
16-
version='3.15.2',
16+
version='3.15.3',
1717
license='MIT',
1818
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
1919
long_description='{}\n{}'.format(

src/geophires_x/Parameter.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
from abc import ABC
1616

17+
from pint import UndefinedUnitError
1718
from pint.facets.plain import PlainQuantity
1819

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

949950
# No match was found with the unit text string, so try with the canonical symbol (if different).
950-
symbol = _ureg.get_symbol(sUnitText)
951-
if symbol != sUnitText: return LookupUnits(symbol)
951+
try:
952+
symbol = _ureg.get_symbol(sUnitText)
953+
if symbol != sUnitText:
954+
return LookupUnits(symbol)
955+
except UndefinedUnitError as _uue:
956+
return sUnitText, uType
957+
952958
return None, None
953959

954960

src/geophires_x/Units.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class AreaUnit(str, Enum):
135135
FEET2 = "ft**2"
136136
INCHES2 = "in**2"
137137
MILES2 = "mi**2"
138+
ACRES = 'acre'
138139

139140

140141
class VolumeUnit(str, Enum):

src/geophires_x/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '3.15.2'
1+
__version__ = '3.15.3'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Reservoir Temperature, 212.5
2+
Rejection Temperature, 60.0
3+
Reservoir Porosity, 10.0
4+
Reservoir Area, 109930 acre
5+
Reservoir Thickness, 0.25
6+
Reservoir Life Cycle, 25

0 commit comments

Comments
 (0)