Changeset 2027 in lmdz_wrf for trunk/tools
- Timestamp:
- Aug 6, 2018, 3:47:02 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic.py
r1919 r2027 27 27 # grid_combinations: Function to provide all the possible grid points combination for a given pair of values 28 28 # x,y= pair of grid points 29 # inf_operSlist: Function to provide information from a string as a list separated by 30 # a given character followig a given operation and a set of values 29 31 # interpolate_locs: Function to provide interpolate locations on a given axis 30 32 # PolyArea: Function to compute the area of the polygon following 'Shoelace formula' … … 52 54 operations=['ASCIIfile_stats', 'coincident_CFtimes', 'count_cond', \ 53 55 'datetimeStr_conversion', \ 54 'grid_combinations', 56 'grid_combinations', 'inf_operSlist', \ 55 57 'interpolate_locs', 'latex_fig_array', 'list_operations', 'PolyArea', \ 56 58 'radial_points', 'radius_dist', \ … … 86 88 ## e.g. # generic.py -o WRFsetup -S '/home/lluis/estudios/RELAMPAGO/SimCoor/UBA/namelist.input@/home/lluis/estudios/RELAMPAGO/SimCoor/SMN/namelist.input@/home/lluis/estudios/RELAMPAGO/SimCoor/NOA-IERSD/namelist.input@/home/lluis/estudios/RELAMPAGO/SimCoor/UBAmili/namelist.input,basic,textabrow' 87 89 ## e.g. # generic.py -o ASCIIfile_stats -S times_CDXWRF1.dat,#,R 90 ## e.g. # generic.py -o inf_operSlist -S '-98.21:1.2:3.45:100.1:34321.1,threshold,:,3.' 88 91 89 92 operationnames = "'" + gen.numVector_String(operations, "', '") + "'" … … 211 214 objf.close() 212 215 216 elif oper == 'inf_operSlist': 217 Nvals = 4 218 vals = opts.values.split(cS) 219 if vals[0] == 'h': 220 print gen.inf_operSlist.__doc__ 221 quit(-1) 222 else: 223 if len(vals) != Nvals: 224 print errormsg 225 print ' ' + main + ": operation '" + oper + "' requires", Nvals, 'and', \ 226 len(vals), ' has passed!!' 227 print gen.inf_operSlist.__doc__ 228 quit(-1) 229 vals0 = vals[0] 230 vals1 = vals[1] 231 vals2 = vals[2] 232 vals3 = vals[3] 233 234 print gen.inf_operSlist(vals0, vals1, char=vals2, values=vals3) 235 213 236 elif oper == 'interpolate_locs': 214 237 Nvals = 3
Note: See TracChangeset
for help on using the changeset viewer.