mdljts/wbgt

Zero value not properly set?

Opened this issue · 0 comments

Hi thanks for sharing this. I was wondering how best to test the code.
I made a few tests by using your test values with slight modifications (I use it in python using rpy2), so further wrapping around):

def get_wbgt(month=1, day=2, hour=12, lon=-120, lat=46.2, T=12, gmt=-8):
    return np.asarray(wbgt.wbgt(2015, month, day, hour, 4, gmt, 15, lat, lon, 1000 , 1017.8, T, 45, 1.24, 2.1, -0.1, 0).rx2['Twbg'])

image
image

It appears that the zero "night" value is not properly set.
I was also wondering is there was a simple formula to get the local time regardless of lon/lat/day of year. Imagine for example, you'd want to calculate the local WBGT temperature at mid-day (or mid-night !). I couldn't figure it out.