Changeset 1527 in lmdz_wrf
- Timestamp:
- Apr 18, 2017, 6:06:39 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r1526 r1527 11423 11423 runvdimns.append(vdn) 11424 11424 runvLdims.append(stdims[vdn]) 11425 statsresults = np.zeros(tuple( [Nstats] + runvLdims), dtype=np.float)11425 statsresults = np.zeros(tuple(runvLdims+[Nstats]), dtype=np.float) 11426 11426 if len(runvLdims) == 0: 11427 11427 print warnmsg … … 11496 11496 statsvariable[vn] = [minv, maxv, meanv, mean2v, varv, convals[0]] 11497 11497 if countV is not None: 11498 statsresults[tuple( [slice(0,Nstats)]+list(slicedims))] = [minv, \11498 statsresults[tuple(list(slicedims)+[slice(0,Nstats)])] = [minv, \ 11499 11499 maxv, meanv, mean2v, varv, convals[0]] 11500 11500 else: 11501 statsresults[tuple( [slice(0,Nstats)]+list(slicedims))] = [minv, \11501 statsresults[tuple(list(slicedims)+[slice(0,Nstats)])] = [minv, \ 11502 11502 maxv, meanv, mean2v, varv] 11503 11503 … … 11517 11517 print Sm+'{:<15}'.format(key)+' '+' '.join('{:<15g}'.format(v) for v in vals) 11518 11518 11519 newvar = onewnc.createVariable(Vn + '_stats', 'f4', tuple(['stats'] + \ 11520 runvdimns)) 11519 newvar = onewnc.createVariable(Vn+'_stats', 'f4', tuple(runvdimns+['stats'])) 11521 11520 newvar[:] = statsresults[:] 11522 11521 for attrn in objfield.ncattrs():
Note: See TracChangeset
for help on using the changeset viewer.