- Timestamp:
- Feb 26, 2015, 11:15:07 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r308 r309 13479 13479 slicebck, dbck = slice_variable(ovar, tdimn + ':0@'+str(dimt-1)) 13480 13480 13481 print slicefwd[:,15,15] - slicebck[:,15,15]13482 13483 13481 deaccum = np.zeros((varinf.dims), dtype=varinf.dtype) 13484 13482 ddeaccum = [] … … 13498 13496 newvar = onc.createVariable(vn + 'de', varinf.dtype, \ 13499 13497 tuple(varinf.dimns)) 13500 newvar[:] = deaccum13501 13498 else: 13502 devar = onc.variables[vn + 'de'] 13503 devar = deaccum 13499 print warnmsg 13500 print ' ' + fname ": variable '"vn + "de' already exist!!" 13501 print ' replacing values' 13502 newvar = onc.variables[vn + 'de'] 13503 13504 newvar[:] = deaccum 13504 13505 13505 13506 newattr = set_attribute(newvar, 'deaccumulated', 'True')
Note: See TracChangeset
for help on using the changeset viewer.