Changeset 1583 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 9, 2017, 11:15:58 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r1577 r1583 17998 17998 'WRFrh': for WRF relative humidity 17999 17999 'WRFt': for WRF temperature 18000 'WRFu': for WRF x-wind de-staggered 18001 'WRFv': for WRF y-wind de-staggered 18000 18002 """ 18001 18003 import module_ForInt as fin … … 18035 18037 MODdims = ['Time', 'bottom_top', 'south_north', 'west_east'] 18036 18038 newMODdims = ['Time', 'pres', 'south_north', 'west_east'] 18037 notCHK = ['WRFght', 'WRF t', 'WRFrh']18039 notCHK = ['WRFght', 'WRFrh', 'WRFt', 'WRFu', 'WRFv'] 18038 18040 MODvarrequired = ['P', 'PB', 'PSFC', 'PH', 'PHB', 'HGT', 'T', 'QVAPOR', \ 18039 18041 'XLONG', 'XLAT', 'Times'] … … 18302 18304 isgeop = False 18303 18305 varattrs = gen.variables_values('WRFt') 18306 CFvn = varattrs[0] 18307 newvarattr['standard_name'] = varattrs[1] 18308 newvarattr['long_name'] = varattrs[4].replace('|',' ') 18309 newvarattr['units'] = varattrs[5] 18310 elif vn == 'WRFu': 18311 ovarin = onc.variables['U'] 18312 print infmsg 18313 print ' ' + fname + ': De-staggering x-wind variable !!' 18314 print ' from:', ovarin.shape, 'to', (dimt, dimz, dimy, dimx) 18315 varin = np.zeros((dimt, dimz, dimy, dimx), dtype=np.float64) 18316 varin = 0.5*(ovarin[:,:,:,0:dimx] + ovarin[:,:,:,1:dimx+1]) 18317 isgeop = False 18318 varattrs = gen.variables_values('ua') 18319 CFvn = varattrs[0] 18320 newvarattr['standard_name'] = varattrs[1] 18321 newvarattr['long_name'] = varattrs[4].replace('|',' ') 18322 newvarattr['units'] = varattrs[5] 18323 elif vn == 'WRFv': 18324 ovarin = onc.variables['V'] 18325 print infmsg 18326 print ' ' + fname + ': De-staggering y-wind variable !!' 18327 print ' from:', ovarin.shape, 'to', (dimt, dimz, dimy, dimx) 18328 varin = np.zeros((dimt, dimz, dimy, dimx), dtype=np.float64) 18329 varin = 0.5*(ovarin[:,:,0:dimy,:] + ovarin[:,:,1:dimy+1,:]) 18330 isgeop = False 18331 varattrs = gen.variables_values('va') 18304 18332 CFvn = varattrs[0] 18305 18333 newvarattr['standard_name'] = varattrs[1]
Note: See TracChangeset
for help on using the changeset viewer.