Hi all,
First, thanks Perry for re-discovering it. This bug was indeed first discovered by David back in 2017 and fixed in v1.0. But somehow during the transition from v1.0 to v1.1, the bug was un-fixed and remained. I'm sorry about that.
Now I've fixed it again, adding notes in the Revision History as well as right above the fixed line, and already committed it to the master version on GitHub. Therefore, both the Dropbox/TGABI/TEMIR/code_v1.1 version and Github master version are fixed and consistent.
This is a serious bug indeed, contributing to an underestimation of phi_sun (slightly) and phi_sha (more seriously) which should lead to an underestimation of GPP. Perhaps the "magical" number for GPP that David has seen now is because of this unfixed bug... Please double-check your code to see if this fix is there or not. Results are only scientifically consistent if this fix is included. Hope this won't affect your major conclusions too much.
Best,