Changeset 2390 in lmdz_wrf for trunk/tools/diagnostics.py
- Timestamp:
- Mar 11, 2019, 2:42:10 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/diagnostics.py
r2387 r2390 90 90 ####### 91 91 availdiags = ['ACRAINTOT', 'accum', 'clt', 'cllmh', 'convini', 'deaccum', 'fog_K84', \ 92 'fog_RUC', ' LMDZrh', 'mslp', 'OMEGAw', 'RAINTOT', 'range_faces',\93 'rvors', 'td', 'timemax', 'timeoverthres', 'turbulence', ' uavaFROMwswd',\92 'fog_RUC', 'rhs_tas_tds', 'LMDZrh', 'mslp', 'OMEGAw', 'RAINTOT', 'range_faces', \ 93 'rvors', 'td', 'timemax', 'timeoverthres', 'turbulence', 'tws', 'uavaFROMwswd', \ 94 94 'WRFbnds', 'WRFcape_afwa', 'WRFclivi', 'WRFclwvi', 'WRF_denszint', 'WRFgeop', \ 95 95 'WRFmrso', 'WRFmrsos', 'WRFpotevap_orPM', 'WRFp', 'WRFpsl_ecmwf', \ 96 96 'WRFpsl_ptarget', 'WRFrvors', 'WRFslw', 'ws', 'wds', 'wss', 'WRFheight', \ 97 'WRFheightrel', 'WRFtda', 'WRFtdas', 'WRF ua', 'WRFva', 'WRFzwind', 'WRFzwind_log',\98 'WRFzwind MO']97 'WRFheightrel', 'WRFtda', 'WRFtdas', 'WRFtws', 'WRFua', 'WRFva', 'WRFzwind', \ 98 'WRFzwind_log', 'WRFzwindMO'] 99 99 100 100 methods = ['accum', 'deaccum'] … … 516 516 varsadd = [] 517 517 518 Varns = ncobj.variables.keys() 519 Varns.sort() 520 518 521 for idiag in range(Ndiags): 519 522 print ' diagnostic:',diags[idiag] … … 535 538 print ' ' + main + ": file '" + opts.ncfile + \ 536 539 "' does not have variable '" + depv + "' !!" 540 print ' available ones:', Varns 537 541 quit(-1) 538 542 else: … … 544 548 print ' ' + main + ": file '" + opts.ncfile + \ 545 549 "' does not have variable '" + depvars + "' !!" 550 print ' available ones:', Varns 546 551 quit(-1) 547 552 … … 928 933 ncvar.insert_variable(ncobj, 'lat_bnds', cellbndsy, diagoutd, diagoutvd, newnc) 929 934 930 # tws: Bet Wulb temperature following Stull 2011 (tas, hur) 931 elif diagn == 'rws': 932 933 var0 = ncobj.variables[depvars[0]][:] 934 var1 = ncobj.variables[depvars[1]][:] 935 936 diagout, diagoutd, diagoutvd = diag.var_tws_S11(var0,var1,dnames,dvnames) 935 # tws: Bet Wulb temperature following Stull 2011 (tas, hurs) 936 elif diagn == 'tws': 937 938 var0 = ncobj.variables[depvars[0]][:] 939 var1 = ncobj.variables[depvars[1]][:] 940 941 dnamesvar = list(ncobj.variables[depvars[0]].dimensions) 942 dvnamesvar = ncvar.var_dim_dimv(dnamesvar,dnames,dvnames) 943 diagoutd = dnames 944 diagoutvd = ncvar.var_dim_dimv(dnamesvar,dnames,dvnames) 945 946 diagout = diag.var_tws_S11(var0,var1) 937 947 ncvar.insert_variable(ncobj, 'tws', diagout, diagoutd, diagoutvd, newnc) 938 948 … … 1224 1234 ncvar.insert_variable(ncobj, 'hurs', diagout, diagoutd, diagoutvd, newnc) 1225 1235 1236 # rhs (psfc, t, q) from tas, tds 1237 elif diagn == 'rhs_tas_tds': 1238 1239 var0 = ncobj.variables[depvars[0]][:] 1240 var1 = ncobj.variables[depvars[1]][:] 1241 1242 dnamesvar = ncobj.variables[depvars[0]].dimensions 1243 dvnamesvar = ncvar.var_dim_dimv(dnamesvar,dnames,dvnames) 1244 1245 diagout, diagoutd, diagoutvd = diag.var_hur_tas_tds(var0,var1,dnamesvar, \ 1246 dvnamesvar) 1247 1248 ncvar.insert_variable(ncobj, 'hurs', diagout, diagoutd, diagoutvd, newnc) 1249 1226 1250 # slw: total soil liquid water SH2O, DZS 1227 1251 elif diagn == 'WRFslw':
Note: See TracChangeset
for help on using the changeset viewer.