Skip to content

Instantly share code, notes, and snippets.

@TJC
Last active February 8, 2019 06:15
Show Gist options
  • Save TJC/48b533508924b1729d7b2615f17c04bd to your computer and use it in GitHub Desktop.
Save TJC/48b533508924b1729d7b2615f17c04bd to your computer and use it in GitHub Desktop.
apparent temperature equation
// rh = relative humidity, in range from 0.0 to 1.0
// t = temperature (celcius), typically in range from -10 to 50
// v = wind speed (m/s)
def vp(rh: Double, t: Double) = rh * 6.105 * Math.exp( (17.27 * t) / (237.7 + t))
def at(t: Double, rh: Double, v: Double) = t + (0.33 * vp(rh, t)) - (0.7 * v) - 4.00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment