Changeset 2750 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Nov 12, 2019, 1:18:23 PM (6 years ago)
Author:
lfita
Message:

Adding:

  • `stations_values'
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/tools/generic.py

    r2706 r2750  
    4242# squared_radial: Function to provide the series of radii as composite of pairs (x,y) of gid cells
    4343#   Npt= largest amount of grid points on x and y directions
     44# stations_values: Function to provide information from a given station from one of its values
     45#   from ASCII file 'OBStations.csv'
    4446# table_tex_file: Function to write into a file a LaTeX tabular from a table of values
    4547# unitsDate: Function to know how many units of time are from a given pair of dates
     
    6264  'radial_points', 'radius_dist',                                                    \
    6365  'rmNOnum', 'running_mean',                                                         \
    64   'significant_decomposition', 'squared_radial',                                     \
     66  'significant_decomposition', 'squared_radial', 'stations_values',                  \
    6567  'table_tex_file', 'unitsDate', 'variables_values', 'wdismean', 'WRFsetup']
    6668
     
    471473        print gen.squared_radial(int(vals[0]))
    472474
     475elif oper == 'stations_values':
     476    Nvals = 2
     477    vals = opts.values.split(cS)
     478    if vals[0] == 'h':
     479        print gen.stations_values.__doc__
     480        quit(-1)
     481    else:
     482        if len(vals) != Nvals:
     483            print errormsg
     484            print '  ' + main + ": operation '" + oper + "' requires", Nvals, 'and', \
     485              len(vals), ' has passed!!'
     486            print gen.stations_values.__doc__
     487            quit(-1)
     488        result = gen.stations_values(vals[0], vals[1])
     489        print gen.numVector_String(result,':')
     490
    473491elif oper == 'table_tex_file':
    474492    Nvals = 6
Note: See TracChangeset for help on using the changeset viewer.