Ignore:
Timestamp:
Apr 30, 2008 1:41:13 PM (16 years ago)
Author:
letzel
Message:
  • NCL scripts in trunk/SCRIPTS/NCL updated
File:
1 edited

Legend:

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

    r161 r162  
    6363   if ( .not. isvar("over") ) then                      ; switches overlaying plots on
    6464      over = 0
    65       if (stringtointeger(parameter(73)) .NE. 0) then
    66          over = stringtointeger(parameter(73))
    67          if (stringtointeger(parameter(73)) .NE. 1) then
     65      if (stringtointeger(parameter(37)) .NE. 0) then
     66         over = stringtointeger(parameter(37))
     67         if (stringtointeger(parameter(37)) .NE. 1) then
    6868            print(" ")
    6969            print("Please set 'over' to 0 or 1")
     
    9393   t_all = f->time
    9494   nt  = dimsizes(t_all)
     95   delta_t=t_all(nt-1)/nt
    9596
    9697   ; ****************************************************       
     
    99100
    100101   if ( .not. isvar("start_time_step") ) then           
    101       start_time_step = 0
    102       if (parameter(13) .NE. "1") then
    103          if (parameter(13) .LE. "0")
    104             print(" ")
    105             print("Begin with time step 1")
     102      start_time_step=t_all(0)/3600
     103      if (parameter(13) .NE. "t(0)") then
     104         if (stringtodouble(parameter(13)) .GE. t_all(nt-1)/3600)
     105            print(" ")
     106            print("'start_time_step' = "+ parameter(13) +"h is equal or greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
     107            print(" ")
     108            print("Please select another 'start_time_step'")
    106109            print(" ")
    107110            exit
    108111         end if
    109          if (stringtointeger(parameter(13)) .GE. nt)
    110             print(" ")
    111             print("'start_time_step' = "+ parameter(13) +" is greater than available time steps = " + (nt-1))
     112         if (stringtofloat(parameter(13)) .LT. t_all(0)/3600)
     113            print(" ")
     114            print("'start_time_step' = "+ parameter(13) +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
     115            print(" ")
     116            print("Please select another 'start_time_step'")
    112117            print(" ")
    113118            exit
    114119         end if
    115          start_time_step = stringtointeger(parameter(13))-1
     120         start_time_step=stringtodouble(parameter(13))
    116121      end if
    117122   else
    118       if (start_time_step .LE. 0)
    119          print(" ")
    120          print("Begin with time step 1")
     123      if (start_time_step .GE. t_all(nt-1)/3600)
     124         print(" ")
     125         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")
     126         print(" ")
     127         print("Please select another 'start_time_step'")
    121128         print(" ")
    122129         exit
    123130      end if
    124       if (start_time_step .GE. nt)
    125          print(" ")
    126          print("'start_time_step' = "+ start_time_step +" is greater than available time steps = " + (nt-1))
     131      if (start_time_step .LT. t_all(0)/3600)
     132         print(" ")
     133         print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
     134         print(" ")
     135         print("Please select another 'start_time_step'")
    127136         print(" ")
    128137         exit
    129138      end if
    130       start_time_step = start_time_step - 1
    131139   end if
    132 
     140   start_time_step = start_time_step*3600
     141   do i=0,nt-2     
     142      if (start_time_step .GE. t_all(i)-delta_t/2 .AND. start_time_step .LT. t_all(i)+delta_t/2)then
     143         st=i
     144         break
     145      end if
     146   end do
     147   if (start_time_step .GE. t_all(nt-1)-delta_t/2 .AND. start_time_step .LT. t_all(nt-1)) then
     148      st=nt-2   
     149   end if
     150     
    133151   ; ****************************************************
    134152   ; end of time step and different types of mistakes that could be done
     
    136154
    137155   if ( .not. isvar("end_time_step") ) then             
    138       end_time_step = nt-1
    139       if (parameter(15) .NE. "nt") then
    140          if (parameter(15) .LE. "0")
    141             print(" ")
    142             print("'end_time_step' = "+parameter(15)+ " is too small; 'end_time_step' should be at least 1 ")
     156      end_time_step = t_all(nt-1)/3600
     157      if (parameter(15) .NE. "t(end)") then
     158         if (stringtodouble(parameter(15)) .LE. t_all(0)/3600)
     159            print(" ")
     160            print("'end_time_step' = "+parameter(15)+ "h is lower or equal than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
     161            print(" ")
     162            print("Please select another 'end_time_step'")
    143163            print(" ")
    144164            exit
    145165         end if
    146          if (stringtointeger(parameter(15)) .GE. nt)
    147             print(" ")
    148             print("'end_time_step' = "+ parameter(15) +" is greater than available time steps = " + (nt-1)) 
     166         if (stringtodouble(parameter(15)) .GT. t_all(nt-1)/3600)
     167            print(" ")
     168            print("'end_time_step' = "+ parameter(15) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
     169            print(" ")
     170            print("Please select another 'end_time_step'") 
    149171            print(" ")
    150172            exit
    151173         end if
    152          if (stringtointeger(parameter(15)) .LT. stringtointeger(parameter(13)) )
    153             print(" ")
    154             print("'end_time_step' = "+ parameter(15) +" is lower than 'start_time_step' = "+parameter(13))
     174         if (stringtodouble(parameter(15)) .LE. start_time_step/3600)
     175            print(" ")
     176            print("'end_time_step' = "+ parameter(15) +"h is equal or lower than 'start_time_step' = "+parameter(13)+"h")
     177            print(" ")
     178            print("Please select another 'start_time_step' or 'end_time_step'")
    155179            print(" ")
    156180            exit
    157181         end if
    158          end_time_step = stringtointeger(parameter(15))-1
     182         end_time_step = stringtodouble(parameter(15))
    159183      end if   
    160184   else
    161       if (end_time_step .LE. 0)
    162          print(" ")
    163          print("'end_time_step' = "+end_time_step+ " is too small; 'end_time_step' should be at least 1 ")
     185      if (end_time_step .LE. t_all(0)/3600)
     186         print(" ")
     187         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")
     188         print(" ")
     189         print("Please select another 'end_time_step'")
    164190         print(" ")
    165191         exit
    166192      end if
    167       if (end_time_step .GE. nt)
    168          print(" ")
    169          print("'end_time_step' = "+ end_time_step +" is greater than available time steps = "+(nt-1))
     193      if (end_time_step .GT. t_all(nt-1)/3600)
     194         print(" ")
     195         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")
     196         print(" ")
     197         print("Please select another 'end_time_step'") 
    170198         print(" ")
    171199         exit
    172200      end if
    173       if (end_time_step .LT. start_time_step)
    174          print(" ")
    175          print("'end_time_step' = "+end_time_step +" is lower than 'start_time_step' = "+start_time_step)
     201      if (end_time_step .LE. start_time_step/3600)
     202         print(" ")
     203         print("'end_time_step' = "+ end_time_step +"h is equal or lower than 'start_time_step' = "+start_time_step+"h")
     204         print(" ")
     205         print("Please select another 'start_time_step' or 'end_time_step'")
    176206         print(" ")
    177207         exit
    178208      end if
    179       end_time_step = end_time_step - 1
    180    end if 
     209   end if
     210   end_time_step = end_time_step*3600
     211   do i=0,nt-1     
     212      if (end_time_step .GE. t_all(i)-delta_t/2 .AND. end_time_step .LT. t_all(i)+delta_t/2)then
     213         et=i
     214         break
     215      end if
     216   end do
     217 
     218   delete(start_time_step)
     219   start_time_step=round(st,3)
     220   delete(end_time_step)
     221   end_time_step=round(et,3)
    181222
    182223   t = f->time(start_time_step:end_time_step)
     
    266307      plot_splptz  = gsn_csm_xy(wks_ps,t,data_0(:),res)
    267308   end if
    268  
     309
     310   count_var=0
    269311   do varn = dim-1,0,1
    270312
     
    284326     
    285327      if(check) then
    286        
     328         count_var=count_var+1
     329
    287330         data_all = f ->$vNam(varn)$
    288331         unit(varn) = data_all@units
     
    432475   end do
    433476
     477   if (count_var .EQ. 0) then
     478      print(" ")
     479      print("Please select a variable 'var=' or use the default value")
     480      print(" ")
     481      print("Your selection '"+var+"' does not exist on the input file")
     482      print(" ")
     483      exit
     484   end if
     485
    434486   do varn = dim-1,0,1
    435487     
     
    457509            res@tiXAxisFontHeightF   = 0.07
    458510            res@txFontHeightF        = 0.07
    459             res@tiYAxisFontHeightF   = 0.07
    460             res@xyLabelMode          = "Custom"
    461            
     511            res@tiYAxisFontHeightF   = 0.07           
    462512
    463513            if (vNam(varn) .EQ. "E")
    464514               E=0
    465515               res@xyLineColors     = (/237/)
    466                res@xyExplicitLabels =  "E"
    467516               res@xyLineLabelFontHeightF = 0.05
    468517               res@xyLineLabelFontColor   = 237
     
    474523               Es=0
    475524               res@xyLineColors            = (/144/)
    476                res@xyExplicitLabels =  "Es"
    477525               res@xyLineLabelFontHeightF = 0.05
    478526               res@xyLineLabelFontColor   = 144
     
    483531               us=0
    484532               res@xyLineColors            = (/237/)
    485                res@xyExplicitLabels =  "us"
    486533               res@xyLineLabelFontHeightF = 0.05
    487534               res@xyLineLabelFontColor   = 237
     
    493540               ws=0
    494541               res@xyLineColors            = (/144/)
    495                res@xyExplicitLabels =  "ws"
    496542               res@xyLineLabelFontHeightF = 0.05
    497543               res@xyLineLabelFontColor   = 144
     
    502548               u=0
    503549               res@xyLineColors            = (/237/)
    504                res@xyExplicitLabels =  "umax"
    505550               res@xyLineLabelFontHeightF = 0.05
    506551               res@xyLineLabelFontColor   = 237
     
    512557               v=0
    513558               res@xyLineColors            = (/144/)
    514                res@xyExplicitLabels =  "vmax"
    515559               res@xyLineLabelFontHeightF = 0.05
    516560               res@xyLineLabelFontColor   = 144
     
    520564               w=0
    521565               res@xyLineColors            = (/80/)
    522                res@xyExplicitLabels =  "wmax"
    523566               res@xyLineLabelFontHeightF = 0.05
    524567               res@xyLineLabelFontColor   = 80
     
    529572               zw=0
    530573               res@xyLineColors            = (/237/)
    531                res@xyExplicitLabels =  "z_i_wpt"
    532574               res@xyLineLabelFontHeightF = 0.05
    533575               res@xyLineLabelFontColor   = 237
     
    539581               z=0
    540582               res@xyLineColors            = (/144/) 
    541                res@xyExplicitLabels =  "z_i_pt"
    542583               res@xyLineLabelFontHeightF = 0.05
    543584               res@xyLineLabelFontColor   = 144
     
    548589               w0=0
    549590               res@xyLineColors            = (/237/)
    550                res@xyExplicitLabels =  "wpptp0"
    551591               res@xyLineLabelFontHeightF = 0.05
    552592               res@xyLineLabelFontColor   = 237
     
    558598               wp=0
    559599               res@xyLineColors            = (/144/)
    560                res@xyExplicitLabels =  "wpptp"
    561600               res@xyLineLabelFontHeightF = 0.05
    562601               res@xyLineLabelFontColor   = 144
     
    566605               wt=0
    567606               res@xyLineColors            = (/80/)
    568                res@xyExplicitLabels =  "wpt"
    569607               res@xyLineLabelFontHeightF = 0.05
    570608               res@xyLineLabelFontColor   = 80
     
    575613               p=0
    576614               res@xyLineColors            = (/237/)
    577                res@xyExplicitLabels =  "pt_0_"
    578615               res@xyLineLabelFontHeightF = 0.05
    579616               res@xyLineLabelFontColor   = 237
     
    585622               pz=0
    586623               res@xyLineColors            = (/144/)
    587                res@xyExplicitLabels =  "pt_zp_"
    588624               res@xyLineLabelFontHeightF = 0.05
    589625               res@xyLineLabelFontColor   = 144
     
    594630               x=0
    595631               res@xyLineColors            = (/237/)
    596                res@xyExplicitLabels =  "splptx"
    597632               res@xyLineLabelFontHeightF = 0.05
    598633               res@xyLineLabelFontColor   = 237
     
    604639               y=0
    605640               res@xyLineColors            = (/144/)
    606                res@xyExplicitLabels =  "splpty"
    607641               res@xyLineLabelFontHeightF = 0.05
    608642               res@xyLineLabelFontColor   = 144
     
    612646               z=0
    613647               res@xyLineColors            = (/80/)
    614                res@xyExplicitLabels =  "splptz"
    615648               res@xyLineLabelFontHeightF = 0.05
    616649               res@xyLineLabelFontColor   = 80
     
    645678               overlay(plot_E,plot_Es)
    646679               n=n+1
    647                plot_ps(n) = plot_E               
     680               plot_ps(n) = plot_E   
     681
     682               ; ***************************************************
     683               ; legend for combined plot
     684               ; ***************************************************
     685     
     686               lgres                    = True
     687               lgMonoDashIndex          = False
     688               lgres@lgLabelFont        = "helvetica"   
     689               lgres@lgLabelFontHeightF = .1           
     690               lgres@vpWidthF           = 0.4           
     691               lgres@vpHeightF          = 0.4         
     692               lgres@lgDashIndexes      = (/0,0,0/)
     693               lgres@lgLineColors       = (/237,144,80/)
     694               lbid = gsn_create_legend(wks_ps,2,(/"E","Es"/),lgres)       
     695
     696               amres = True
     697               amres@amParallelPosF   = 0.6                 
     698               amres@amOrthogonalPosF = -0.2           
     699               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)           
    648700            end if
    649701            if (vNam(varn) .EQ. "Es" .AND. E .NE. 1) then
     
    651703               overlay(plot_E,plot_Es)
    652704               n=n+1
    653                plot_ps(n) = plot_E           
     705               plot_ps(n) = plot_E 
     706
     707               ; ***************************************************
     708               ; legend for combined plot
     709               ; ***************************************************
     710     
     711               lgres                    = True
     712               lgMonoDashIndex          = False
     713               lgres@lgLabelFont        = "helvetica"   
     714               lgres@lgLabelFontHeightF = .1           
     715               lgres@vpWidthF           = 0.4           
     716               lgres@vpHeightF          = 0.4         
     717               lgres@lgDashIndexes      = (/0,0,0/)
     718               lgres@lgLineColors       = (/237,144,80/)
     719               lbid = gsn_create_legend(wks_ps,2,(/"E","Es"/),lgres)       
     720
     721               amres = True
     722               amres@amParallelPosF   = 0.6                 
     723               amres@amOrthogonalPosF = -0.2           
     724               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)         
    654725            end if
    655726
     
    659730               n=n+1
    660731               plot_ps(n) = plot_us
     732
     733               ; ***************************************************
     734               ; legend for combined plot
     735               ; ***************************************************
     736     
     737               lgres                    = True
     738               lgMonoDashIndex          = False
     739               lgres@lgLabelFont        = "helvetica"   
     740               lgres@lgLabelFontHeightF = .1           
     741               lgres@vpWidthF           = 0.4           
     742               lgres@vpHeightF          = 0.4         
     743               lgres@lgDashIndexes      = (/0,0,0/)
     744               lgres@lgLineColors       = (/237,144,80/)
     745               lbid = gsn_create_legend(wks_ps,2,(/"us","ws"/),lgres)       
     746
     747               amres = True
     748               amres@amParallelPosF   = 0.6                 
     749               amres@amOrthogonalPosF = -0.2           
     750               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    661751            end if
    662752            if (vNam(varn) .EQ. "ws" .AND. us .NE. 1) then
     
    665755               n=n+1
    666756               plot_ps(n) = plot_us
     757
     758               ; ***************************************************
     759               ; legend for combined plot
     760               ; ***************************************************
     761     
     762               lgres                    = True
     763               lgMonoDashIndex          = False
     764               lgres@lgLabelFont        = "helvetica"   
     765               lgres@lgLabelFontHeightF = .1           
     766               lgres@vpWidthF           = 0.4           
     767               lgres@vpHeightF          = 0.4         
     768               lgres@lgDashIndexes      = (/0,0,0/)
     769               lgres@lgLineColors       = (/237,144,80/)
     770               lbid = gsn_create_legend(wks_ps,2,(/"us","ws"/),lgres)       
     771
     772               amres = True
     773               amres@amParallelPosF   = 0.6                 
     774               amres@amOrthogonalPosF = -0.2           
     775               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    667776            end if
    668777         
     
    674783                  n=n+1
    675784                  plot_ps(n) = plot_umax
     785
     786                  ; ***************************************************
     787                  ; legend for combined plot
     788                  ; ***************************************************
     789     
     790                  lgres                    = True
     791                  lgMonoDashIndex          = False
     792                  lgres@lgLabelFont        = "helvetica"   
     793                  lgres@lgLabelFontHeightF = .1           
     794                  lgres@vpWidthF           = 0.4           
     795                  lgres@vpHeightF          = 0.4         
     796                  lgres@lgDashIndexes      = (/0,0,0/)
     797                  lgres@lgLineColors       = (/237,144,80/)
     798                  lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres)       
     799
     800                  amres = True
     801                  amres@amParallelPosF   = 0.6             
     802                  amres@amOrthogonalPosF = -0.2           
     803                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    676804               end if
    677805            end if
     
    683811                  n=n+1
    684812                  plot_ps(n) = plot_umax
     813
     814                  ; ***************************************************
     815                  ; legend for combined plot
     816                  ; ***************************************************
     817     
     818                  lgres                    = True
     819                  lgMonoDashIndex          = False
     820                  lgres@lgLabelFont        = "helvetica"   
     821                  lgres@lgLabelFontHeightF = .1         
     822                  lgres@vpWidthF           = 0.4           
     823                  lgres@vpHeightF          = 0.4         
     824                  lgres@lgDashIndexes      = (/0,0,0/)
     825                  lgres@lgLineColors       = (/237,144,80/)
     826                  lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres)       
     827
     828                  amres = True
     829                  amres@amParallelPosF   = 0.6             
     830                  amres@amOrthogonalPosF = -0.2           
     831                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    685832               end if
    686833            end if
     
    692839                  n=n+1
    693840                  plot_ps(n) = plot_umax
     841
     842                  ; ***************************************************
     843                  ; legend for combined plot
     844                  ; ***************************************************
     845     
     846                  lgres                    = True
     847                  lgMonoDashIndex          = False
     848                  lgres@lgLabelFont        = "helvetica"   
     849                  lgres@lgLabelFontHeightF = .1           
     850                  lgres@vpWidthF           = 0.4           
     851                  lgres@vpHeightF          = 0.4         
     852                  lgres@lgDashIndexes      = (/0,0,0/)
     853                  lgres@lgLineColors       = (/237,144,80/)
     854                  lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres)       
     855
     856                  amres = True
     857                  amres@amParallelPosF   = 0.6             
     858                  amres@amOrthogonalPosF = -0.2           
     859                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    694860               end if
    695861            end if
     
    699865               overlay(plot_z_i_wpt,plot_z_i_pt)
    700866               n=n+1
    701                plot_ps(n) = plot_z_i_wpt           
     867               plot_ps(n) = plot_z_i_wpt
     868       
     869               ; ***************************************************
     870               ; legend for combined plot
     871               ; ***************************************************
     872     
     873               lgres                    = True
     874               lgMonoDashIndex          = False
     875               lgres@lgLabelFont        = "helvetica"   
     876               lgres@lgLabelFontHeightF = .1           
     877               lgres@vpWidthF           = 0.4           
     878               lgres@vpHeightF          = 0.4         
     879               lgres@lgDashIndexes      = (/0,0,0/)
     880               lgres@lgLineColors       = (/237,144,80/)
     881               lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres)       
     882
     883               amres = True
     884               amres@amParallelPosF   = 0.6                 
     885               amres@amOrthogonalPosF = -0.2           
     886               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)         
    702887            end if
    703888            if (vNam(varn) .EQ. "z_i_pt" .AND. zw .NE. 1) then
     
    705890               overlay(plot_z_i_wpt,plot_z_i_pt)
    706891               n=n+1
    707                plot_ps(n) = plot_z_i_wpt           
     892               plot_ps(n) = plot_z_i_wpt
     893
     894               ; ***************************************************
     895               ; legend for combined plot
     896               ; ***************************************************
     897     
     898               lgres                    = True
     899               lgMonoDashIndex          = False
     900               lgres@lgLabelFont        = "helvetica"   
     901               lgres@lgLabelFontHeightF = .1           
     902               lgres@vpWidthF           = 0.4           
     903               lgres@vpHeightF          = 0.4         
     904               lgres@lgDashIndexes      = (/0,0,0/)
     905               lgres@lgLineColors       = (/237,144,80/)
     906               lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres)       
     907
     908               amres = True
     909               amres@amParallelPosF   = 0.6                 
     910               amres@amOrthogonalPosF = -0.2           
     911               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)           
    708912            end if   
    709913         
     
    715919                  n=n+1
    716920                  plot_ps(n) = plot_wpptp0
     921
     922                  ; ***************************************************
     923                  ; legend for combined plot
     924                  ; ***************************************************
     925     
     926                  lgres                    = True
     927                  lgMonoDashIndex          = False
     928                  lgres@lgLabelFont        = "helvetica"   
     929                  lgres@lgLabelFontHeightF = .1           
     930                  lgres@vpWidthF           = 0.4           
     931                  lgres@vpHeightF          = 0.4         
     932                  lgres@lgDashIndexes      = (/0,0,0/)
     933                  lgres@lgLineColors       = (/237,144,80/)
     934                  lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)       
     935
     936                  amres = True
     937                  amres@amParallelPosF   = 0.6             
     938                  amres@amOrthogonalPosF = -0.2           
     939                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    717940               end if           
    718941            end if
     
    723946                 overlay(plot_wpptp0,plot_wpt)
    724947                 n=n+1
    725                  plot_ps(n) = plot_wpptp0 
     948                 plot_ps(n) = plot_wpptp0
     949                 
     950                 ; ***************************************************
     951                  ; legend for combined plot
     952                  ; ***************************************************
     953     
     954                  lgres                    = True
     955                  lgMonoDashIndex          = False
     956                  lgres@lgLabelFont        = "helvetica"   
     957                  lgres@lgLabelFontHeightF = .1           
     958                  lgres@vpWidthF           = 0.4           
     959                  lgres@vpHeightF          = 0.4         
     960                  lgres@lgDashIndexes      = (/0,0,0/)
     961                  lgres@lgLineColors       = (/237,144,80/)
     962                  lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)       
     963
     964                  amres = True
     965                  amres@amParallelPosF   = 0.6             
     966                  amres@amOrthogonalPosF = -0.2           
     967                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 
    726968               end if           
    727969            end if
     
    732974                  overlay(plot_wpptp0,plot_wpt)
    733975                  n=n+1
    734                   plot_ps(n) = plot_wpptp0             
     976                  plot_ps(n) = plot_wpptp0
     977
     978                  ; ***************************************************
     979                  ; legend for combined plot
     980                  ; ***************************************************
     981     
     982                  lgres                    = True
     983                  lgMonoDashIndex          = False
     984                  lgres@lgLabelFont        = "helvetica"   
     985                  lgres@lgLabelFontHeightF = .1           
     986                  lgres@vpWidthF           = 0.4           
     987                  lgres@vpHeightF          = 0.4         
     988                  lgres@lgDashIndexes      = (/0,0,0/)
     989                  lgres@lgLineColors       = (/237,144,80/)
     990                  lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)       
     991
     992                  amres = True
     993                  amres@amParallelPosF   = 0.6             
     994                  amres@amOrthogonalPosF = -0.2           
     995                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    735996               end if
    736997            end if
     
    7401001               overlay(plot_pt_0_,plot_pt_zp_)
    7411002               n=n+1
    742                plot_ps(n) = plot_pt_0_           
     1003               plot_ps(n) = plot_pt_0_ 
     1004     
     1005               ; ***************************************************
     1006               ; legend for combined plot
     1007               ; ***************************************************
     1008     
     1009               lgres                    = True
     1010               lgMonoDashIndex          = False
     1011               lgres@lgLabelFont        = "helvetica"   
     1012               lgres@lgLabelFontHeightF = .1           
     1013               lgres@vpWidthF           = 0.4           
     1014               lgres@vpHeightF          = 0.4         
     1015               lgres@lgDashIndexes      = (/0,0,0/)
     1016               lgres@lgLineColors       = (/237,144,80/)
     1017               lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)       
     1018
     1019               amres = True
     1020               amres@amParallelPosF   = 0.6                 
     1021               amres@amOrthogonalPosF = -0.2           
     1022               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    7431023            end if
    7441024            if (vNam(varn) .EQ. "pt_zp_" .AND. p .NE. 1) then
     
    7461026               overlay(plot_pt_0_,plot_pt_zp_)
    7471027               n=n+1
    748                plot_ps(n) = plot_pt_0_           
     1028               plot_ps(n) = plot_pt_0_   
     1029
     1030               ; ***************************************************
     1031               ; legend for combined plot
     1032               ; ***************************************************
     1033     
     1034               lgres                    = True
     1035               lgMonoDashIndex          = False
     1036               lgres@lgLabelFont        = "helvetica"   
     1037               lgres@lgLabelFontHeightF = .1           
     1038               lgres@vpWidthF           = 0.4           
     1039               lgres@vpHeightF          = 0.4         
     1040               lgres@lgDashIndexes      = (/0,0,0/)
     1041               lgres@lgLineColors       = (/237,144,80/)
     1042               lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)       
     1043
     1044               amres = True
     1045               amres@amParallelPosF   = 0.6                 
     1046               amres@amOrthogonalPosF = -0.2           
     1047               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    7491048            end if
    7501049           
     
    7551054                  overlay(plot_splptx,plot_splptz)
    7561055                  n=n+1
    757                   plot_ps(n) = plot_splptx           
     1056                  plot_ps(n) = plot_splptx   
     1057
     1058                  ; ***************************************************
     1059                  ; legend for combined plot
     1060                  ; ***************************************************
     1061     
     1062                  lgres                    = True
     1063                  lgMonoDashIndex          = False
     1064                  lgres@lgLabelFont        = "helvetica"   
     1065                  lgres@lgLabelFontHeightF = .1           
     1066                  lgres@vpWidthF           = 0.4           
     1067                  lgres@vpHeightF          = 0.4         
     1068                  lgres@lgDashIndexes      = (/0,0,0/)
     1069                  lgres@lgLineColors       = (/237,144,80/)
     1070                  lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres)       
     1071
     1072                  amres = True
     1073                  amres@amParallelPosF   = 0.6             
     1074                  amres@amOrthogonalPosF = -0.2           
     1075                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    7581076               end if
    7591077            end if
     
    7651083                  n=n+1
    7661084                  plot_ps(n) = plot_splptx
     1085
     1086                  ; ***************************************************
     1087                  ; legend for combined plot
     1088                  ; ***************************************************
     1089     
     1090                  lgres                    = True
     1091                  lgMonoDashIndex          = False
     1092                  lgres@lgLabelFont        = "helvetica"   
     1093                  lgres@lgLabelFontHeightF = .1           
     1094                  lgres@vpWidthF           = 0.4           
     1095                  lgres@vpHeightF          = 0.4         
     1096                  lgres@lgDashIndexes      = (/0,0,0/)
     1097                  lgres@lgLineColors       = (/237,144,80/)
     1098                  lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres)       
     1099
     1100                  amres = True
     1101                  amres@amParallelPosF   = 0.6             
     1102                  amres@amOrthogonalPosF = -0.2           
     1103                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    7671104               end if           
    7681105            end if
     
    7731110                  overlay(plot_splptx,plot_splptz)
    7741111                  n=n+1
    775                   plot_ps(n) = plot_splptx   
     1112                  plot_ps(n) = plot_splptx 
     1113
     1114                  ; ***************************************************
     1115                  ; legend for combined plot
     1116                  ; ***************************************************
     1117     
     1118                  lgres                    = True
     1119                  lgMonoDashIndex          = False
     1120                  lgres@lgLabelFont        = "helvetica"   
     1121                  lgres@lgLabelFontHeightF = .1           
     1122                  lgres@vpWidthF           = 0.4           
     1123                  lgres@vpHeightF          = 0.4         
     1124                  lgres@lgDashIndexes      = (/0,0,0/)
     1125                  lgres@lgLineColors       = (/237,144,80/)
     1126                  lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres)       
     1127
     1128                  amres = True
     1129                  amres@amParallelPosF   = 0.6             
     1130                  amres@amOrthogonalPosF = -0.2           
     1131                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    7761132               end if       
    7771133            end if
     
    8401196   ; merge plots onto one page
    8411197   ; ***************************************************
    842   
     1198 
    8431199   if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then
    8441200      gsn_panel(wks_ps,plot_ps(1:n),(/n,1/),resP)
Note: See TracChangeset for help on using the changeset viewer.