Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Applies the virtual temperature correction to a pressure (in mb) , temperature and dew point (in Kelvin)
- def virtualtempcorr(p,t,td):
- eps=0.608
- tv=t*(1+eps*w_s(p,td))
- return tv
- #Takes a single pressure and temperature (in Kelvin) measurement and computes the (saturation) mixing ratio
- def w_s(p,t):
- e_s=6.1121*math.exp(17.502*(t-273.15)/(t+240.97-273.15))
- w_s=0.622*e_s/(p-e_s)
- return w_s
Add Comment
Please, Sign In to add comment