Guest User

Untitled

a guest
Oct 21st, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #Applies the virtual temperature correction to a pressure (in mb) , temperature and dew point (in Kelvin)
  2. def virtualtempcorr(p,t,td):
  3.  
  4. eps=0.608
  5. tv=t*(1+eps*w_s(p,td))
  6. return tv
  7. #Takes a single pressure and temperature (in Kelvin) measurement and computes the (saturation) mixing ratio
  8. def w_s(p,t):
  9.  
  10.  
  11. e_s=6.1121*math.exp(17.502*(t-273.15)/(t+240.97-273.15))
  12. w_s=0.622*e_s/(p-e_s)
  13. return w_s
Add Comment
Please, Sign In to add comment