Changeset 2030 in lmdz_wrf


Ignore:
Timestamp:
Aug 6, 2018, 4:43:32 PM (7 years ago)
Author:
lfita
Message:

Fixing..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r2029 r2030  
    1364813648
    1364913649    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)
    1365013656        return listv[int(values)]
    1365113657    elif oper == 'maxloc':
     
    1370113707        elif sign < 0.:
    1370213708            for iloc in range(Nval-1):
    13703                 if listv[iloc+1] >= val and listv[iloc] < val: return iloc
     13709                if listv[iloc+1] <= val and listv[iloc] > val: return iloc
    1370413710            return Nval
    1370513711
Note: See TracChangeset for help on using the changeset viewer.