sharppy / SHARPpy

Sounding/Hodograph Analysis and Research Program in Python
https://sharppy.github.io/SHARPpy/index.html
Other
216 stars 112 forks source link

Fixed error in LHP #249

Open collin-volk opened 1 year ago

collin-volk commented 1 year ago

Fix for issues #220 and #248. Modified the lhp calculation to set lhp to 0 if both term A and B are negative, and also set lhp to be 0 if it is still negative after adding 5, which is consistent with the following from Johnson and Sugden (2014):

Additionally, if Term A and B are both negative the LHP is set to zero to avoid creating a positive value by multiplying two negative terms. Finally, if values are still not above zero after the previous addition term, all negative values of the LHP are set to zero.