Changeset 487 in lmdz_wrf
- Timestamp:
- Jun 12, 2015, 12:20:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r484 r487 1396 1396 Nnewdims = len(newdims) 1397 1397 1398 if Nnewdims == 1: 1398 if Nnewdims == 0: 1399 print '%2s %f' % ( 'NC',newvar ) 1400 elif Nnewdims == 1: 1399 1401 for i in range(newvar.shape[0]): 1400 1402 print '%2s %f' % ( 'NC',newvar[i] ) … … 12300 12302 endfrac = int(dimcutv.split('@')[1]) 12301 12303 varvalsdim.append(slice(inifrac,endfrac)) 12304 if endfrac > varobj.shape[idd]: 12305 print errormsg 12306 print ' ' + fname + ": value for dimension '" + \ 12307 dimcutn + "' is too big (", endfrac, '>', \ 12308 varobj.shape[idd],'[dimension length] ) !!' 12309 quit(-1) 12302 12310 dimnslice.append(vardims[idd]) 12303 12311 else: … … 12308 12316 varvalsdim.append(int(varobj.shape[idd])-1) 12309 12317 else: 12318 if int(dimcutv) >= varobj.shape[idd]: 12319 print errormsg 12320 print ' ' + fname + ": value for dimension '" + \ 12321 dimcutn + "' is too big (", int(dimcutv), '>', \ 12322 varobj.shape[idd],'[dimension length] ) !!' 12323 quit(-1) 12310 12324 varvalsdim.append(int(dimcutv)) 12311 12325 found = True
Note: See TracChangeset
for help on using the changeset viewer.