Skip to content

Commit

Permalink
consistently capitalize UStoreDepth
Browse files Browse the repository at this point in the history
There were some `UstoreDepth`, leading to <type 'exceptions.AttributeError'>: 'WflowModel' object has no attribute 'UStoreDepth'

Also updates the docstrings.
  • Loading branch information
visr committed Jun 10, 2019
1 parent dc980e5 commit da7cd8c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wflow/wflow_sbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ def stateVariables(self):
:var self.Snow: Snow pack [mm]
:var self.SnowWater: Snow pack water [mm]
:var self.TSoil: Top soil temperature [oC]
:var self.UStoreDepth: Water in the Unsaturated Store [mm]
:var self.UStoreLayerDepth: Water in the Unsaturated Store, per layer [mm]
:var self.SatWaterDepth: Water in the saturated store [mm]
:var self.CanopyStorage: Amount of water on the Canopy [mm]
:var self.ReservoirVolume: Volume of each reservoir [m^3]
Expand Down Expand Up @@ -2151,7 +2151,7 @@ def dynamic(self):
:var self.ActInfilt: Actual infiltration into the unsaturated zone [mm]
:var self.CanopyStorage: actual canopystorage (only for subdaily timesteps) [mm]
:var self.SatWaterDepth: Amount of water in the saturated store [mm]
:var self.UStoreDepth: Amount of water in the unsaturated store [mm]
:var self.UStoreLayerDepth: Amount of water in the unsaturated store, per layer [mm]
:var self.zi: depth of the water table in mm below the surface [mm]
:var self.Snow: Snow depth [mm]
:var self.SnowWater: water content of the snow [mm]
Expand Down Expand Up @@ -2329,12 +2329,12 @@ def dynamic(self):
)
self.oldIRSupplymm = self.IRSupplymm

self.UstoreDepth = sum_list_cover(self.UStoreLayerDepth, self.ZeroMap)
self.UStoreDepth = sum_list_cover(self.UStoreLayerDepth, self.ZeroMap)

UStoreCapacity = (
self.SoilWaterCapacity
- self.SatWaterDepth
- self.UstoreDepth
- self.UStoreDepth
)

# Runoff from water bodies and river network
Expand Down Expand Up @@ -2451,7 +2451,7 @@ def dynamic(self):
self.layer['UStoreLayerDepth'][i] = pcr.pcr2numpy(self.UStoreLayerDepth[i],self.mv).ravel()

self.dyn['LandRunoff'] = pcr.pcr2numpy(self.LandRunoff,self.mv).ravel()
self.dyn['sumUStoreLayerDepth'] = pcr.pcr2numpy(self.UstoreDepth,self.mv).ravel()
self.dyn['sumUStoreLayerDepth'] = pcr.pcr2numpy(self.UStoreDepth,self.mv).ravel()

it_kinL = 1
if self.kinwaveIters == 1:
Expand Down Expand Up @@ -2479,7 +2479,7 @@ def dynamic(self):
self.LandRunoff = pcr.numpy2pcr(pcr.Scalar,qo.reshape(self.shape),self.mv)
self.zi = pcr.numpy2pcr(pcr.Scalar,np.copy(self.dyn['zi'].reshape(self.shape)),self.mv)
self.SatWaterDepth = pcr.numpy2pcr(pcr.Scalar,np.copy(self.dyn['SatWaterDepth'].reshape(self.shape)),self.mv)
self.UstoreDepth = pcr.numpy2pcr(pcr.Scalar,np.copy(self.dyn['sumUStoreLayerDepth'].reshape(self.shape)),self.mv)
self.UStoreDepth = pcr.numpy2pcr(pcr.Scalar,np.copy(self.dyn['sumUStoreLayerDepth'].reshape(self.shape)),self.mv)
self.CapFlux = pcr.numpy2pcr(pcr.Scalar,np.copy(self.dyn['CapFlux'].reshape(self.shape)),self.mv)
self.Transfer = pcr.numpy2pcr(pcr.Scalar,np.copy(self.dyn['Transfer'].reshape(self.shape)),self.mv)

Expand Down

0 comments on commit da7cd8c

Please sign in to comment.