Skip to content

Commit 5501537

Browse files
authored
Update waterabstraction.py
Add .copy() to Wold to avoid overwriting of the variable when self.var.W1 is updated at line 587
1 parent b398fe1 commit 5501537

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lisflood/hydrological_modules/waterabstraction.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def dynamic(self):
575575
IrrigationWaterDemand = irrigation_for_prescribed*self.var.M3toMM
576576
IrrigationWaterDemand = np.where(self.var.SoilFraction.values[ivegIrrigatedPrescribed] > 0, IrrigationWaterDemand / self.var.SoilFraction.values[ivegIrrigatedPrescribed], 0)
577577
# updating soil moisture of LISFLOOD on Irrigated_prescribed fraction
578-
Wold = self.var.W1.values[ivegIrrigatedPrescribed]
578+
Wold = self.var.W1.values[ivegIrrigatedPrescribed].copy()
579579
# if irrigated soil is less than Pf3 then fill up to Pf3 (if there is water demand)
580580
# if more than Pf3 the additional water is transpirated
581581
# there is no water demand if the soil is frozen

0 commit comments

Comments
 (0)