Changeset 2785 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Jan 14, 2020, 2:35:38 PM (5 years ago)
Author:
lfita
Message:

Adding a better printing and all the options in `stations_values'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic.py

    r2784 r2785  
    474474
    475475elif oper == 'stations_values':
    476     Nvals = 3
     476    Nvals = 5
    477477    vals = opts.values.split(cS)
    478478    if vals[0] == 'h':
     
    486486            print gen.stations_values.__doc__
    487487            quit(-1)
    488         result = gen.stations_values(vals[0], vals[1], vals[2])
    489         print gen.numVector_String(result,':')
    490         print ':'.join(result)
     488        result = gen.stations_values(vals[0], vals[1], vals[2], vals[3], vals[4])
     489        if type(result) == type({0: 'zero'}):
     490            keys = list(result.keys())
     491            for kv in keys:
     492                vals = result[kv]
     493                print '##'+str(kv)+'## ' + gen.numVector_String(vals,':')
     494        else:
     495            print gen.numVector_String(result,':')
    491496
    492497elif oper == 'table_tex_file':
Note: See TracChangeset for help on using the changeset viewer.