Skip to content

Commit 201579b

Browse files
Comments
1 parent a7513d3 commit 201579b

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/geophires_x/Parameter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,10 @@ def default_parameter_value_message(new_val: Any, param_to_modify_name: str, def
371371
model.logger.warning(msg)
372372
model.logger.info(f'Complete {str(__name__)}: {sys._getframe().f_code.co_name}')
373373
return
374-
# All is good. With a list, we have to use the last character of the Description to get the position.
375-
# I.e., "Gradient 1" should yield a position = 0 ("1" - 1)
376374
else:
377375
if ' ' in ParamToModify.Name:
376+
# Some list parameters are read in with enumerated parameter names; in these cases we use the last
377+
# character of the description to get the position i.e., "Gradient 1" is position 0.
378378
parts = ParameterReadIn.Name.split(' ')
379379
position = int(parts[1]) - 1
380380
if position >= len(ParamToModify.value):

tests/examples/example_multiple_gradients-2.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,7 @@ Reservoir Model,1, ---Multiple Fractures reservoir mod
77
Reservoir Depth,4, ---[km]
88
Number of Segments,4, ---[-]
99
Gradients, 50, 40, 30, 50
10-
Thicknesses, 1, 1, 1
11-
#Gradient 1,50, ---[deg.C/km]
12-
#Thickness 1,1, ---[km]
13-
#Gradient 2,40, ---[deg.C/km]
14-
#Thickness 2,1, ---[km]
15-
#Gradient 3,30, ---[deg.C/km]
16-
#Thickness 3,1, ---[km]
17-
#Gradient 4,50, ---[deg.C/km]
10+
Thicknesses, 1, 1, 1, -- equal thicknesses
1811
Maximum Temperature,400, ---[deg.C]
1912
Number of Production Wells,2, ---[-]
2013
Number of Injection Wells,2, ---[-]

0 commit comments

Comments
 (0)