Ignore:
Timestamp:
Sep 30, 2010 1:37:58 PM (14 years ago)
Author:
heinze
Message:

Formatting of all NCL scripts.
Items of .ncl.config are re-sorted and xyc, xzc and yzc are no parameters any more.
Parameters start_f_1/end_f_1 are renamed to start_f/end_f in profiles.ncl.
Bugfix in cross_sections: enable vector plot if var is set explicitly.
Deletion of NCL user guide because guide is no available online.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/NCL/timeseries.ncl

    r534 r566  
    2525      print("Neither the personal configuration file '.ncl.config' exists in")
    2626      print("~/palm/current_version")
    27       print("nor the default configuration file '.ncl.config.default' exists in")
     27      print("nor the default configuration file '.ncl.config.default' "+\
     28            "exists in")
    2829      print(palm_bin_path + "/NCL")
    2930      print(" ")
     
    6061   end if
    6162
    62    if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. format_out .NE. "png")then
     63   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND.   \
     64       format_out .NE. "eps" .AND. format_out .NE. "ps" .AND.    \
     65       format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \
     66       format_out .NE. "png")then
    6367      print(" ")
    6468      print("'format_out = "+format_out+"' is invalid and set to'x11'")
     
    104108   if (start_f .EQ. -1)then
    105109      print(" ")
    106       print("'start_f' must be one of the cyclic numbers (at least 0) of your input file(s)")
     110      print("'start_f' must be one of the cyclic numbers (at least 0) of "+\
     111            "your input file(s)")
    107112      print(" ") 
    108113      exit
     
    110115   if (end_f .EQ. -1)then
    111116      print(" ")
    112       print("'end_f' must be one of the cyclic numbers (at least 0) of your input file(s)")
     117      print("'end_f' must be one of the cyclic numbers (at least 0) of "+\
     118            "your input file(s)")
    113119      print(" ") 
    114120      exit
     
    191197      if (start_time_step .GE. t_all(nt-1)/3600)
    192198         print(" ")
    193          print("'start_time_step' = "+ start_time_step +"h is equal or greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
     199         print("'start_time_step' = "+ start_time_step +\
     200               "h is equal or greater than last time step = " + \
     201               t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
    194202         print(" ")
    195203         print("Select another 'start_time_step'")
     
    199207      if (start_time_step .LT. t_all(0)/3600)
    200208         print(" ")
    201          print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
     209         print("'start_time_step' = "+ start_time_step +\
     210               "h is lower than first time step = " + t_all(0)+"s = "+\
     211               t_all(0)/3600+"h")
    202212         print(" ")
    203213         print("Select another 'start_time_step'")
     
    207217   end if
    208218   do i=0,nt-2     
    209       if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
     219      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
     220          start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
    210221         st=i
    211222         break
    212223      end if
    213224   end do
    214    if (start_time_step .GE. t_all(nt-1)-delta_t/2 .AND. start_time_step .LT. t_all(nt-1)) then
     225   if (start_time_step .GE. t_all(nt-1)-delta_t/2 .AND. \
     226       start_time_step .LT. t_all(nt-1)) then
    215227      st=nt-2   
    216228   end if
     
    233245      if (end_time_step .LE. t_all(0)/3600)
    234246         print(" ")
    235          print("'end_time_step' = "+end_time_step+ "h is lower or equal than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
     247         print("'end_time_step' = "+end_time_step+ \
     248              "h is lower or equal than first time step = " + \
     249               t_all(0)+"s = "+t_all(0)/3600+"h")
    236250         print(" ")
    237251         print("Select another 'end_time_step'")
     
    241255      if (end_time_step .GT. t_all(nt-1)/3600)
    242256         print(" ")
    243          print("'end_time_step' = "+ end_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
     257         print("'end_time_step' = "+ end_time_step +\
     258               "h is greater than last time step = " + t_all(nt-1)+"s = "+\
     259               t_all(nt-1)/3600+"h")
    244260         print(" ")
    245261         print("Select another 'end_time_step'") 
     
    249265      if (end_time_step .LE. start_time_step/3600)
    250266         print(" ")
    251          print("'end_time_step' = "+ end_time_step +"h is equal or lower than 'start_time_step' = "+start_time_step+"h")
     267         print("'end_time_step' = "+ end_time_step +\
     268               "h is equal or lower than 'start_time_step' = "+\
     269               start_time_step+"h")
    252270         print(" ")
    253271         print("Select another 'start_time_step' or 'end_time_step'")
     
    257275   end if
    258276   do i=0,nt-1     
    259       if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
     277      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
     278          end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
    260279         et=i
    261280         break
     
    278297
    279298   print(" ")
    280    print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step)
    281    print("                     till "+t_all(end_time_step)/3600+" h = "+t_all(end_time_step)+" s => index = "+end_time_step)
     299   print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+\
     300         t_all(start_time_step)+" s => index = "+start_time_step)
     301   print("                     till "+t_all(end_time_step)/3600+" h = "+\
     302         t_all(end_time_step)+" s => index = "+end_time_step)
    282303   print(" ")
    283304
     
    300321   res@tmYLLabelFont           = "helvetica"
    301322   res@xyLineColors            = (/237/)
     323   res@trXMaxF                 = t_all(start_time_step)
     324   res@trXMinF                 = t_all(end_time_step)
    302325   
    303326   res@lgLabelFontHeightF     = 0.02
     
    405428
    406429      do j = 0, comma -2
    407          vNam_temp(j) = charactertostring(var_char(indices(j)+1:indices(j+1)-1))
     430         vNam_temp(j) = charactertostring(\
     431                                   var_char(indices(j)+1:indices(j+1)-1))
    408432      end do
    409433     
     
    458482            maxi(varn) = max(data(varn,:))
    459483           
    460             if (vNam(varn) .EQ. "E" .OR. vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") then
     484            if (vNam(varn) .EQ. "E" .OR. vNam(varn) .EQ. "Es" .OR. \
     485                vNam(varn) .EQ. "E*") then
    461486               if (mini(varn) .EQ. maxi(varn)) then
    462487                  if (min(data(varn,:)) .EQ. 0)then
     
    497522            end if
    498523
    499             if (vNam(varn) .EQ. "umax" .OR. vNam(varn) .EQ. "vmax" .OR. vNam(varn) .EQ. "wmax") then
     524            if (vNam(varn) .EQ. "umax" .OR. vNam(varn) .EQ. "vmax" .OR. \
     525                vNam(varn) .EQ. "wmax") then
    500526               if (mini(varn) .EQ. maxi(varn)) then
    501527                  if (mini(varn) .EQ. 0)then
     
    535561            end if
    536562
    537             if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wpt"\
    538                .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq ) then
     563            if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "wpptp" .OR. \
     564                vNam(varn) .EQ. "wpt" .OR. vNam(varn) .EQ. \
     565                "w"+dq+"pt"+dq+"0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq ) then
    539566               if (mini(varn) .EQ. maxi(varn)) then
    540567                  if (min(data(varn,:)) .EQ. 0)then
     
    581608  if (isStrSubset(data@long_name," SR " ))then
    582609      print(" ")
    583       print("If you have outputs of statistic regions you cannot overlay variables;")
     610      print("If you have outputs of statistic regions you cannot overlay "+\
     611            "variables;")
    584612      print("'over' is set to 0" )
    585613      print(" ")
     
    690718            end if
    691719
    692             if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" )
     720            if (vNam(varn) .EQ. "wpptp0" .OR. \
     721                vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" )
    693722               w0=0
    694723               res@xyLineColors            = (/237/)
     
    759788
    760789               ; ***************************************************
    761                ; legend for combined plot
     790               ; legend for overlaid plot
    762791               ; ***************************************************
    763792     
     
    777806               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)           
    778807            end if
    779             if ((vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") .AND. E .NE. 1) then
     808            if ((vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") .AND. \
     809                E .NE. 1) then
    780810               Es=1
    781811               overlay(plot_E,plot_Es)
     
    784814
    785815               ; ***************************************************
    786                ; legend for combined plot
     816               ; legend for overlaid plot
    787817               ; ***************************************************
    788818     
     
    803833            end if
    804834
    805             if ((vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*") .AND. ws .NE. 1) then
     835            if ((vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*") .AND. \
     836                 ws .NE. 1) then
    806837               us=1
    807838               overlay(plot_us,plot_ws)
     
    810841
    811842               ; ***************************************************
    812                ; legend for combined plot
     843               ; legend for overlaid plot
    813844               ; ***************************************************
    814845     
     
    828859               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    829860            end if
    830             if ((vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*") .AND. us .NE. 1) then
     861            if ((vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*") .AND. \
     862                 us .NE. 1) then
    831863               ws=1
    832864               overlay(plot_us,plot_ws)
     
    835867
    836868               ; ***************************************************
    837                ; legend for combined plot
     869               ; legend for overlaid plot
    838870               ; ***************************************************
    839871     
     
    864896
    865897                  ; ***************************************************
    866                   ; legend for combined plot
     898                  ; legend for overlaid plot
    867899                  ; ***************************************************
    868900     
     
    875907                  lgres@lgDashIndexes      = (/0,0,0/)
    876908                  lgres@lgLineColors       = (/237,144,80/)
    877                   lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres)       
     909                  lbid = gsn_create_legend(\
     910                                  wks_ps,3,(/"umax","vmax","wmax"/),lgres)
    878911
    879912                  amres = True
     
    892925
    893926                  ; ***************************************************
    894                   ; legend for combined plot
     927                  ; legend for overlaid plot
    895928                  ; ***************************************************
    896929     
     
    903936                  lgres@lgDashIndexes      = (/0,0,0/)
    904937                  lgres@lgLineColors       = (/237,144,80/)
    905                   lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres)       
    906 
     938                  lbid = gsn_create_legend(\
     939                                      wks_ps,3,(/"umax","vmax","wmax"/),lgres)
    907940                  amres = True
    908941                  amres@amParallelPosF   = 0.6             
     
    920953
    921954                  ; ***************************************************
    922                   ; legend for combined plot
     955                  ; legend for overlaid plot
    923956                  ; ***************************************************
    924957     
     
    931964                  lgres@lgDashIndexes      = (/0,0,0/)
    932965                  lgres@lgLineColors       = (/237,144,80/)
    933                   lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres)       
    934 
     966                  lbid = gsn_create_legend(\
     967                                       wks_ps,3,(/"umax","vmax","wmax"/),lgres)
    935968                  amres = True
    936969                  amres@amParallelPosF   = 0.6             
     
    947980       
    948981               ; ***************************************************
    949                ; legend for combined plot
     982               ; legend for overlaid plot
    950983               ; ***************************************************
    951984     
     
    958991               lgres@lgDashIndexes      = (/0,0,0/)
    959992               lgres@lgLineColors       = (/237,144,80/)
    960                lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres)       
     993               lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres)
    961994
    962995               amres = True
     
    9721005
    9731006               ; ***************************************************
    974                ; legend for combined plot
     1007               ; legend for overlaid plot
    9751008               ; ***************************************************
    9761009     
     
    9831016               lgres@lgDashIndexes      = (/0,0,0/)
    9841017               lgres@lgLineColors       = (/237,144,80/)
    985                lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres)      
     1018               lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres)
    9861019
    9871020               amres = True
     
    10001033
    10011034                  ; ***************************************************
    1002                   ; legend for combined plot
     1035                  ; legend for overlaid plot
    10031036                  ; ***************************************************
    10041037     
     
    10111044                  lgres@lgDashIndexes      = (/0,0,0/)
    10121045                  lgres@lgLineColors       = (/237,144,80/)
    1013                   lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)       
    1014 
     1046                  lbid = gsn_create_legend(\
     1047                                    wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)
    10151048                  amres = True
    10161049                  amres@amParallelPosF   = 0.6             
     
    10191052               end if           
    10201053            end if
    1021             if ((vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq) .AND. w0 .NE. 1)
     1054            if ((vNam(varn) .EQ. "wpptp" .OR. \
     1055                 vNam(varn) .EQ. "w"+dq+"pt"+dq) .AND. w0 .NE. 1)
    10221056               if (wt .NE. 1) then
    10231057                 wp=1
     
    10281062                 
    10291063                 ; ***************************************************
    1030                   ; legend for combined plot
     1064                  ; legend for overlaid plot
    10311065                  ; ***************************************************
    10321066     
     
    10391073                  lgres@lgDashIndexes      = (/0,0,0/)
    10401074                  lgres@lgLineColors       = (/237,144,80/)
    1041                   lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)       
     1075                  lbid = gsn_create_legend(\
     1076                                     wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)
    10421077
    10431078                  amres = True
     
    10561091
    10571092                  ; ***************************************************
    1058                   ; legend for combined plot
     1093                  ; legend for overlaid plot
    10591094                  ; ***************************************************
    10601095     
     
    10671102                  lgres@lgDashIndexes      = (/0,0,0/)
    10681103                  lgres@lgLineColors       = (/237,144,80/)
    1069                   lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)       
    1070 
     1104                  lbid = gsn_create_legend(\
     1105                                  wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)
    10711106                  amres = True
    10721107                  amres@amParallelPosF   = 0.6             
     
    10761111            end if
    10771112
    1078             if ((vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)") .AND. pz .NE. 1) then
     1113            if ((vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)") .AND. \
     1114                pz .NE. 1) then
    10791115               p=1     
    10801116               overlay(plot_pt_0_,plot_pt_zp_)
     
    10831119     
    10841120               ; ***************************************************
    1085                ; legend for combined plot
     1121               ; legend for overlaid plot
    10861122               ; ***************************************************
    10871123     
     
    10941130               lgres@lgDashIndexes      = (/0,0,0/)
    10951131               lgres@lgLineColors       = (/237,144,80/)
    1096                lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)       
     1132               lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)
    10971133
    10981134               amres = True
     
    11011137               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    11021138            end if
    1103             if ((vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)") .AND. p .NE. 1) then
     1139            if ((vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)") .AND.\
     1140                 p .NE. 1) then
    11041141               pz=1       
    11051142               overlay(plot_pt_0_,plot_pt_zp_)
     
    11081145
    11091146               ; ***************************************************
    1110                ; legend for combined plot
     1147               ; legend for overlaid plot
    11111148               ; ***************************************************
    11121149     
     
    11191156               lgres@lgDashIndexes      = (/0,0,0/)
    11201157               lgres@lgLineColors       = (/237,144,80/)
    1121                lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)       
     1158               lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)
    11221159
    11231160               amres = True
     
    11281165
    11291166            if(vNam(varn) .NE. "pt_zp_" .AND. vNam(varn) .NE. "pt(zp)" .AND. \
    1130                vNam(varn) .NE. "pt_0_" .AND. vNam(varn) .NE. "pt(0)" .AND. \
    1131                vNam(varn) .NE. "wpt" .AND. vNam(varn) .NE. "wpptp" .AND. \
    1132                vNam(varn) .NE. "w"+dq+"pt"+dq .AND. vNam(varn) .NE. "wpptp0" .AND. \
    1133                vNam(varn) .NE. "w"+dq+"pt"+dq+"0" .AND. vNam(varn) .NE. "z_i_pt" .AND.\
    1134                vNam(varn) .NE. "z_i_wpt" .AND. vNam(varn) .NE. "wmax" .AND. \
    1135                vNam(varn) .NE. "vmax" .AND. vNam(varn) .NE. "umax" .AND. \
    1136                vNam(varn) .NE. "ws" .AND. vNam(varn) .NE. "w*" .AND.  \
    1137                vNam(varn) .NE. "us" .AND. vNam(varn) .NE. "u*" .AND. \
    1138                vNam(varn) .NE. "Es" .AND. vNam(varn) .NE. "E*" .AND. \
     1167               vNam(varn) .NE. "pt_0_" .AND. vNam(varn) .NE. "pt(0)" .AND.   \
     1168               vNam(varn) .NE. "wpt" .AND. vNam(varn) .NE. "wpptp" .AND.     \
     1169               vNam(varn) .NE. "w"+dq+"pt"+dq .AND.                          \
     1170               vNam(varn) .NE. "wpptp0" .AND.                                \
     1171               vNam(varn) .NE. "w"+dq+"pt"+dq+"0" .AND.                      \
     1172               vNam(varn) .NE. "z_i_pt" .AND.                                \
     1173               vNam(varn) .NE. "z_i_wpt" .AND. vNam(varn) .NE. "wmax" .AND.  \
     1174               vNam(varn) .NE. "vmax" .AND. vNam(varn) .NE. "umax" .AND.     \
     1175               vNam(varn) .NE. "ws" .AND. vNam(varn) .NE. "w*" .AND.         \
     1176               vNam(varn) .NE. "us" .AND. vNam(varn) .NE. "u*" .AND.         \
     1177               vNam(varn) .NE. "Es" .AND. vNam(varn) .NE. "E*" .AND.         \
    11391178               vNam(varn) .NE. "E") then
    11401179
     
    12301269   no_frames = 0
    12311270 
    1232    if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. n .gt. no_rows*no_columns) then
     1271   if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \
     1272        n .gt. no_rows*no_columns) then
    12331273      gsn_panel(wks_ps,plot_ps(1:n),(/n,1/),resP)
    12341274      print(" ")
     
    12411281            no_frames = no_frames + 1           
    12421282         else
    1243             gsn_panel(wks_ps, plot_ps(np:np+no_rows*no_columns-1),(/no_rows,no_columns/),resP)
     1283            gsn_panel(wks_ps, plot_ps(np:np+no_rows*no_columns-1),\
     1284                                                   (/no_rows,no_columns/),resP)
    12441285            no_frames = no_frames + 1
    12451286         end if
Note: See TracChangeset for help on using the changeset viewer.