Changeset 1942 in lmdz_wrf for trunk/tools
- Timestamp:
- Jul 17, 2018, 9:50:29 PM (7 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/diagnostics.inf
r1927 r1942 36 36 slw, WRFslw, SH2O@DZS 37 37 ta, WRFt, T@P@PB 38 td, WRFtd, WRFp@WRFt 2@QVAPOR38 td, WRFtd, WRFp@WRFt@QVAPOR 39 39 tds, TStd, psfc@t@q 40 40 tds, WRFtds, PSFC@T2@Q2 -
trunk/tools/diagnostics.py
r1927 r1942 57 57 import datetime as dtime 58 58 import module_ForDiag as fdin 59 import module_ForDef as fdef 59 60 import diag_tools as diag 60 61 … … 89 90 'WRFmrso', 'WRFpotevap_orPM', 'WRFp', 'WRFpsl_ecmwf', \ 90 91 'WRFpsl_ptarget', 'WRFrvors', 'WRFslw', 'ws', 'wds', 'wss', 'WRFheight', \ 91 'WRFheightrel', 'WRFua', 'WRFva', 'WRFzwind', 'WRFzwind_log', 'WRFzwindMO'] 92 'WRFheightrel', 'WRFtda', 'WRFua', 'WRFva', 'WRFzwind', 'WRFzwind_log', \ 93 'WRFzwindMO'] 92 94 93 95 methods = ['accum', 'deaccum'] … … 1204 1206 ncvar.insert_variable(ncobj, 'ta', WRFt, dnames, diagoutvd, newnc) 1205 1207 1208 # WRFtda (WRFrh, WRFt) 1209 elif diagn == 'WRFtda': 1210 ARM2 = fdef.module_definitions.arm2 1211 ARM3 = fdef.module_definitions.arm3 1212 1213 gammatarh = np.log(WRFrh) + ARM2*(WRFt-273.15)/((WRFt-273.15)+ARM3) 1214 td = ARM3*gammatarh/(ARM2-gammatarh) + 273.15 1215 1216 dnamesvar = list(ncobj.variables['T'].dimensions) 1217 dvnamesvar = ncvar.var_dim_dimv(dnamesvar,dnames,dvnames) 1218 1219 # Removing the nonChecking variable-dimensions from the initial list 1220 varsadd = [] 1221 diagoutvd = list(dvnames) 1222 for nonvd in NONchkvardims: 1223 if gen.searchInlist(dvnames,nonvd): diagoutvd.remove(nonvd) 1224 varsadd.append(nonvd) 1225 1226 ncvar.insert_variable(ncobj, 'tda', td, dnames, diagoutvd, newnc) 1227 1206 1228 # WRFua (U, V, SINALPHA, COSALPHA) to be rotated !! 1207 1229 elif diagn == 'WRFua': … … 1464 1486 # where not in the original file 1465 1487 for vadd in varsadd: 1466 if not gen.searchInlist(newnc.variables.keys(),vadd): 1488 if not gen.searchInlist(newnc.variables.keys(),vadd) and \ 1489 dictcompvars.has_key(vadd): 1467 1490 attrs = dictcompvars[vadd] 1468 1491 vvn = attrs['name']
Note: See TracChangeset
for help on using the changeset viewer.