I have a question about the calculation of root zone water contents used to compute irrigation demand. Sorry if it’s difficult to follow – bear with me!
Variables ws1/2/3, wres1/2/3 are calculated in source_py3/hydrological_modules/landcoverType.py lines 218-224 by multiplying the corresponding volumetric water content, denoted by thetas and thetar respectively, by the depth of each soil layer (rootDepth[0/1/2]), so that the resulting quantity is a depth (e.g. if rootDepth is 0.05m and thetas1 is 0.5, ws1 will equal 0.025m). Variables wrange1/2/3, wfc1/2/3, wwp1/2/3 are computed from ws1/2/3 and wres1/2/3 and hence are also depths which must be some quantity less than the corresponding soil layer depth.
When irrigation demand is computed, in source_py3/hydrological_modules/waterdemand.py lines 300-365, availWaterPlant1/2 is computed as max(0, w1 – wwp1) * rootDepth and max(0, w2 – wwp2) * rootDepth. Variables critWaterPlant1/2 and totAvlWater1/2 are also scaled by multipling by rootDepth[1/2]. So far as I can see (and of course I could be missing something), this means that these variables have dimensions of L^2, when they should have dimensions of L. If I’m right, the values for readAvlWater, totAvlWater and critAvlWater will be incorrect because they have been scaled by rootDepth twice.
As I say, I may well have missed something here, and the units of w/wwp,wfc etc. may not be depths - apologies if this is the case.
It seems that you’re probably quite right, and that there is a double scaling of rootDepth!
A first thought is that it should be instead scaled by rootFrac, since it developed just beforehand but not applied.
I’ll work on this early next week and come back to you.