Spaces:
Runtime error
Runtime error
mohamed.tsouli
commited on
Commit
·
c5bafe6
1
Parent(s):
e7cdd9d
fix Eta calcul
Browse files- compute_yield.py +5 -2
compute_yield.py
CHANGED
@@ -19,7 +19,7 @@ def calculate_ETx(Kc, ETo):
|
|
19 |
ETx = Kc * ETo
|
20 |
return ETx
|
21 |
|
22 |
-
def calculate_ETa(ETx, soil_moisture, field_capacity, wilting_point):
|
23 |
"""
|
24 |
Calculate the actual evapotranspiration (ETa) using the maximum evapotranspiration (ETx), soil moisture, field capacity, and wilting point.
|
25 |
|
@@ -37,7 +37,10 @@ def calculate_ETa(ETx, soil_moisture, field_capacity, wilting_point):
|
|
37 |
elif soil_moisture < wilting_point:
|
38 |
ETa = 0
|
39 |
else:
|
40 |
-
|
|
|
|
|
|
|
41 |
|
42 |
return ETa
|
43 |
|
|
|
19 |
ETx = Kc * ETo
|
20 |
return ETx
|
21 |
|
22 |
+
def calculate_ETa(ETx, soil_moisture, field_capacity, wilting_point, water_deficit):
|
23 |
"""
|
24 |
Calculate the actual evapotranspiration (ETa) using the maximum evapotranspiration (ETx), soil moisture, field capacity, and wilting point.
|
25 |
|
|
|
37 |
elif soil_moisture < wilting_point:
|
38 |
ETa = 0
|
39 |
else:
|
40 |
+
WA = (field_capacity−wilting_point) * root_depth # wter availaible in the root zone
|
41 |
+
root_depth = 0.3
|
42 |
+
Ks = ( WA - water_deficit)/ WA # coef de stress hydrique
|
43 |
+
ETa = ETx * Ks
|
44 |
|
45 |
return ETa
|
46 |
|