Changeset 2706 in lmdz_wrf
- Timestamp:
- Sep 19, 2019, 1:39:07 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/tools/generic.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic.py
r2490 r2706 27 27 # create_LateX_figs: Function to create a LaTeX from a folder with multiple plots from different values 28 28 # datetimeStr_conversion: Function to transform a string date to an another date object 29 # DegMinSec_angle: Function to transform Degrees Minutes Seconds to an angle 29 30 # get_right_CFtimeunits: Function to get the right CFtime units from any given format 30 31 # grid_combinations: Function to provide all the possible grid points combination for a given pair of values … … 56 57 # List of available operations 57 58 operations=['ASCIIfile_stats', 'coincident_CFtimes', 'coldec_hex', 'count_cond', \ 58 'create_LateX_figs', 'datetimeStr_conversion', ' get_right_CFtimeunits',\59 'g rid_combinations', 'inf_operSlist',\59 'create_LateX_figs', 'datetimeStr_conversion', 'DegMinSec_angle', \ 60 'get_right_CFtimeunits', 'grid_combinations', 'inf_operSlist', \ 60 61 'interpolate_locs', 'latex_fig_array', 'list_operations', 'PolyArea', \ 61 62 'radial_points', 'radius_dist', \ … … 95 96 ## e.g. # generic.py -o get_right_CFtimeunits -S 'minutes!since!1-1-1' 96 97 ## e.g. # generic.py -o coldec_hex -S 0.545,0.352,0. 98 ## e.g. # generic.py -o DegMinSec_angle -S 35,10,21 97 99 98 100 operationnames = "'" + gen.numVector_String(operations, "', '") + "'" … … 251 253 #'days_period' 252 254 255 elif oper == 'DegMinSec_angle': 256 Nvals = 3 257 vals = opts.values.split(cS) 258 if vals[0] == 'h': 259 print gen.DegMinSec_angle.__doc__ 260 quit(-1) 261 else: 262 if len(vals) != Nvals: 263 print errormsg 264 print ' ' + main + ": operation '" + oper + "' requires", Nvals, 'and', \ 265 len(vals), ' has passed!!' 266 print gen.DegMinSec_angle.__doc__ 267 quit(-1) 268 vals0 = np.float(vals[0]) 269 vals1 = np.float(vals[1]) 270 vals2 = np.float(vals[2]) 271 272 print gen.DegMinSec_angle(vals0, vals1, vals2) 273 253 274 elif oper == 'get_right_CFtimeunits': 254 275 Nvals = 1
Note: See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/LMDZ_WRF/chrome/site/your_project_logo.png)