kthorp / pyfao56

A Python implementation of the FAO-56 dual crop coefficient approach for crop water use estimation and irrigation scheduling
Other
43 stars 24 forks source link

Adding the Aquacrop Ks Calculation #35

Closed tpokoski closed 10 months ago

tpokoski commented 10 months ago

Addition of a new input parameter (aq_ks) to model.py to allow the user to choose between using a Linear Ks equation provided by FAO-56 Equation 84, or the Aquacrop Curvilinear Ks Equation.

By having this be an optional input parameter, it allows for backwards compatibility and is an easy boolean input for the user to choose.

kthorp commented 10 months ago

Questions... Isn't the variable rSWD equivalent to io.fDr? Can we use io.fDr? I'm wondering what happens to Drel when the p is variable. Is it OK or weird?

@isukendall @tpokoski

isukendall commented 10 months ago

Yes, rSWD = io.fDr, however the variables and equations have been defined that way specifically for each method, so I don't think we should ignore the method or variable names used in either method. That leaves two options IMO:

1) Leave the code as-is, so that users would be able to read the code and be familiar with the variable names and equations. 2) Replace rSWD with io.fDR, and make a comment indicating that rSWD is an equivalent term often used in definitions of the Ks AquaCrop equation.

Regarding, what happens to Drel when p is the variable, I compared time series of Drel in limited and full plots below. Vp is variable p, Cp is constant p. You can see Drel generally has more scatter with variable p, which is to be expected. This is more pronounced earlier in the season it seems, which I suppose also makes sense since your operating range of RAW is lower, so you probably are in that fringe more often. Is this what you mean by "weird"? Does this change anything on the PR?

@.**@.

Kendall DeJonge Agricultural Engineer USDA-ARS

From: Kelly Thorp @.> Sent: Tuesday, October 31, 2023 12:37 PM To: kthorp/pyfao56 @.> Cc: DeJonge, Kendall - REE-ARS @.>; Mention @.> Subject: Re: [kthorp/pyfao56] Adding the Aquacrop Ks Calculation (PR #35)

Questions... Isn't the variable rSWD equivalent to io.fDr? Can we use io.fDr? I'm wondering what happens to Drel when the p is variable. Is it OK or weird?

@isukendallhttps://github.com/isukendall @tpokoskihttps://github.com/tpokoski

- Reply to this email directly, view it on GitHubhttps://github.com/kthorp/pyfao56/pull/35#issuecomment-1787779288, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACL2P2ESZXRUBKX6SM3SVQDYCFAOBAVCNFSM6AAAAAA6X3UWWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBXG43TSMRYHA. You are receiving this because you were mentioned.Message ID: @.**@.>>

This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.

kthorp commented 10 months ago

OK...if variables (i.e., rSWD) are as they are discussed in AquaCrop, let's leave them as is. If you're happy with the behavior of Drel with variable p, I'm fine with it. By "weird" I just meant the behavior of Drel with variable p.

I will push some edits to this PR to develop. No functional changes...just tidying up comments and coding style.