Changeset 1048 in lmdz_wrf
- Timestamp:
- Aug 26, 2016, 9:21:12 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/model_graphics.py
r1043 r1048 556 556 try: 557 557 with gen.Capturing() as output: 558 ncvar.DataSetSection_multivars(values, cf, vs)558 ncvar.DataSetSection_multivars(values, idir + '/' + cf, vs) 559 559 except: 560 560 print errmsg 561 print 'ncvar.DataSetSection_multivars('+values+', '+cf+', '+vs+')' 561 print 'ncvar.DataSetSection_multivars('+values+', '+idir+'/'+cf+ \ 562 ', '+vs+')' 562 563 for sout in output: print sout 563 564 quit(-1) … … 568 569 569 570 # Keeping track of the operations 570 pyins = pyH + "/nc_var.py -f " +cf+" -o DataSetSection_multivars -v "+\571 vs + " -S '" + values + "'"571 pyins = pyH + "/nc_var.py -f " + idir + '/' + cf + \ 572 " -o DataSetSection_multivars -v " + vs + " -S '" + values + "'" 572 573 otrackf.write('\n') 573 574 otrackf.write('# ' + CFvarn + " " + modvar + '\n') 574 otrackf.write( pyins + '\n')575 otrackf.write('python ' + pyins + '\n') 575 576 576 577 # CF renaming of variable … … 584 585 diagc = '@'.join(diagvar[1:]) 585 586 586 values = '-f ' + cf + " -d '" + dims + "' -v '" + diagn + '|' +\587 diag c + "'"587 values = '-f ' + idir + '/' + cf + " -d '" + dims + "' -v '" + \ 588 diagn + '|' + diagc + "'" 588 589 try: 589 590 with gen.Capturing() as output: … … 624 625 for sout in output: print sout 625 626 626 # adding CF lon,lat,time in WRFfiles627 if minf.name == 'WRF' :627 # CFification of files 628 if minf.name == 'WRF' or minf.name == 'WRF_LMDZ': 628 629 values = vdnx + ':' + vdny + ':'+ Tref + ':' + Tunits 629 ncvar.WRF_toCF(values, ifilen) 630 try: 631 with gen.Capturing() as output: 632 ncvar.WRF_toCF(values, ifilen) 633 except: 634 print errmsg 635 print 'WRF_toCF('+ values +', ' + ifilen + ')' 636 for sout in output: print sout 637 quit(-1) 638 if db: 639 for sout in output: print sout 640 elif minf.name == 'LMDZ': 641 ncvar.LMDZ_toCF(ifilen) 642 643 try: 644 with gen.Capturing() as output: 645 ncvar.LMDZ_toCF(ifilen) 646 except: 647 print errmsg 648 print 'LMDZ_toCF('+ ifilen + ')' 649 for sout in output: print sout 650 quit(-1) 651 if db: 652 for sout in output: print sout 653 else: 654 print errmsg 655 print ' ' + fname + ": no CFification for model '" +minf.name+ "' !!" 656 print " available ones: 'WRF', 'WRF_LMDZ', 'LMDZ'" 657 quit(-1) 630 658 631 659 ifile = ifile + 1 … … 2940 2968 # End of avoiding to repeat all the experiment search 2941 2969 2942 print " For experiment '"+exp+"' is required to compute:", Nvar, "variables" 2970 print " For experiment '" + exp + "' is required to compute:", Nvar, \ 2971 "variables" 2943 2972 2944 2973 if dbg: … … 2955 2984 # Figures of variables direct from files 2956 2985 ## 2957 print " " + main + ":Plotting direct figures ..."2986 print " Plotting direct figures ..." 2958 2987 dirfigf = owdir + '/directplotsdraw.inf' 2959 2988 if figscratch: … … 2976 3005 # End of avoiding to repeat all the plots search 2977 3006 2978 print " For experiment '"+exp+"' is required to plot:", Nplt, "plots"3007 print " For experiment '" + exp + "' is required to plot:", Nplt, "plots" 2979 3008 2980 3009 if dbg: … … 2992 3021 # Experiments loop 2993 3022 ## 3023 print ' ******* ****** ***** **** *** ** * ** *** **** ***** ****** *******' 3024 print " ** '" + mod + "': Inter experiments differences " 3025 print ' ******* ****** ***** **** *** ** * ** *** **** ***** ****** *******' 3026 print ' experiments:', exps 2994 3027 # There are two kind of differences: 2995 3028 # DIFFop: differences between operations of each given variable. … … 3002 3035 3003 3036 Nexps = len(exps) 3004 for exp1 in exps[0:Nexps-1]: 3005 for exp2 in exps[1:Nexps]: 3037 for iexp1 in range(0,Nexps-1): 3038 exp1 = exps[iexp1] 3039 for iexp2 in range(iexp1+1,Nexps): 3040 exp2 = exps[iexp2] 3006 3041 Sexps = exp2 + '-' + exp1 3007 3042 print ' ' + Sexps + '...' … … 3043 3078 # End of avoiding to repeat all the experiment search 3044 3079 3045 print " For experiments '"+exp2+"'-'"+exp1+"' is required to compute:",\3080 print " For experiments '"+exp2+"'-'"+exp1+"' is required to compute:", \ 3046 3081 Nvar, "differences" 3047 3082 … … 3094 3129 dbg) 3095 3130 3096 quit()3131 # quit() 3097 3132 # end of mods loop 3098 3133
Note: See TracChangeset
for help on using the changeset viewer.