diff --git a/src/lisflood/Lisflood_dynamic.py b/src/lisflood/Lisflood_dynamic.py index fc1b65a..364f0a4 100644 --- a/src/lisflood/Lisflood_dynamic.py +++ b/src/lisflood/Lisflood_dynamic.py @@ -196,21 +196,8 @@ def splitlanduse(array1, array2=None, array3=None): # sum of both lines # CrossSection2Area = pcraster.max(scalar(0.0), (self.Chan2M3Kin - self.Chan2M3Start) / self.ChanLength) - # temporary subtract routing ChanQ here, to be added after checks for small values - self.sumDisDay -= self.ChanQ - self.TotalCrossSectionArea = self.ChanM3 * self.InvChanLength - if option['SplitRouting']: - self.TotalCrossSectionAreaSAFE = self.TotalCrossSectionArea - self.CrossSection2AreaSAFE = self.CrossSection2Area - self.TotalCrossSectionArea = np.where(np.abs(self.TotalCrossSectionAreaSAFE - self.CrossSection2AreaSAFE)<0.0000001,0.0,self.TotalCrossSectionArea) - self.CrossSection2Area = np.where(np.abs(self.TotalCrossSectionAreaSAFE - self.CrossSection2AreaSAFE)<0.0000001,0.0,self.CrossSection2Area) - self.ChanQ = np.where(np.abs(self.TotalCrossSectionAreaSAFE - self.CrossSection2AreaSAFE)<0.0000001,0.0,self.ChanQ) - self.ChanM3 = np.where(np.abs(self.TotalCrossSectionAreaSAFE - self.CrossSection2AreaSAFE)<0.0000001,0.0,self.ChanM3) - - # add ChanQ again after small values check - self.sumDisDay += self.ChanQ self.sumDis += self.sumDisDay self.ChanQAvg = self.sumDisDay/self.NoRoutSteps @@ -271,4 +258,4 @@ def splitlanduse(array1, array2=None, array3=None): self.stateVar_module.dynamic() if option['wateruse'] and option['indicator'] and self.monthend: self.indicatorcalc_module.dynamic_setzero() - # setting monthly and yearly dindicator to zero at the end of the month (year) \ No newline at end of file + # setting monthly and yearly dindicator to zero at the end of the month (year) diff --git a/src/lisflood/global_modules/default_options.py b/src/lisflood/global_modules/default_options.py index 37c03a4..7126c02 100644 --- a/src/lisflood/global_modules/default_options.py +++ b/src/lisflood/global_modules/default_options.py @@ -127,12 +127,12 @@ 'wateruseRegion', 'indicator'], monthly=True, yearly=False), - 'ChSideEnd': ReportedMap(name='ChSideEnd', output_var='Sideflow1Chan', unit='m', + 'ChSideEnd': ReportedMap(name='ChSideEnd', output_var='Sideflow1Chan', unit='m3/s', end=['repEndMaps'], steps=[], all=[], restrictoption=['SplitRouting'], monthly=False, yearly=False), 'ChSideState': ReportedMap(name='ChSideState', output_var='Sideflow1Chan', - unit='m', end=[], steps=['repStateMaps'], + unit='m3/s', end=[], steps=['repStateMaps'], all=[], restrictoption=['nonInit', 'SplitRouting'], monthly=False, yearly=False), 'ChanCrossSectionEnd': ReportedMap(name='ChanCrossSectionEnd', @@ -208,12 +208,12 @@ 'indicator'], monthly=True, yearly=False), 'CrossSection2End': ReportedMap(name='CrossSection2End', - output_var='CrossSection2Area', unit='m', + output_var='CrossSection2Area', unit='m2', end=['repEndMaps'], steps=[], all=[], restrictoption=['SplitRouting'], monthly=False, yearly=False), 'CrossSection2State': ReportedMap(name='CrossSection2State', - output_var='CrossSection2Area', unit='m', + output_var='CrossSection2Area', unit='m2', end=[], steps=['repStateMaps'], all=[], restrictoption=['nonInit', 'SplitRouting'], monthly=False, yearly=False), @@ -240,7 +240,7 @@ yearly=False), 'CumInterceptionForestMaps': ReportedMap(name='CumInterceptionForestMaps', output_var='CumInterception[1]', - unit='m', end=[], steps=[], + unit='mm', end=[], steps=[], all=['repCumInterCeptionMaps'], restrictoption=['nonInit'], monthly=False, yearly=False), @@ -261,7 +261,7 @@ unit='mm', end=[], steps=['repStateMaps'], all=[], restrictoption=['nonInit'], monthly=False, yearly=False), 'CumInterceptionMaps': ReportedMap(name='CumInterceptionMaps', - output_var='CumInterception[0]', unit='m', + output_var='CumInterception[0]', unit='mm', end=[], steps=[], all=['repCumInterCeptionMaps'], restrictoption=['nonInit'], monthly=False, @@ -791,7 +791,7 @@ restrictoption=[], monthly=False, yearly=False), 'ReservoirFillState': ReportedMap(name='ReservoirFillState', - output_var='ReservoirFill', unit='m', + output_var='ReservoirFill', unit='-', end=[], steps=['repStateMaps'], all=[], restrictoption=['simulateReservoirs'], monthly=False, yearly=False), @@ -1087,7 +1087,7 @@ end=['repEndMaps'], steps=[], all=[], restrictoption=[], monthly=False, yearly=False), - 'UZForestMaps': ReportedMap(name='UZForestMaps', output_var='UZ[1]', unit='m', + 'UZForestMaps': ReportedMap(name='UZForestMaps', output_var='UZ[1]', unit='mm', end=[], steps=[], all=['repUZMaps'], restrictoption=['nonInit'], monthly=False, yearly=False), @@ -1103,7 +1103,7 @@ unit='mm', end=[], steps=['repStateMaps'], all=[], restrictoption=['nonInit'], monthly=False, yearly=False), - 'UZMaps': ReportedMap(name='UZMaps', output_var='UZ[0]', unit='m', end=[], + 'UZMaps': ReportedMap(name='UZMaps', output_var='UZ[0]', unit='mm', end=[], steps=[], all=['repUZMaps'], restrictoption=['nonInit'], monthly=False, yearly=False), 'UZOutflowForestMaps': ReportedMap(name='UZOutflowForestMaps', diff --git a/src/lisflood/hydrological_modules/routing.py b/src/lisflood/hydrological_modules/routing.py index bea92d6..4683437 100644 --- a/src/lisflood/hydrological_modules/routing.py +++ b/src/lisflood/hydrological_modules/routing.py @@ -390,7 +390,7 @@ def initialSecond(self): self.var.Chan2M3Kin = self.var.CrossSection2Area * self.var.ChanLength + self.var.Chan2M3Start self.var.ChanM3Kin = self.var.ChanM3 - self.var.Chan2M3Kin + self.var.Chan2M3Start - self.var.ChanM3Kin = np.where((self.var.ChanM3Kin < 0.0) & (self.var.ChanM3Kin > -0.0000001),0.0,self.var.ChanM3Kin) + self.var.ChanM3Kin = np.where((self.var.ChanM3Kin < 0.0) & (self.var.ChanM3Kin > -0.0000001),0.0,self.var.ChanM3Kin) # this line prevents the warmstart from failing in case of small numerical imprecisions when writing and reading the maps self.var.Chan2QKin = (self.var.Chan2M3Kin * self.var.InvChanLength * self.var.InvChannelAlpha2) ** (self.var.InvBeta) self.var.ChanQKin = (self.var.ChanM3Kin * self.var.InvChanLength * self.var.InvChannelAlpha) ** (self.var.InvBeta)