Error in snow.loss_townsend with respect to gamma quantity? #1716
Replies: 3 comments 5 replies
-
As published that equation is equivalent to so the pvlib code is what was published. I agree; the bracket placement can be a bit challenging. There's a derivation of the denominator (mass of snow dissipated) in this comment, so I think the code represents the paper author's intent. |
Beta Was this translation helpful? Give feedback.
-
Can you elaborate on the results you expected to see? |
Beta Was this translation helpful? Give feedback.
-
I came here looking for the same thing - thanks @smmeredith for confirming I'm not crazy. The formula does imply that the tan() term is in the denominator! |
Beta Was this translation helpful? Give feedback.
-
I'm testing the snow.loss_townsend function, and I noticed it was giving me different results than what I expected.
After looking through the code, it seems the major reason is due to how gamma is calculated.
In the pvlib function, the quantity tand(angle_of_repose) is in the numerator of the quotient. In the Townsend paper, the formula is given as gamma = [R*Se’cos(tilt)]/[(H2 – Se’2)/2tan(P)], which makes the same quantity a denominator.
It's a little ambiguous since the equation is poorly formatted in the original publication I'm referencing, but still seems to imply that this tangent should be in the denominator.
Can the function author confirm that this is an error?
Beta Was this translation helpful? Give feedback.
All reactions