Changeset 1754 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Dec 21, 2017, 10:00:24 PM (8 years ago)
Author:
lfita
Message:

Improving 'getting_fixedline'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r1753 r1754  
    1256712567    fname = 'getting_fixedline'
    1256812568
     12569    if len(cuts) + 1 != len(types):
     12570        print errormsg
     12571        print '  ' + fname + ': The number of types :', len(types), 'must be +1',    \
     12572          'number of cuts:', len(cuts)
     12573        quit(-1)
     12574
    1256912575    values = []
    1257012576    val = line[0:cuts[0]+1]
     
    1258112587    for ic in range(1,Ncuts):
    1258212588        val = line[cuts[ic-1]:cuts[ic]+1]
    12583         print 'Lluis val:', val
    1258412589        if len(val.replace(' ','')) >= 1:
    1258512590            values.append(typemod(val, types[ic]))
     
    1259512600    val = line[cuts[Ncuts-1]:Lline]
    1259612601    if len(val.replace(' ','')) >= 1:
    12597         values.append(typemod(val, types[Ncuts-1]))
     12602        values.append(typemod(val, types[Ncuts]))
    1259812603    else:
    1259912604        if types[0] == 'I': values.append(fillValueI)
Note: See TracChangeset for help on using the changeset viewer.