Skip to content

Commit 28df988

Browse files
Remove commented code
1 parent a6de4c1 commit 28df988

File tree

6 files changed

+0
-17
lines changed

6 files changed

+0
-17
lines changed

src/geophires_x/Parameter.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ class Parameter(HasQuantity):
112112
# set to PreferredUnits assuming that the current units are the preferred units
113113
# - they will only change if the read function reads a different unit associated with a parameter
114114
CurrentUnits: Enum = PreferredUnits
115-
#UnitsMatch: bool = True
116115

117116
@property
118117
def UnitsMatch(self) -> bool:
@@ -281,7 +280,6 @@ def ReadParameter(ParameterReadIn: ParameterEntry, ParamToModify, model):
281280
else:
282281
# The value came in without any units, so it must be using the default PreferredUnits
283282
ParamToModify.CurrentUnits = ParamToModify.PreferredUnits
284-
# ParamToModify.UnitsMatch = True
285283

286284
def default_parameter_value_message(new_val: Any, param_to_modify_name: str, default_value: Any) -> str:
287285
return (
@@ -424,7 +422,6 @@ def ConvertUnits(ParamToModify, strUnit: str, model) -> str:
424422
# user has provided a currency that is the currency expected, so just strip off the currency
425423
if prefType == currType:
426424
strUnit = str(val)
427-
# ParamToModify.UnitsMatch = True
428425
ParamToModify.CurrentUnits = currType
429426
return strUnit
430427

@@ -480,7 +477,6 @@ def ConvertUnits(ParamToModify, strUnit: str, model) -> str:
480477

481478
val = float(val) * Factor
482479
strUnit = str(val)
483-
# ParamToModify.UnitsMatch = True
484480
ParamToModify.CurrentUnits = currType
485481
return strUnit
486482

@@ -504,7 +500,6 @@ def ConvertUnits(ParamToModify, strUnit: str, model) -> str:
504500

505501
New_val = (conv_rate * float(val)) * Factor
506502
strUnit = str(New_val)
507-
# ParamToModify.UnitsMatch = False
508503
ParamToModify.CurrentUnits = parts[1]
509504

510505
if len(prefSuff) > 0:
@@ -572,7 +567,6 @@ def ConvertUnits(ParamToModify, strUnit: str, model) -> str:
572567
if new_val_units_lookup is not None and new_val_units_lookup[0] is not None:
573568
ParamToModify.CurrentUnits = new_val_units_lookup[0]
574569

575-
# ParamToModify.UnitsMatch = False
576570
else:
577571
# if we come here, we must have a unit declared, but the unit must be the same as the preferred unit,
578572
# so we need to just get rid of the extra text after the space
@@ -673,7 +667,6 @@ def parameter_with_units_converted_back_to_preferred_units(param: Parameter, mod
673667
# this is true, then we just have a conversion between KUSD and USD, MUSD to KUSD, MUER to EUR, etc.,
674668
# so just do the simple factor conversion
675669
param_with_units_converted_back.value = param.value * Factor
676-
# param_with_units_converted_back.UnitsMatch = True
677670
param_with_units_converted_back.CurrentUnits = currType
678671
return param_with_units_converted_back
679672

@@ -699,7 +692,6 @@ def parameter_with_units_converted_back_to_preferred_units(param: Parameter, mod
699692
raise RuntimeError(msg, ex)
700693

701694
param_with_units_converted_back.value = (conv_rate * float(param.value)) / prefFactor
702-
# param_with_units_converted_back.UnitsMatch = False
703695
return param_with_units_converted_back
704696

705697
else:
@@ -1029,7 +1021,6 @@ def ConvertOutputUnits(oparam: OutputParameter, newUnit: Units, model):
10291021
# so just do the simple factor conversion and exit
10301022
oparam.value = oparam.value * Factor
10311023
oparam.CurrentUnits = DefUnit
1032-
# oparam.UnitsMatch = False
10331024
return
10341025

10351026
# start the currency conversion process
@@ -1086,5 +1077,4 @@ def ConvertOutputUnits(oparam: OutputParameter, newUnit: Units, model):
10861077

10871078
oparam.value = Factor * conv_rate * float(oparam.value)
10881079
oparam.CurrentUnits = DefUnit
1089-
# oparam.UnitsMatch = False
10901080
model.logger.info(f'Complete {str(__name__)}: {sys._getframe().f_code.co_name}')

src/geophires_x/Reservoir.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,6 @@ def read_parameters(self, model: Model) -> None:
585585
# FIXME TODO only convert if current units are km
586586
ParameterToModify.value = ParameterToModify.value * 1000
587587
ParameterToModify.CurrentUnits = LengthUnit.METERS
588-
# ParameterToModify.UnitsMatch = False
589588

590589
elif ParameterToModify.Name == "Reservoir Volume Option":
591590
if ParameterReadIn.sValue == '1':

src/geophires_x/SUTRAWellBores.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,9 @@ def Calculate(self, model: Model) -> None:
253253
if self.injwelldiam.value > 2.0:
254254
self.injwelldiam.value = self.injwelldiam.value * 0.0254
255255
self.injwelldiam.CurrentUnits = LengthUnit.METERS
256-
# self.injwelldiam.UnitsMatch = False
257256
if self.prodwelldiam.value > 2.0:
258257
self.prodwelldiam.value = self.prodwelldiam.value * 0.0254
259258
self.prodwelldiam.CurrentUnits = LengthUnit.METERS
260-
# self.prodwelldiam.UnitsMatch = False
261259

262260
# get wellbore flow rates from SUTRA data
263261
prodwellflowrates = np.append(

src/geophires_x/WellBores.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,11 +1264,9 @@ def Calculate(self, model: Model) -> None:
12641264
if self.injwelldiam.value > 2.0:
12651265
self.injwelldiam.value = self.injwelldiam.value * 0.0254
12661266
self.injwelldiam.CurrentUnits = LengthUnit.METERS
1267-
# self.injwelldiam.UnitsMatch = False
12681267
if self.prodwelldiam.value > 2.0:
12691268
self.prodwelldiam.value = self.prodwelldiam.value * 0.0254
12701269
self.prodwelldiam.CurrentUnits = LengthUnit.METERS
1271-
# self.prodwelldiam.UnitsMatch = False
12721270

12731271
# calculate wellbore temperature drop
12741272
self.ProdTempDrop.value = self.tempdropprod.value # if not Ramey, hard code a user-supplied temperature drop.

src/hip_ra/HIP_RA.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,6 @@ def read_parameters(self) -> None:
668668
self.OutputParameterDict[key.replace('Units:', '')].CurrentUnits = LookupUnits(
669669
self.InputParameters[key].sValue
670670
)[0]
671-
# self.OutputParameterDict[key.replace('Units:', '')].UnitsMatch = False
672671

673672
self.logger.info(f'complete {__class__!s}: {sys._getframe().f_code.co_name}')
674673

src/hip_ra_x/hip_ra_x.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,6 @@ def read_parameters(self) -> None:
628628
self.OutputParameterDict[key.replace('Units:', '')].CurrentUnits = LookupUnits(
629629
self.InputParameters[key].sValue
630630
)[0]
631-
# self.OutputParameterDict[key.replace('Units:', '')].UnitsMatch = False
632631

633632
self.logger.info(f'complete {__class__.__name__!s}: {__name__}')
634633

0 commit comments

Comments
 (0)