Skip to content

Commit

Permalink
Try using np.errstate = warn
Browse files Browse the repository at this point in the history
  • Loading branch information
softwareengineerprogrammer committed Oct 4, 2023
1 parent 3e4464b commit c10525e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/geophires_x/AGSOutputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def PrintOutputs(self, model: Model):
f = scipy.interpolate.interp1d(np.arange(0, len(model.surfaceplant.NetElectricityProduced.value)),
model.surfaceplant.NetElectricityProduced.value, fill_value="extrapolate")
aranged = np.arange(0, len(model.wellbores.ProducedTemperature.value), 1.0)
model.surfaceplant.NetElectricityProduced.value = f(aranged)

# FIXME WIP (warn errstate may or may not be appropriate)
with np.errstate(divide='warn'):
model.surfaceplant.NetElectricityProduced.value = f(aranged)

if len(model.surfaceplant.FirstLawEfficiency.value) != len(model.wellbores.ProducedTemperature.value):
f = scipy.interpolate.interp1d(np.arange(0, len(model.surfaceplant.FirstLawEfficiency.value)),
model.surfaceplant.FirstLawEfficiency.value, fill_value="extrapolate")
Expand Down

0 comments on commit c10525e

Please sign in to comment.