- Timestamp:
- Nov 3, 2016, 6:55:03 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/model_graphics.py
r1264 r1266 2866 2866 print " var in file: '" + vninF + "'" 2867 2867 2868 dfiles = 'add|' + ifile2 + '|' + vninF + ',sub|' + ifile1 + '|' + vninF 2869 values = '|'.join(CFdims) + '@' + dfiles 2868 # Range of the dimensions 2869 for CFd in CFdims: 2870 if CFd == CFdims[0]: 2871 CFdimS = CFd + '|' + CFd + '|-1' 2872 else: 2873 CFdimS = CFdims + ';' + CFd + '|' + CFd + '|-1' 2874 2875 # Attributes of the variable 2876 varattrs = ncvar.ivattrs(file2,vninF) 2877 varvals = vninF + ',' + varattrs['long_name'] + ',' + varattrs['units'] 2878 2879 values = CFdims + '@' + 'add|' + file2 + '|' + vninF + '%' + CFdims + \ 2880 '@' + 'sub|' + file2 + '|' + vninF 2870 2881 pyins = 'python ' + pyH + "/nc_var.py -o compute_opersvarsfiles -S '" + \ 2871 values + "' -v " + v ninF2882 values + "' -v " + varvals 2872 2883 2873 2884 try: 2874 2885 with gen.Capturing() as output: 2875 ncvar.compute_opersvarsfiles(values,v ninF)2886 ncvar.compute_opersvarsfiles(values,varvals) 2876 2887 except: 2877 2888 print errmsg 2878 print 'ncvar.compute_opersvarsfiles(' + values + ',' + v ninF+ ')'2889 print 'ncvar.compute_opersvarsfiles(' + values + ',' + varvals + ')' 2879 2890 for s1out in output: print s1out 2880 2891 quit(-1) … … 3414 3425 print " var in file: '" + vninF + "'" 3415 3426 3416 dfiles = 'add|' + ifile2 + '|' + vninF + ',sub|' + ifile1 + '|' + vninF 3417 values = '|'.join(CFdims) + '@' + dfiles 3427 # Range of the dimensions 3428 for CFd in CFdims: 3429 if CFd == CFdims[0]: 3430 CFdimS = CFd + '|' + CFd + '|-1' 3431 else: 3432 CFdimS = CFdims + ';' + CFd + '|' + CFd + '|-1' 3433 3434 # Attributes of the variable 3435 varattrs = ncvar.ivattrs(file2,vninF) 3436 varvals = vninF + ',' + varattrs['long_name'] + ',' + varattrs['units'] 3437 3438 values = CFdims + '@' + 'add|' + file2 + '|' + vninF + '%' + CFdims + \ 3439 '@' + 'sub|' + file2 + '|' + vninF 3418 3440 pyins = 'python ' + pyH + "/nc_var.py -o compute_opersvarsfiles -S '" + \ 3419 values + "' -v " + v ninF3441 values + "' -v " + varvals 3420 3442 3421 3443 try: 3422 3444 with gen.Capturing() as output: 3423 ncvar.compute_opersvarsfiles(values,v ninF)3445 ncvar.compute_opersvarsfiles(values,varvals) 3424 3446 except: 3425 3447 print errmsg 3426 print 'ncvar.compute_opersvarsfiles(' + values + ', ' + vninF+ ')'3448 print 'ncvar.compute_opersvarsfiles(' + values + ', ' + varvals + ')' 3427 3449 for s1out in output: print s1out 3428 3450 quit(-1)
Note: See TracChangeset
for help on using the changeset viewer.