Skip to content

Commit 805d38b

Browse files
Update GDD CDC equations in SwitchGDD block
1 parent 46e25fe commit 805d38b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aquacrop/initialize/compute_crop_calendar.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,15 @@ def compute_crop_calendar(
171171
if tCD <= 0:
172172
tCD = 1
173173

174-
CCi = crop.CCx * (1 - 0.05 * (np.exp((crop.CDC_CD / crop.CCx) * tCD) - 1))
174+
CCi = crop.CCx * (1 - 0.05 * (np.exp(((3.33 * crop.CDC_CD) / (crop.CCx + 2.29)) * tCD) - 1))
175175
if CCi < 0:
176176
CCi = 0
177177

178178
tGDD = crop.Maturity - crop.Senescence
179179
if tGDD <= 0:
180180
tGDD = 5
181181

182-
crop.CDC = (crop.CCx / tGDD) * np.log(1 + ((1 - CCi / crop.CCx) / 0.05))
182+
crop.CDC = ((crop.CCx + 2.29) * np.log((((CCi/crop.CCx) - 1) / -0.05) + 1)) / (3.33 * tGDD)
183183
# Set calendar type to gdd mode
184184
crop.CalendarType = 2
185185

0 commit comments

Comments
 (0)