Index: /palm/trunk/SCRIPTS/NCL/profiles.ncl
===================================================================
--- /palm/trunk/SCRIPTS/NCL/profiles.ncl	(revision 249)
+++ /palm/trunk/SCRIPTS/NCL/profiles.ncl	(revision 250)
@@ -441,5 +441,5 @@
             else
                if(vNam(varn) .EQ. "vpt" .OR. isStrSubset(vNam(varn), "vpt_"))then
-                  z_u = f->$vNam(varn+1)$
+                  z_u = f_att->$vNam(varn+1)$
                   break
                else
@@ -812,11 +812,4 @@
    
    delta_t=t_all(nt-1)/nt
-   
-   
-   print(nt)
-   print(t_all)
-   
-   
-   ;exit
 
    ; ****************************************************	
@@ -946,5 +939,5 @@
    res@pmLegendOrthogonalPosF  = -1.0
    res@pmLegendWidthF          = 0.12
-   res@pmLegendHeightF         = 0.04*(end_time_step-start_time_step+1)
+   res@pmLegendHeightF         = 0.05*(end_time_step-start_time_step+1)
    res@lgLabelFontHeightF     = font_size
    res@lgTitleString      = "Time [h]"
@@ -957,5 +950,5 @@
    res@tiXAxisString      = " " 
    if ( black .eq. 0 ) then  
-      res@xyLineColors = ispan(2,237,235/np)
+      res@xyLineColors = -(ispan(-237,-2,235/np))
    end if
    if (norm_z .EQ. 1)then
@@ -972,4 +965,5 @@
       res@xyMonoDashPattern       = True 
    else
+      res@xyMonoDashPattern       = False
       if (no_files .GT. 1)
          res@xyMonoDashPattern       = True  
@@ -979,5 +973,5 @@
       end if       
    end if 
-   
+
    res@tmXBMinorPerMajor = 4
    res@tmYLMinorPerMajor = 4
@@ -1404,6 +1398,7 @@
    n_o=0
    count_var=0
+
    res@xyDashPattern = 1*nof
-
+   
    do varn = 0,dim-1 
 
@@ -1579,6 +1574,6 @@
             end if         
             plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)  
-         end if       
-         
+         end if  
+
             if (vNam(varn) .EQ. "u") then 
                miniu=min(data(varn,:,:))
@@ -1608,4 +1603,5 @@
                maxiv=max(data(varn,:,:))
                if (over .EQ. 1) then
+                  res@xyMonoDashPattern = True
                   res@xyDashPattern  = 1
                   plot_v = gsn_csm_xy(wks,data(varn,:,:),z,res)
@@ -1631,5 +1627,5 @@
                maxiw=max(data(varn,:,:))
                if (over .EQ. 1) then
-                  res@xyDashPattern  = 2
+                  res@xyDashPattern = 2
                   plot_w = gsn_csm_xy(wks,data(varn,:,:),z,res)
                else
@@ -2802,7 +2798,7 @@
             if (prof3d .EQ. 0) then
                if (log_z .EQ. 1) then
-                  z = f->$vNam(varn+1)$(1:dimz-1) 
-               else
-                  z = f->$vNam(varn+1)$               
+                  z = f_att->$vNam(varn+1)$(1:dimz-1) 
+               else
+                  z = f_att->$vNam(varn+1)$               
                end if
             else 
@@ -2835,4 +2831,6 @@
             res@trYMinF            = min_z
             res@trYMaxF            = max_z  
+	    res@xyDashPattern = 0
+
             if (xs .EQ. -1) then 
                res@trXMinF = min(data(varn,:,:))
@@ -2862,4 +2860,10 @@
                      res@trXMaxF = xe  
                   end if  
+		  if (vNam(varn) .EQ. "v")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "w")then
+		     res@xyDashPattern = 2
+		  end if
                   plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
 
@@ -2872,6 +2876,6 @@
                   lgres@lgLabelFont        = "helvetica"    
                   lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
+                  lgres@vpWidthF           = 0.06           
+                  lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
                   lbid = gsn_create_legend(wks,3,(/"u","v","w"/),lgres)       
@@ -2906,5 +2910,691 @@
                      res@trXMaxF = xe  
                   end if
-
+                  if (vNam(varn) .EQ. "vpt")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "lpt")then
+		     res@xyDashPattern = 2
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend          
+                  lgres@vpWidthF           = 0.07           
+                  lgres@vpHeightF          = 0.12          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"pt","vpt","lpt"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_pt)
+                  pt=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue       
+               end if
+            end if            
+            if (vNam(varn) .EQ. "q" .OR. vNam(varn) .EQ. "qv" .OR. vNam(varn) .EQ. "ql") then
+               if (q .EQ. 0) then
+                  res@gsnLeftString      = "q, qv and ql"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/miniq,miniqv,miniql/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxiq,maxiqv,maxiql/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if 
+                  if (vNam(varn) .EQ. "qv")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "ql")then
+		     res@xyDashPattern = 2
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend            
+                  lgres@vpWidthF           = 0.06          
+                  lgres@vpHeightF          = 0.12          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"q","qv","ql"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_q)
+                  q=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue   
+               end if
+            end if    
+           
+            if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es") then
+               if (e .EQ. 0) then
+                  res@gsnLeftString      = "e and es"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/minie,minies/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxie,maxies/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if 
+		  if (vNam(varn) .EQ. "es")then
+		     res@xyDashPattern = 1
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend           
+                  lgres@vpWidthF           = 0.06           
+                  lgres@vpHeightF          = 0.08          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,2,(/"e","es"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_e)
+                  e=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue   
+               end if
+            end if            
+            if (vNam(varn) .EQ. "km" .OR. vNam(varn) .EQ. "kh") then
+               if (km .EQ. 0) then
+                  res@gsnLeftString      = "km and kh"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/minikm,minikh/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxikm,maxikh/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if 
+                  if (vNam(varn) .EQ. "kh")then
+		     res@xyDashPattern = 1
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend           
+                  lgres@vpWidthF           = 0.06           
+                  lgres@vpHeightF          = 0.08          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,2,(/"km","kh"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_km) 
+                  km=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue   
+               end if
+            end if           
+           
+            if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "wu") then
+               if (wpup .EQ. 0) then
+                  res@gsnLeftString      = "wpup, wsus and wu"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/miniwpup,miniwsus,miniwu/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxiwpup,maxiwsus,maxiwu/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if  
+                  if (vNam(varn) .EQ. "wsus")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "wu")then
+		     res@xyDashPattern = 2
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend            
+                  lgres@vpWidthF           = 0.08           
+                  lgres@vpHeightF          = 0.12          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"wpup","wsus","wu"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_wpup)
+                  wpup=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue    
+               end if
+            end if
+            if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR.vNam(varn) .EQ. "wv") then
+               if (wpvp .EQ. 0) then
+                  res@gsnLeftString      = "wpvp, wsvs and wv"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/miniwpvp,miniwsvs,miniwv/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxiwpvp,maxiwsvs,maxiwv/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if
+		  if (vNam(varn) .EQ. "wsvs")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "wv")then
+		     res@xyDashPattern = 2
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend            
+                  lgres@vpWidthF           = 0.08          
+                  lgres@vpHeightF          = 0.12          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"wpvp","wsvs","wv"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_wpvp)
+                  wpvp=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue   
+               end if
+            end if
+            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "wpt") then
+               if (wpptp .EQ. 0) then
+                  res@gsnLeftString      = "wpptp, wspts and wpt"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/miniwpptp,miniwspts,miniwpt/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxiwpptp,maxiwspts,maxiwpt/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if 
+                  if (vNam(varn) .EQ. "wspts")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "wpt")then
+		     res@xyDashPattern = 2
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend            
+                  lgres@vpWidthF           = 0.09           
+                  lgres@vpHeightF          = 0.12          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"wpptp","wspts","wpt"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_wpptp)
+                  wpptp=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue    
+               end if
+            end if
+            if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC") then
+               if (wsptsBC .EQ. 0) then
+                  res@gsnLeftString      = "wsptsBC and wptBC"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/miniwsptsBC,miniwptBC/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if 
+                  if (vNam(varn) .EQ. "wptBC")then
+		     res@xyDashPattern = 1
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend            
+                  lgres@vpWidthF           = 0.1           
+                  lgres@vpHeightF          = 0.12          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"wsptsBC","wptBC"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_wsptsBC)
+                  wsptsBC=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue   
+               end if  
+            end if             
+            if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. vNam(varn) .EQ. "wvpt") then
+               if (wpvptp .EQ. 0) then
+                  res@gsnLeftString      = "wpvptp, wsvpts and wvpt"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if 
+		  if (vNam(varn) .EQ. "wsvpts")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "wvpt")then
+		     res@xyDashPattern = 2
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend            
+                  lgres@vpWidthF           = 0.1           
+                  lgres@vpHeightF          = 0.12          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"wpvptp","wsvpts","wvpt"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_wpvptp)
+                  wpvptp=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue   
+               end if
+            end if
+            if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR. vNam(varn) .EQ. "wq") then
+               if (wpqp .EQ. 0) then 
+                  res@gsnLeftString      = "wpqp, wsqs and wq"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if  
+		  if (vNam(varn) .EQ. "wsqs")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "wq")then
+		     res@xyDashPattern = 2
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend           
+                  lgres@vpWidthF           = 0.08           
+                  lgres@vpHeightF          = 0.12          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"wpqp","wsqs","wq"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_wpqp)
+                  wpqp=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if 
+                  continue   
+               end if
+            end if
+            if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR. vNam(varn) .EQ. "wqv") then
+               if (wpqvp .EQ. 0) then
+                  res@gsnLeftString      = "wpqvp, wsqvs and wqv"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if 
+		  if (vNam(varn) .EQ. "wsqvs")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "wqv")then
+		     res@xyDashPattern = 2
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend            
+                  lgres@vpWidthF           = 0.09           
+                  lgres@vpHeightF          = 0.12         
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"wpqvp","wsqvs","wqv"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_wpqvp) 
+                  wpqvp=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue   
+               end if
+            end if
+            if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR. vNam(varn) .EQ. "ws") then
+               if (wpsp .EQ. 0) then
+                  res@gsnLeftString      = "wpsp, wsss and ws"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/miniwpsp,miniwsss,miniws/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if 
+                  if (vNam(varn) .EQ. "wsss")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "ws")then
+		     res@xyDashPattern = 2
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend            
+                  lgres@vpWidthF           = 0.08           
+                  lgres@vpHeightF          = 0.12          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"wpsp","wsss","ws"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_wpsp)
+                  wpsp=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue   
+               end if
+            end if 
+            if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR. vNam(varn) .EQ. "wsa") then
+               if (wpsap .EQ. 0) then
+                  res@gsnLeftString      = "wpsap, wssas and wsa"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if 
+                  if (vNam(varn) .EQ. "wssas")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "wsa")then
+		     res@xyDashPattern = 2
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend            
+                  lgres@vpWidthF           = 0.09           
+                  lgres@vpHeightF          = 0.12          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"wpsap","wssas","wsa"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_wpsap)
+                  wpsap=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue   
+               end if
+            end if
+          
+            if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "ws2") then
+               if (us2 .EQ. 0) then
+                  res@gsnLeftString      = "us2, vs2 and ws2"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/minius2,minivs2,miniws2/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxius2,maxivs2,maxiws2/))
+		  else 
+                     res@trXMaxF = xe  
+                  end if 
+		  if (vNam(varn) .EQ. "vs2")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "ws2")then
+		     res@xyDashPattern = 2
+		  end if
+                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+                  ; ***************************************************
+                  ; legend for combined plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = font_size_legend            
+                  lgres@vpWidthF           = 0.07           
+                  lgres@vpHeightF          = 0.12          
+                  lgres@lgDashIndexes      = (/0,1,2/)
+                  lbid = gsn_create_legend(wks,3,(/"us2","vs2","ws2"/),lgres)       
+
+                  amres = True
+                  amres@amParallelPosF   = 0.65		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  overlay(plot(n),plot_us2)
+                  us2=1
+               else
+                  if (prof3d .EQ. 0)then
+                     varn=varn+1
+                  end if
+                  continue   
+               end if
+            end if
+           
+            if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "wpeodz" ) then
+               if (wsususodz .EQ. 0) then 
+                  res@gsnLeftString      = "wsususodz, wspsodz and wpeodz"
+		  res@tiXAxisString      = "["+unit(varn)+"]"
+                  res@gsnRightString     = " "
+                  if (xs .EQ. -1) then
+                     res@trXMinF = min((/miniwsususodz,miniwspsodz,miniwpeodz/))
+                  else 
+                     res@trXMinF = xs
+                  end if
+                  if (xe .EQ. -1) then
+                     res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,maxiwpeodz/))
+                  else 
+                     res@trXMaxF = xe  
+                  end if 
+		  if (vNam(varn) .EQ. "wspsodz")then
+		     res@xyDashPattern = 1
+		  end if
+		  if (vNam(varn) .EQ. "wpeodz")then
+		     res@xyDashPattern = 2
+		  end if
                   plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
 
@@ -2918,625 +3608,5 @@
                   lgres@lgLabelFontHeightF = font_size_legend           
                   lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"pt","vpt","lpt"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_pt)
-                  pt=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue       
-               end if
-            end if            
-            if (vNam(varn) .EQ. "q" .OR. vNam(varn) .EQ. "qv" .OR. vNam(varn) .EQ. "ql") then
-               if (q .EQ. 0) then
-                  res@gsnLeftString      = "q, qv and ql"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniq,miniqv,miniql/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiq,maxiqv,maxiql/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if 
-
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"q","qv","ql"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_q)
-                  q=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue   
-               end if
-            end if    
-           
-            if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es") then
-               if (e .EQ. 0) then
-                  res@gsnLeftString      = "e and es"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/minie,minies/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxie,maxies/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if 
-		  
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend           
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"e","es"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_e)
-                  e=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue   
-               end if
-            end if            
-            if (vNam(varn) .EQ. "km" .OR. vNam(varn) .EQ. "kh") then
-               if (km .EQ. 0) then
-                  res@gsnLeftString      = "km and kh"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/minikm,minikh/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxikm,maxikh/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if 
-
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend           
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"km","kh"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_km) 
-                  km=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue   
-               end if
-            end if           
-           
-            if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "wu") then
-               if (wpup .EQ. 0) then
-                  res@gsnLeftString      = "wpup, wsus and wu"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniwpup,miniwsus,miniwu/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiwpup,maxiwsus,maxiwu/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if  
-
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"wpup","wsus","wu"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_wpup)
-                  wpup=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue    
-               end if
-            end if
-            if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR.vNam(varn) .EQ. "wv") then
-               if (wpvp .EQ. 0) then
-                  res@gsnLeftString      = "wpvp, wsus and wv"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniwpvp,miniwsvs,miniwv/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiwpvp,maxiwsvs,maxiwv/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if
-		  
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"wpvp","wsvs","wv"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_wpvp)
-                  wpup=0
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue   
-               end if
-            end if
-            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "wpt") then
-               if (wpptp .EQ. 0) then
-                  res@gsnLeftString      = "wpptp, wspts and wv"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniwpptp,miniwspts,miniwpt/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiwpptp,maxiwspts,maxiwpt/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if 
-
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"wpptp","wspts","wpt"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_wpptp)
-                  wpptp=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue    
-               end if
-            end if
-            if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC") then
-               if (wsptsBC .EQ. 0) then
-                  res@gsnLeftString      = "wsptsBC and wptBC"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniwsptsBC,miniwptBC/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if 
-
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"wsptsBC","wptBC"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_wsptsBC)
-                  wsptsBC=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue   
-               end if  
-            end if             
-            if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. vNam(varn) .EQ. "wvpt") then
-               if (wpvptp .EQ. 0) then
-                  res@gsnLeftString      = "wpvptp, wsvpts and wv"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if 
-		  
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"wpvptp","wsvpts","wvpt"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_wpvptp)
-                  wpvptp=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue   
-               end if
-            end if
-            if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR. vNam(varn) .EQ. "wq") then
-               if (wpqp .EQ. 0) then 
-                  res@gsnLeftString      = "wpqp, wsqs and wq"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if  
-		  
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend           
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"wpqp","wsqs","wq"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_wpqp)
-                  wpqp=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if 
-                  continue   
-               end if
-            end if
-            if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR. vNam(varn) .EQ. "wqv") then
-               if (wpqvp .EQ. 0) then
-                  res@gsnLeftString      = "wpqvp, wsqvs and wqv"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if 
-		  
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"wpqvp","wsqvs","wqv"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_wpqvp) 
-                  wpqvp=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue   
-               end if
-            end if
-            if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR. vNam(varn) .EQ. "ws") then
-               if (wpsp .EQ. 0) then
-                  res@gsnLeftString      = "wpsp, wsss and ws"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniwpsp,miniwsss,miniws/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if 
-
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"wpsp","wsss","ws"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_wpsp)
-                  wpsp=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue   
-               end if
-            end if 
-            if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR. vNam(varn) .EQ. "wsa") then
-               if (wpsap .EQ. 0) then
-                  res@gsnLeftString      = "wpsap, wssas and wsa"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if 
-
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"wpsap","wssas","wsa"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_wpsap)
-                  wpsap=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue   
-               end if
-            end if
-          
-            if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "ws2") then
-               if (us2 .EQ. 0) then
-                  res@gsnLeftString      = "us2, vs2 and ws2"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/minius2,minivs2,miniws2/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxius2,maxivs2,maxiws2/))
-		  else 
-                     res@trXMaxF = xe  
-                  end if 
-		  
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
-                  lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"us2","vs2","ws2"/),lgres)       
-
-                  amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
-                  overlay(plot(n),plot_us2)
-                  us2=1
-               else
-                  if (prof3d .EQ. 0)then
-                     varn=varn+1
-                  end if
-                  continue   
-               end if
-            end if
-           
-            if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "wpeodz" ) then
-               if (wsususodz .EQ. 0) then 
-                  res@gsnLeftString      = "wsususodz, wspsodz and ws2"
-		  res@tiXAxisString      = "["+unit(varn)+"]"
-                  res@gsnRightString     = " "
-                  if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniwsususodz,miniwspsodz,miniwpeodz/))
-                  else 
-                     res@trXMinF = xs
-                  end if
-                  if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,maxiwpeodz/))
-                  else 
-                     res@trXMaxF = xe  
-                  end if 
-		  
-                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
-
-                  ; ***************************************************
-                  ; legend for combined plot
-                  ; ***************************************************
-      
-                  lgres                    = True
-                  lgMonoDashIndex          = False
-                  lgres@lgLabelFont        = "helvetica"    
-                  lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.12           
-                  lgres@vpHeightF          = 0.1          
+                  lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
                   lbid = gsn_create_legend(wks,3,(/"wsususodz","wspsodz","wpeodz"/),lgres)       
@@ -3590,7 +3660,7 @@
             if (prof3d .EQ. 0) then
                if (log_z .EQ. 1) then
-                  z = f->$vNam(varn+1)$(1:dimz-1) 
-               else
-                  z = f->$vNam(varn+1)$               
+                  z = f_att->$vNam(varn+1)$(1:dimz-1) 
+               else
+                  z = f_att->$vNam(varn+1)$               
                end if
             else 
@@ -3718,4 +3788,7 @@
    if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then
       gsn_panel(wks,plot_,(/n,1/),resP)
+      print(" ")
+      print("Outputs to .eps or .epsi have only one frame")
+      print(" ")
    else    
       do i = 0,n-1, no_rows*no_columns
@@ -3723,5 +3796,5 @@
             gsn_panel(wks,plot_(i:n-1),(/no_rows,no_columns/),resP)
          else
-           gsn_panel(wks,plot_(i:i+no_rows*no_columns-1),(/no_rows,no_columns/),resP)
+            gsn_panel(wks,plot_(i:i+no_rows*no_columns-1),(/no_rows,no_columns/),resP)
          end if
       end do
Index: /palm/trunk/SCRIPTS/NCL/spectra.ncl
===================================================================
--- /palm/trunk/SCRIPTS/NCL/spectra.ncl	(revision 249)
+++ /palm/trunk/SCRIPTS/NCL/spectra.ncl	(revision 250)
@@ -639,4 +639,7 @@
    if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then
       gsn_panel(wks,plot,(/n,1/),resP)
+      print(" ")
+      print("Outputs to .eps or .epsi have only one frame")
+      print(" ")
    else    
       do i = 0,n-1, no_rows*no_columns
Index: /palm/trunk/SCRIPTS/NCL/timeseries.ncl
===================================================================
--- /palm/trunk/SCRIPTS/NCL/timeseries.ncl	(revision 249)
+++ /palm/trunk/SCRIPTS/NCL/timeseries.ncl	(revision 250)
@@ -1243,4 +1243,7 @@
    if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then
       gsn_panel(wks_ps,plot_ps(1:n),(/n,1/),resP)
+      print(" ")
+      print("Outputs to .eps or .epsi have only one frame")
+      print(" ")
    else
       do np = 1,n,no_rows*no_columns    
