def execute(windSpeed, windDir, accum_windSpeed24, accum_windDir24): U0 = U.calculate(windSpeed, windDir) V0 = V.calculate(windSpeed, windDir) U24 = U.calculate(accum_windSpeed24, accum_windDir24) V24 = V.calculate(accum_windSpeed24, accum_windDir24) DU = U0 - U24 DV = V0 - V24 wSp = hypot(DU,DV) return wSp
def execute(windSpeed, windDir, accum_windSpeed24, accum_windDir24): U0 = U.calculate(windSpeed, windDir) V0 = V.calculate(windSpeed, windDir) U24 = U.calculate(accum_windSpeed24, accum_windDir24) V24 = V.calculate(accum_windSpeed24, accum_windDir24) DU = U0 - U24 DV = V0 - V24 WD = 57.2957 * arctan2(-DU,-DV) WD = numpy.where(WD < 0, WD + 360, WD) return WD