本文整理汇总了Python中JarvisCoefficients.calcEu方法的典型用法代码示例。如果您正苦于以下问题:Python JarvisCoefficients.calcEu方法的具体用法?Python JarvisCoefficients.calcEu怎么用?Python JarvisCoefficients.calcEu使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JarvisCoefficients
的用法示例。
在下文中一共展示了JarvisCoefficients.calcEu方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: agriZone_Jarvis
# 需要导入模块: import JarvisCoefficients [as 别名]
# 或者: from JarvisCoefficients import calcEu [as 别名]
def agriZone_Jarvis(self,k):
"""
- Potential evaporation is decreased by energy used for interception evaporation
- Formula for evaporation based on Jarvis stress functions
- Outgoing fluxes are determined based on (value in previous timestep + inflow)
and if this leads to negative storage, the outgoing fluxes are corrected to rato --> Eu is
no longer taken into account for this correction
- Qa u is determined from overflow from Sa
- Code for ini-file: 1
"""
self.Qa = max(self.Pe - (self.samax[k] - self.Sa_t[k]),0)
self.Sa[k] = self.Sa_t[k] + (self.Pe - self.Qa)
self.SaN = self.Sa[k] / self.samax[k]
self.SuN = self.Su[k] / self.sumax[k]
JarvisCoefficients.calcEu(self,k,1) #calculation of Ea based on Jarvis stress functions
self.Ea1 = self.Eu
# if self.teller == 45:
# pdb.set_trace()
self.Fa1 = self.Fmin[k] + (self.Fmax[k] - self.Fmin[k]) * e ** (-self.decF[k] * self.SuN)
self.Sa[k] = self.Sa_t[k] + (self.Pe - self.Qa) - self.Fa1 - self.Ea1
self.Sa_diff = ifthenelse(self.Sa[k] < 0, self.Sa[k], 0)
self.Fa = self.Fa1 + (self.Fa1/ifthenelse(self.Fa1 + self.Ea1 > 0 , self.Fa1 + self.Ea1 , 1)) * self.Sa_diff
self.Ea = self.Ea1 + (self.Ea1/ifthenelse(self.Fa1 + self.Ea1 > 0 , self.Fa1 + self.Ea1 , 1)) * self.Sa_diff
self.Sa[k] = self.Sa_t[k] + (self.Pe - self.Qa) - self.Ea - self.Fa
self.Sa[k] = ifthenelse(self.Sa[k] < 0, 0 , self.Sa[k])
self.Sa_diff2 = ifthen(self.Sa[k] < 0, self.Sa[k])
self.wbSa_[k] = self.Pe - self.Ea - self.Qa - self.Fa - self.Sa[k] + self.Sa_t[k]
self.Ea_[k] = self.Ea
self.Qa_[k] = self.Qa
self.Fa_[k] = self.Fa
示例2: unsatZone_forAgri_Jarvis_cropG
# 需要导入模块: import JarvisCoefficients [as 别名]
# 或者: from JarvisCoefficients import calcEu [as 别名]
def unsatZone_forAgri_Jarvis_cropG(self,k):
"""
- Potential evaporation is decreased by energy used for interception evaporation
- Formula for evaporation based on Jarvis stress functions
- Outgoing fluxes are determined based on (value in previous timestep + inflow)
and if this leads to negative storage, the outgoing fluxes are corrected to rato --> Eu is
no longer taken into account for this correction
- Qu is determined with a beta function (same as in HBV?)
- inflow is infiltration from agriculture reservoir
- Code for ini-file: 18
"""
self.cropG_scal = pcr2numpy(self.cropG,NaN)
if any(self.cropG_scal == 1):
self.sumax2 = self.sumax[k]
else:
self.sumax2 = self.sumax[k] * self.redsu[k]
self.Su[k] = ifthenelse(self.Su_t[k] + self.Fa > self.sumax2, self.sumax2, self.Su_t[k] + self.Fa)
self.Quadd = ifthenelse(self.Su_t[k] + self.Fa > self.sumax2, self.Su_t[k] + self.Fa - self.sumax2, 0)
self.SuN = self.Su[k] / self.sumax2
self.SiN = self.Si[k] / self.imax[k]
JarvisCoefficients.calcEu(self,k,2) #calculation of Eu based on Jarvis stress functions
self.Eu1 = self.Eu
self.Qu1 = (self.Fa - self.Quadd) * (1 - (1 - self.SuN) ** self.beta[k])
self.Perc1 = self.perc[k] * self.SuN
self.Su[k] = self.Su_t[k] + (self.Fa - self.Quadd) - self.Qu1 - self.Eu - self.Perc1
self.Su_diff = ifthenelse(self.Su[k] < 0, self.Su[k], 0)
self.Eu = self.Eu1 + (self.Eu1 / ifthenelse(self.Qu1 + self.Eu1 + self.Perc1 > 0 , self.Qu1 + self.Eu1 + self.Perc1 , 1)) * self.Su_diff
self.Qu = self.Qu1 + (self.Qu1 / ifthenelse(self.Qu1 + self.Eu1 + self.Perc1 > 0 , self.Qu1 + self.Eu1 + self.Perc1 , 1)) * self.Su_diff
self.Perc = ifthenelse (self.Perc1 > 0, self.Perc1 + (self.Perc1 / ifthenelse(self.Qu1 + self.Eu1 + self.Perc1 > 0 , self.Qu1 + self.Eu1 + self.Perc1 , 1)) * self.Su_diff, self.Perc1)
self.Su[k] = self.Su_t[k] + (self.Fa - self.Quadd) - self.Eu - self.Qu - self.Perc
self.Su[k] = ifthenelse(self.Su[k] < 0, 0 , self.Su[k])
self.Su_diff2 = ifthen(self.Su[k] < 0, self.Su[k])
self.Cap = min(self.cap[k] * (1 - self.Su[k] / self.sumax2), self.Ss)
self.Su[k] = self.Su[k] + self.Cap
self.wbSu_[k] = self.Fa - self.Eu - self.Qu - self.Quadd - self.Perc + self. Cap - self.Su[k] + self.Su_t[k]
self.Eu_[k] = self.Eu
self.Qu_[k] = self.Qu + self.Quadd
self.Cap_[k] = self.Cap
self.Perc_[k] = self.Perc
示例3: unsatZone_withAgri_Jarvis
# 需要导入模块: import JarvisCoefficients [as 别名]
# 或者: from JarvisCoefficients import calcEu [as 别名]
def unsatZone_withAgri_Jarvis(self,k):
"""
- Potential evaporation is calculated with formula in 'JarvisCoefficients', but without
using the Jarvis stress functions
- Potential evaporation is decreased by energy used for interception evaporation
- Formula for evaporation linear until LP, from than with potential rate
- Outgoing fluxes are determined based on (value in previous timestep + inflow)
and if this leads to negative storage, the outgoing fluxes are corrected to rato
- Qu is determined with a beta function (same as in HBV?)
- Code for ini-file: 15
"""
self.Sa[k] = ifthenelse(self.Sa_t[k] + self.Pe > self.samax[k], self.samax[k], self.Sa_t[k] + self.Pe)
self.Qaadd = ifthenelse(self.Sa_t[k] + self.Pe > self.samax[k], self.Sa_t[k] + self.Pe - self.samax[k], 0)
self.SaN = self.Sa[k] / self.samax[k]
JarvisCoefficients.calcEu(self,k,1) #calculation of Eu based on Jarvis stress functions
self.Ea = self.Eu
self.Qa1 = (self.Pe - self.Qaadd) * (1 - (1 - self.SaN) ** self.beta[k])
self.Fa1 = self.famax[k] * (self.sumax[k] - self.Su[k]) / self.sumax[k]
self.Sa[k] = self.Sa_t[k] + (self.Pe - self.Qaadd) - self.Qa1 - self.Ea - self.Fa1
self.Sa_diff = ifthenelse(self.Sa[k] < 0, self.Sa[k], 0)
self.Qa = self.Qa1 + (self.Qa1/ifthenelse(self.Qa1 + self.Fa1 > 0 , self.Qa1 + self.Fa1 , 1)) * self.Sa_diff
self.Fa = ifthenelse (self.Fa1 > 0, self.Fa1 + (self.Fa1/ifthenelse(self.Qa1 + self.Fa1 > 0 , self.Qa1 + self.Fa1 , 1)) * self.Sa_diff, self.Fa1)
self.Sa[k] = self.Sa_t[k] + (self.Pe - self.Qaadd) - self.Ea - self.Qa - self.Fa
self.Sa[k] = ifthenelse(self.Sa[k] < 0, 0 , self.Sa[k])
self.Sa_diff2 = ifthen(self.Sa[k] < 0, self.Sa[k])
self.Capa = min(self.cap[k] * (1 - self.Sa[k] / self.samax[k]), self.Su[k])
self.Sa[k] = self.Sa[k] + self.Capa
self.Su[k] = self.Su_t[k] + self.Fa - self.Capa
self.Perc = self.perc[k] * (self.Su[k] / self.sumax[k])
self.Su[k] = self.Su[k] - self.Perc
self.wbSa_[k] = self.Pe - self.Ea - self.Qa - self.Qaadd - self.Fa + self. Capa - self.Sa[k] + self.Sa_t[k]
self.wbSu_[k] = self.Fa - self.Perc - self. Capa - self.Su[k] + self.Su_t[k]
self.Eu_[k] = self.Ea
self.Qu_[k] = self.Qa + self.Qaadd
self.Fa_[k] = self.Fa
self.Cap_[k] = self.Cap
self.Perc_[k] = self.Perc
示例4: unsatZone_LP_beta_Jarvis
# 需要导入模块: import JarvisCoefficients [as 别名]
# 或者: from JarvisCoefficients import calcEu [as 别名]
def unsatZone_LP_beta_Jarvis(self,k):
"""
- Potential evaporation is decreased by energy used for interception evaporation
- Formula for evaporation based on Jarvis stress functions
- Outgoing fluxes are determined based on (value in previous timestep + inflow)
and if this leads to negative storage, the outgoing fluxes are corrected to rato --> Eu is
no longer taken into account for this correction
- Qu is determined with a beta function (same as in HBV?)
- Code for ini-file: 12
"""
self.Su[k] = ifthenelse(self.Su_t[k] + self.Pe > self.sumax[k], self.sumax[k], self.Su_t[k] + self.Pe)
self.Quadd = ifthenelse(self.Su_t[k] + self.Pe > self.sumax[k], self.Su_t[k] + self.Pe - self.sumax[k], 0)
self.SuN = self.Su[k] / self.sumax[k]
self.SiN = self.Si[k] / self.imax[k]
JarvisCoefficients.calcEu(self,k,1) #calculation of Eu based on Jarvis stress functions
self.Qu1 = (self.Pe - self.Quadd) * (1 - (1 - self.SuN) ** self.beta[k])
self.Perc1 = self.perc[k] * self.SuN
self.Su[k] = self.Su_t[k] + (self.Pe - self.Quadd) - self.Qu1 - self.Eu - self.Perc1
self.Su_diff = ifthenelse(self.Su[k] < 0, self.Su[k], 0)
self.Qu = self.Qu1 + (self.Qu1/ifthenelse(self.Qu1 + self.Perc1 > 0 , self.Qu1 + self.Perc1 , 1)) * self.Su_diff
self.Perc = ifthenelse (self.Perc1 > 0, self.Perc1 + (self.Perc1/ifthenelse(self.Qu1 + self.Perc1 > 0 , self.Qu1 + self.Perc1 , 1)) * self.Su_diff, self.Perc1)
self.Su[k] = self.Su_t[k] + (self.Pe - self.Quadd) - self.Eu - self.Qu - self.Perc
self.Su[k] = ifthenelse(self.Su[k] < 0, 0 , self.Su[k])
self.Su_diff2 = ifthen(self.Su[k] < 0, self.Su[k])
self.Cap = min(self.cap[k] * (1 - self.Su[k] / self.sumax[k]), self.Ss)
self.Su[k] = self.Su[k] + self.Cap
self.wbSu_[k] = self.Pe - self.Eu - self.Qu - self.Quadd - self.Perc + self. Cap - self.Su[k] + self.Su_t[k]
self.Eu_[k] = self.Eu
self.Qu_[k] = self.Qu + self.Quadd
self.Cap_[k] = self.Cap
self.Perc_[k] = self.Perc