Changeset 2839 in lmdz_wrf for trunk/tools
- Timestamp:
- May 15, 2020, 11:07:24 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/diag_tools.py
r2834 r2839 2274 2274 #print 'es:', es[5,5,5,5], 'ws:', ws[5,5,5,5], 'hur:', hur[5,5,5,5] 2275 2275 2276 2277 # Complementary formula from where? 2278 svp1=611.2 2279 svp2=17.67 2280 svp3=29.65 2281 svpt0=273.15 2282 eps = 0.622 2283 2284 # rh = 1.E2 * (p*q/(q*(1.-eps) + eps))/(svp1*exp(svp2*(t-svpt0)/(T-svp3))) 2285 rh = 1.E2 * (p*q/(q*(1.-eps) + eps))/(svp1*np.exp(svp2*(t-svpt0)/(t-svp3))) 2286 #print 'rh', rh 2287 2276 2288 return hur 2277 2289 … … 2320 2332 tdps = c*gamma/(b-gamma) 2321 2333 hur = 100*expr[b(tdps/(c+tdps)-tas/(c+tas))] 2322 2334 >>> var_hur_tas_tds(10.+273.15, 8.+273.15, None, None) 2335 0.8737387866043359 2323 2336 """ 2324 2337 fname = 'compute_hur_tas_tds' … … 2336 2349 hur = np.exp(b*(tdsC/(c+tdsC)-tasC/(c+tasC))) 2337 2350 2351 Xlv = 2.5e6 2352 Rv = 461.5 2353 2354 rh = np.exp(Xlv/Rv*(1./tas - 1./tds)) * 1.E2 2355 print 'rh', rh 2356 2338 2357 return hur, dnamesvar, dvnamesvar 2339 2358
Note: See TracChangeset
for help on using the changeset viewer.