-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathET.py
More file actions
47 lines (41 loc) · 1.73 KB
/
Copy pathET.py
File metadata and controls
47 lines (41 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# The Spatial Processes in HYdrology (SPHY) model:
# A spatially distributed hydrological model
# Copyright (C) 2013-2026 FutureWater
# Email: sphy@futurewater.nl
#
# Authors (alphabetical order):
# P. Droogers, J. Eekhout, A. Fernandez-Rodriguez, W. Immerzeel, S. Khanal, A. Lutz, T. Schults, G. Simons, W. Terink.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# -Function to calculate the potential evapotranspiration
def ETpot(etr, kc):
etpot = etr * kc
return etpot
# -Function to calculate the actual evapotranspiration
def ETact(pcr, etpot, rootwater, rootsat, etreddry, rainfrac):
etredwet = pcr.ifthenelse(rootwater >= rootsat, pcr.scalar(0), 1)
etact = pcr.ifthenelse(
rainfrac > 0, pcr.min(etpot * etreddry * etredwet, rootwater), 0
)
return etact
# -Determine plant water stress for calculation of actual evapotranspiration
def ks(self, pcr, etpot):
TAW = self.RootField - self.RootDry
p = pcr.max(pcr.min(self.PMap + 0.04 * (5 - etpot), 0.8), 0.1)
RAW = TAW * p
RootPWS = self.RootField - RAW
Ks = pcr.max(
pcr.min((self.RootWater - self.RootDry) / (RootPWS - self.RootDry), 1), 0
)
return Ks