- Timestamp:
- Oct 20, 2016, 5:33:29 PM (8 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r1222 r1224 312 312 Num= number of elements 313 313 >>> list_norepeatcombos(4) 314 [[0 , 1], [0, 2], [0, 3], [1, 2], [1, 3], [2, 3], [0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3], [0, 1, 2, 3]]314 [[0], [1], [2], [3], [0, 1], [0, 2], [0, 3], [1, 2], [1, 3], [2, 3], [0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3], [0, 1, 2, 3]] 315 315 """ 316 316 from math import factorial … … 318 318 319 319 listv = range(Num) 320 # Single values are also combinations! 321 combos = [] 322 for i in range(Num): 323 combos.append([i]) 320 324 321 325 samevals = [] … … 325 329 if searchInlist(samevals,iv): samevals.append(iv) 326 330 327 combos = []328 331 Nlvs = len(listv) 329 332 # Number of possible combinations … … 9750 9753 timestep.sort() 9751 9754 return timestep 9755 print timestep_conform(86400,3600,5) 9752 9756 9753 9757 #quit() -
trunk/tools/model_graphics.py
r1194 r1224 3868 3868 ModI = ModelInf(mod, mod, 'lon', 'lat', 'pres', 'time', 'depth', \ 3869 3869 'lon', 'lat', 'pres', 'time', 'depth', None) 3870 print fname + '; Lluis vn:', vn, 'values0:', values[0], 'values2:', values[2],' values3:', values[3] 3870 3871 VarI = VariableInf(vn, values[0], values[2], values[3]) 3871 3872 usefs = {values[0]: ofileorig}
Note: See TracChangeset
for help on using the changeset viewer.