Changeset 341 in lmdz_wrf
- Timestamp:
- Mar 6, 2015, 12:54:12 PM (10 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing_tools.py
r328 r341 9 9 import os 10 10 from netCDF4 import Dataset as NetCDFFile 11 import nc_var_tools as ncvar 11 12 12 13 errormsg = 'ERROR -- error -- ERROR -- error' … … 1490 1491 1491 1492 potinterval = np.log10(interval) 1492 1493 print 'LLuis minv, maxv:',minv,maxv,'potinterval:',potinterval 1493 1494 Ipotint = int(potinterval) 1494 1495 intvalue = np.float(interval / np.float(Nint)) -
trunk/tools/validation_sim.py
r340 r341 707 707 varNOcheckv = 360.*(1. + theta/(2.*np.pi)) 708 708 709 dimensions = ncobj.variables['U'].dimensions710 shape = ncobj.variables['U'].shape711 712 709 elif varn == 'WRFz': 713 710 grav = 9.81 … … 1272 1269 1273 1270 # Around values 1274 if dims.has_key('Z'):1275 if not onewnc.dimensions.has_key('zaround'):1276 newdim = onewnc.createDimension('zaround',Ngrid*2+1)1277 1278 newvar = onewnc.createVariable(valvars[ivar][0] + 'around', 'f',\1279 ('time','zaround','yaround','xaround'), fill_value=fillValueF)1280 else:1281 newvar = onewnc.createVariable(valvars[ivar][0] + 'around', 'f',\1282 ('time','yaround','xaround'), fill_value=fillValueF)1283 1284 descvar = 'around simulated values +/- grid values: ' + valvars[ivar][0]1285 basicvardef(newvar, varsimobs + 'around', descvar, ovobs.getncattr('units'))1286 newvar[:] = simobsSvalues1271 if not onewnc.variables.has_key(valvars[ivar][0] + 'around'): 1272 if dims.has_key('Z'): 1273 if not onewnc.dimensions.has_key('zaround'): 1274 newdim = onewnc.createDimension('zaround',Ngrid*2+1) 1275 newvar = onewnc.createVariable(valvars[ivar][0] + 'around', 'f', \ 1276 ('time','zaround','yaround','xaround'), fill_value=fillValueF) 1277 else: 1278 newvar = onewnc.createVariable(valvars[ivar][0] + 'around', 'f', \ 1279 ('time','yaround','xaround'), fill_value=fillValueF) 1280 1281 descvar = 'around simulated values +/- grid values: ' + valvars[ivar][0] 1282 basicvardef(newvar, varsimobs + 'around', descvar, ovobs.getncattr('units')) 1283 newvar[:] = simobsSvalues 1287 1284 1288 1285 # Statistics 1289 newvar = onewnc.createVariable(valvars[ivar][0] + 'staround', 'f', \ 1290 ('time','stats'), fill_value=fillValueF) 1291 descvar = 'around simulated statisitcs: ' + valvars[ivar][0] 1292 basicvardef(newvar, varsimobs + 'staround', descvar, ovobs.getncattr('units')) 1293 newvar[:] = aroundstats.transpose() 1294 1295 onewnc.sync() 1286 if not searchInlist(onewnc.variables,valvars[ivar][0]): 1287 newvar = onewnc.createVariable(valvars[ivar][0] + 'staround', 'f', \ 1288 ('time','stats'), fill_value=fillValueF) 1289 descvar = 'around simulated statisitcs: ' + valvars[ivar][0] 1290 basicvardef(newvar, varsimobs + 'staround', descvar, ovobs.getncattr('units')) 1291 newvar[:] = aroundstats.transpose() 1292 1293 onewnc.sync() 1296 1294 1297 1295 newvar = onewnc.createVariable('simtrj','i',('time','simtrj'))
Note: See TracChangeset
for help on using the changeset viewer.