Changeset 2834 in lmdz_wrf
- Timestamp:
- Apr 29, 2020, 7:23:56 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/diag_tools.py
r2766 r2834 2246 2246 [q] = mixing ratio in [kgkg-1] 2247 2247 ref.: M. G. Lawrence, BAMS, 2005, 225 2248 >>> print var_rh(101300., 290., 3.)2248 >>> var_hur(101300., 290., 0.003) 2249 2249 0.250250256174 2250 >>> var_hur(100000., 284.8892, 0.004031838) 2251 0.464525998553 2250 2252 """ 2251 2253 fname = 'var_hur' … … 2260 2262 #es = 6.11*np.exp(L/Rv*(1.-273./t)/273.) 2261 2263 2264 tC = t - 273.15 2262 2265 # August - Roche - Magnus formula 2263 es = 6.1094*np.exp(17.625* (t-273.15)/((t-273.15)+243.04))2266 es = 6.1094*np.exp(17.625*tC/(tC+243.04)) 2264 2267 2265 2268 # Saturated mixing ratio [g/kg] 2266 ws = 0.622*es/( 0.01*p-es)2267 2268 hur = q/ (ws*1000.)2269 ws = 0.622*es/(p/100.-es) 2270 2271 hur = q/ws 2269 2272 2270 2273 #print 'q:', q[5,5,5,5], 't:', t[5,5,5,5], 'p:', p[5,5,5,5]
Note: See TracChangeset
for help on using the changeset viewer.