negative theta in pedo transfer function#111
Conversation
| + sr2006_psi_e_c | ||
|
|
||
| theta_33 = max(10.0**-5.0,theta_33) ! For numerical stability | ||
| theta_1500 = max(10.0**-5.0,theta_1500) ! For numerical stability |
There was a problem hiding this comment.
this may cause another issue that log(theta_33) - log(theta_1500) = 0 and then bexp = xx/ 0, leading to floating issue. maybe set different min values for theta_33 and theta_1500 with theta_1500 having a smaller min value to ensure log(theta_33) - log(theta_1500) > 0.
There was a problem hiding this comment.
Yes, you are right. I have updated. Thanks
There was a problem hiding this comment.
What is the typical range of theta_33? Would 1e-3 be too large for the min value of theta_33? Similarly for theta_1500. For example, do we need to make their min values smaller, e.g., min(theta_33) = 1e-5, and min(theta_1500) = 1e-6?
There was a problem hiding this comment.
theta_1500 is the wilting point, and theta_33 is the field capacity.
The general range for the wilting point is 0.01-0.3, and for field capacity, it is 0.05-0.4
1e-5 is very small, with almost no soil moisture condition. If think about the table value for different soil types, the minimum value has 0.006 wilting point and 0.10 field capacity, except for water.
Also, there is another constraint at the end of this code, that use 0.17 and 0.01 for field capacity and wilting point, respectively.
There was a problem hiding this comment.
Thank you for the clarification. This makes sense to me. Your current values look good then.
cenlinhe
left a comment
There was a problem hiding this comment.
This bug fix is to add constraints to the intermediate variables to avoid unreasonable extreme values to occur.
|
@CharlesZheZhang Can you take a look at this PR and approve it? |
CharlesZheZhang
left a comment
There was a problem hiding this comment.
This PR looks good to me. Thanks.
PR to fix this
#110