- Timestamp:
- Apr 8, 2017, 11:00:54 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r1499 r1502 13822 13822 varslice = [] 13823 13823 13824 print 'Lluis sliced:', sliced 13825 13824 13826 # Dictionary with the size of the sliced dimensions 13825 13827 newdimsizes = {} … … 13845 13847 else: 13846 13848 if newdimsize > 0: newdim = onc.createDimension(dnv, newdimsize) 13847 if not gen.searchInlist(onc.dimensions,dnv): 13849 else: 13850 #if not gen.searchInlist(onc.dimensions,dnv): 13851 print ' ' + fname + ": adding not sliced dimension '" + dnv + "'" 13848 13852 # Avoiding monotone dimensions! 13849 if newdimsize > 0: 13850 od = inc.dimensions[dnv] 13851 if od.isunlimited(): 13852 dsize = None 13853 else: 13854 dsize = len(od) 13855 newdim = onc.createDimension(dnv, dsize) 13856 newdimsizes[dnv] = newdimsize 13853 od = inc.dimensions[dnv] 13854 if od.isunlimited(): 13855 dsize = None 13856 dvsize = len(od) 13857 else: 13858 dsize = len(od) 13859 dvsize = len(od) 13860 newdim = onc.createDimension(dnv, dsize) 13861 newdimsizes[dnv] = dvsize 13862 sliced[dnv] = [0, dvsize, 1] 13857 13863 13858 13864 # Getting variable
Note: See TracChangeset
for help on using the changeset viewer.