Changeset 2030 in lmdz_wrf
- Timestamp:
- Aug 6, 2018, 4:43:32 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r2029 r2030 13648 13648 13649 13649 if oper == 'getvalue': 13650 Nvals = len(listv) 13651 if int(values) > Nvals-1: 13652 print errormsg 13653 print ' ' + fname + ': index:', int(values), 'larger than values in ' + \ 13654 'list:', Nvals, '!!' 13655 quit(-1) 13650 13656 return listv[int(values)] 13651 13657 elif oper == 'maxloc': … … 13701 13707 elif sign < 0.: 13702 13708 for iloc in range(Nval-1): 13703 if listv[iloc+1] >= val and listv[iloc] <val: return iloc13709 if listv[iloc+1] <= val and listv[iloc] > val: return iloc 13704 13710 return Nval 13705 13711
Note: See TracChangeset
for help on using the changeset viewer.