Index: /palm/trunk/SCRIPTS/NCL/.ncl.config.default
===================================================================
--- /palm/trunk/SCRIPTS/NCL/.ncl.config.default	(revision 565)
+++ /palm/trunk/SCRIPTS/NCL/.ncl.config.default	(revision 566)
@@ -104,33 +104,4 @@
       end if
       ;***************************************************
-      ; OPTIONAL --xyc--xzc--yzc-- SELECTION of XY or XZ or YZ CROSS SECTIONS
-      ;
-      ; desired section has to be set to 1; 
-      ; e.g.: xyc=1, xzc=0 and yzc=0 for xy-section
-      ;
-      ; data type: integer
-      ;
-      ; example: xyc = 1
-      ;	         xzc = 0
-      ;	         yzc = 0
-      ;
-      ; default:   0
-      ;***************************************************
-      if(.not. isvar("xyc"))then      
-       
-         xyc = 0
-	
-      end if
-      if (.not. isvar("xzc"))then
-      
-	 xzc = 0
-	
-      end if
-      if (.not. isvar("yzc"))then
-      
-	 yzc = 0
-	 	 
-      end if	 	 
-      ;***************************************************
       ; OPTIONAL --format_out-- OUTPUT FORMAT
       ;
@@ -166,59 +137,4 @@
       
          file_out = "~/test_cs"
-	 
-	 
-      end if	 
-      ;***************************************************
-      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
-      ;
-      ; number of plots in one row 
-      ;
-      ; data type: integer
-      ; 
-      ; example: no_columns = 1
-      ;
-      ; default:   1
-      ;***************************************************
-      if(.not. isvar("no_columns"))then	 
-      
-      
-         no_columns = 1
-	 
-	 
-      end if	 
-      ;***************************************************
-      ; OPTIONAL --no_rows-- NUMBER OF ROWS
-      ;
-      ; number of plots in one column 
-      ;
-      ; data type: integer
-      ; 
-      ; example: no_rows = 2
-      ;
-      ; default:   2 
-      ;***************************************************
-      if(.not. isvar("no_rows"))then	 
-      
-      
-         no_rows = 2
-	 
-	 
-      end if	 
-      ;***************************************************
-      ; OPTIONAL --sort-- TYPE OF SORTING 
-      ;
-      ; sequence of plots; sorting either by time step [="time"] or 
-      ; by layer/height [="layer"]
-      ;
-      ; data type: string
-      ;
-      ; example: sort = "layer"
-      ;
-      ; default:   "layer" 
-      ;***************************************************
-      if(.not. isvar("sort"))then	 
-      
-      
-         sort = "layer"
 	 
 	 
@@ -289,5 +205,5 @@
       ;
       ; value for minimum of x-axis, selectable if there are 
-      ; NO preseted layers 
+      ; NO preset layers 
       ; for x (as for XY or XZ 2D-DATA);
       ; there is no need to specify a precise meter value from the input file, 
@@ -311,5 +227,5 @@
       ;
       ; value for maximum of x-axis, selectable if there are 
-      ; NO preseted layers 
+      ; NO preset layers 
       ; for x (as for XY or XZ 2D-DATA);
       ; there is no need to specify a precise meter value from the input file, 
@@ -333,5 +249,5 @@
       ;
       ; value for minimum of y-axis, selectable if there are 
-      ; NO preseted layers 
+      ; NO preset layers 
       ; for y (as for XY or YZ 2D-DATA);
       ; there is no need to specify a precise meter value from the input file, 
@@ -354,5 +270,5 @@
       ; OPTIONAL --ye-- MAXIMUM Y-AXIS 
       ;
-      ; value for maximum of y-axis, selectable if there are NO preseted layers
+      ; value for maximum of y-axis, selectable if there are NO preset layers
       ; for y (as for XY or YZ 2D-DATA);
       ; there is no need to specify a precise meter value from the input file,
@@ -376,5 +292,5 @@
       ;
       ; index for minimum of z-axis, selectable if there are 
-      ; NO preseted layers 
+      ; NO preset layers 
       ; for z (as for XZ or YZ 2D-DATA);
       ; you cannot specify a meter value from the input file due to 
@@ -398,5 +314,5 @@
       ;
       ; index for maximum of z-axis, selectable if there are 
-      ; NO preseted layers
+      ; NO preset layers
       ; for z (as for XZ or YZ 2D-DATA);
       ; you cannot specify a meter value from the input file due to 
@@ -413,4 +329,59 @@
             
          ze = -1
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
+      ;
+      ; number of plots in one row 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_columns = 1
+      ;
+      ; default:   1
+      ;***************************************************
+      if(.not. isvar("no_columns"))then	 
+      
+      
+         no_columns = 1
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --no_rows-- NUMBER OF ROWS
+      ;
+      ; number of plots in one column 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_rows = 2
+      ;
+      ; default:   2 
+      ;***************************************************
+      if(.not. isvar("no_rows"))then	 
+      
+      
+         no_rows = 2
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --sort-- TYPE OF SORTING 
+      ;
+      ; sequence of plots; sorting either by time step [="time"] or 
+      ; by layer/height [="layer"]
+      ;
+      ; data type: string
+      ;
+      ; example: sort = "layer"
+      ;
+      ; default:   "layer" 
+      ;***************************************************
+      if(.not. isvar("sort"))then	 
+      
+      
+         sort = "layer"
 	 
 	 
@@ -765,5 +736,5 @@
       end if 
       ;***************************************************
-      ; OPTIONAL/REQUIRED --start_f_1-- if more than one file of a job chain
+      ; OPTIONAL/REQUIRED --start_f-- if more than one file of a job chain
       ;                    START OF CYCLIC NUMBER OF THE 1ST INPUT FILE
       ;
@@ -779,13 +750,13 @@
       ; default:   -1  
       ;***************************************************
-      if (.not. isvar("start_f_1"))then  
+      if (.not. isvar("start_f"))then  
       
           
-         start_f_1 = -1
-	 
-	 
-      end if 
-      ;***************************************************
-      ; OPTIONAL/REQUIRED --end_f_1--  if more than one file of a job chain
+         start_f = -1
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --end_f--  if more than one file of a job chain
       ;            END OF CYCLIC NUMBER OF THE 1ST INPUT FILE
       ;
@@ -801,8 +772,8 @@
       ; default:   -1  
       ;***************************************************
-      if (.not. isvar("end_f_1"))then  
+      if (.not. isvar("end_f"))then  
       
           
-         end_f_1 = -1
+         end_f = -1
 	 
 	 
@@ -837,36 +808,4 @@
        
          file_out = "~/test_pr"
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
-      ;
-      ; number of plots in one row 
-      ;
-      ; data type: integer
-      ;
-      ; default:   1
-      ;***************************************************
-      if (.not. isvar("no_columns"))then	 
-      
-      
-         no_columns = 1
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --no_rows-- NUMBER OF ROWS
-      ;
-      ; number of plots in one column 
-      ;
-      ; data type: integer
-      ;
-      ; default:   2 
-      ;***************************************************
-      if (.not. isvar("no_rows"))then	
-      
-       
-         no_rows = 2
 	 
 	 
@@ -894,4 +833,415 @@
       end if
       ;***************************************************
+      ; OPTIONAL --start_time_step-- FIRST TIME STEP
+      ;
+      ; first time step of plot; there is no need to specify a precise 
+      ; time value from the input file,
+      ; 'start_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   start_time_step = 0.5d
+      ;
+      ; default:   -1.d (first available time step)
+      ;***************************************************
+      if (.not. isvar("start_time_step"))then	
+      
+       
+         start_time_step = -1.d
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --end_time_step-- LAST TIME STEP
+      ;
+      ; last time step of plot; there is no need to specify a precise
+      ; time value from the input file,
+      ; 'end_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   end_time_step = 2.0d
+      ;
+      ; default:   -1.d (last available time step)
+      ;***************************************************
+      if (.not. isvar("end_time_step"))then
+      
+      	 
+         end_time_step = -1.d    
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL --time_stride-- TEMPORAL STRIDE 
+      ;
+      ; temporal stride for the plots; if time_stride=1 all the profiles 
+      ; between first_time_step and end_time_step are plotted 
+      ; (including first_time_step and end_time_step), 
+      ; if time_stride=3 every third time step between start_time_step and 
+      ; end_time_step is plotted
+      ;
+      ; data type: integer
+      ;
+      ; example:   time_stride = 3
+      ;
+      ; default:   1 
+      ;***************************************************
+      if (.not. isvar("time_stride"))then	
+      
+       
+         time_stride = 1
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --xs-- MINIMUM X-AXIS 
+      ;
+      ; value for minimum of x-axis
+      ;
+      ; data type: float; dimension of variable
+      ;
+      ; example: xs = 300. (e.g. if var=",pt")
+      ;
+      ; default:   -1. (minimum of range)
+      ;***************************************************
+      if (.not. isvar("xs"))then   
+      
+         
+         xs = -1.
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --xe-- MAXIMUM X-AXIS 
+      ;
+      ; value for maximum of x-axis
+      ;
+      ; data type: float; dimension of variable
+      ;
+      ; example: xe = 302. (e.g. if var=",pt")
+      ;
+      ; default:   -1. (maximum of range)
+      ;***************************************************
+      if (.not. isvar("xe"))then  
+      
+          
+         xe = -1.
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --min_z-- MINIMUM Z-AXIS 
+      ;
+      ; value for minimum height of z-axis
+      ;
+      ; data type: double; dimension: [meter]
+      ;
+      ; example: min_z = 0.0d
+      ;
+      ; default:   -1.d (related to the minimum of z-axis in input file)
+      ;***************************************************
+      if (.not. isvar("min_z"))then   
+      
+         
+         min_z = -1.d
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --max_z-- MAXIMUM Z-AXIS 
+      ;
+      ; value for maximum height of z-axis
+      ;
+      ; data type: double; dimension: [meter]
+      ;
+      ; example: max_z = 1000.0d
+      ;
+      ; default:   -1.d (related to the maximum of z-axis in input file)
+      ;***************************************************
+      if (.not. isvar("max_z"))then   
+      
+         
+         max_z = -1.d
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --start_x-- STARTVALUE IN X-DIRECTION  
+      ;
+      ; if 3D data is used for profiles you can choose a startvalue 
+      ; in x-direction for horizontal averaging 
+      ;
+      ; data type: integer; dimension [grippoint]
+      ;
+      ; example: start_x = 0
+      ;
+      ; default:   0 (minimum of range)
+      ;***************************************************
+      if (.not. isvar("start_x"))then   
+      
+         
+         start_x = 0
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --end_x-- ENDVALUE IN X-DIRECTION  
+      ;
+      ; if 3D data is used for profiles you can choose an endvalue 
+      ; in x-direction for horizontal averaging 
+      ;
+      ; data type: integer; dimension [grippoint]
+      ;
+      ; example: end_x = 200
+      ;
+      ; default:   -1 (maximum of range excluding ghostpoint)
+      ;***************************************************
+      if (.not. isvar("end_x"))then   
+      
+         
+         end_x = -1
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --start_y-- STARTVALUE IN Y-DIRECTION  
+      ;
+      ; if 3D data is used for profiles you can choose a startvalue 
+      ; in y-direction for horizontal averaging 
+      ;
+      ; data type: integer; dimension [grippoint]
+      ;
+      ; example: start_y = 0
+      ;
+      ; default:   0 (minimum of range)
+      ;***************************************************
+      if (.not. isvar("start_y"))then   
+      
+         
+         start_y = 0
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --end_y-- ENDVALUE IN Y-DIRECTION  
+      ;
+      ; if 3D data is used for profiles you can choose an endvalue 
+      ; in y-direction for horizontal averaging 
+      ;
+      ; data type: integer; dimension [grippoint]
+      ;
+      ; example: end_y = 200
+      ;
+      ; default:   -1 (maximum of range excluding ghostpoint)
+      ;***************************************************
+      if (.not. isvar("end_y"))then   
+      
+         
+         end_y = -1
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
+      ;
+      ; number of plots in one row 
+      ;
+      ; data type: integer
+      ;
+      ; default:   1
+      ;***************************************************
+      if (.not. isvar("no_columns"))then	 
+      
+      
+         no_columns = 1
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --no_rows-- NUMBER OF ROWS
+      ;
+      ; number of plots in one column 
+      ;
+      ; data type: integer
+      ;
+      ; default:   2 
+      ;***************************************************
+      if (.not. isvar("no_rows"))then	
+      
+       
+         no_rows = 2
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --log_z-- LOGARITHMIC SCALE OF Z-AXIS 
+      ;
+      ; logarithmic scale for z-axis is switched on [=1] or off [=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: log_z = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("log_z"))then 
+      
+           
+         log_z = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --norm_z-- NORMALISING Z-AXIS 
+      ;
+      ; value for normalising the z-axis
+      ;
+      ; data type: float
+      ;
+      ; example: norm_z = 1.
+      ;
+      ; default:   1. (no normalising)
+      ;***************************************************
+      if (.not. isvar("norm_z"))then 
+      
+           
+         norm_z = 1.
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --over-- OVERLAYING
+      ;
+      ; predefined overlaying of standard variables is switched 
+      ; on [=1] or off [=0];
+      ; this feature cannot be used with statistic regions
+      ;
+      ; data type: integer
+      ;
+      ; example: over = 0
+      ;
+      ; default:   0 
+      ;***************************************************
+      if (.not. isvar("over"))then
+      
+      	 
+         over = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --combine-- COMBINING 
+      ;
+      ; combining of two or three individual variables is possible and 
+      ; switched on [=1] or off[=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: combine = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("combine"))then  
+      
+          
+         combine = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; REQUIRED IF combine=1 --number_comb-- NUMBER FOR COMBINING 
+      ;
+      ; number of variables for combining; 2 or 3 is valid 
+      ;
+      ; data type: integer
+      ;
+      ; example: number_comb = 2
+      ;
+      ; default:   -1
+      ;***************************************************
+      if (.not. isvar("number_comb"))then 
+      
+           
+         number_comb = -1
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; REQUIRED IF combine=1 --c_var-- VARIABLES FOR COMBINING 
+      ;
+      ; names of variables; 
+      ; inidcate them with one comma before and after each variable
+      ; if the name contains double quotes (") use dq and the '+' operation to 
+      ; concatenate the strings
+      ;
+      ; data type: string
+      ;
+      ; example: c_var = ",u,v,w,w*pt*,w"+dq+"pt"+dq+",wpt," 
+      ;
+      ; default:   "c_variables"
+      ;***************************************************
+      if (.not. isvar("c_var"))then 
+      
+           
+         c_var = "c_variables"
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --black-- BLACK OR COLOR LINES
+      ;
+      ; colored [=0] or black and white [=1] plots
+      ;
+      ; data type: integer
+      ;
+      ; example: black = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("black"))then 
+      
+           
+         black = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --dash-- DASHED LINES 
+      ;
+      ; use of different line patterns [=1] or continous lines [=0] 
+      ; for different time steps
+      ;
+      ; data type: integer
+      ;
+      ; example: dash = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("dash"))then     
+      
+       
+         dash = 0      
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --font_size-- FONT SIZE OF STRINGS 
+      ;
+      ; font size can be changed to fit to the current plot
+      ;
+      ; data type: float
+      ;
+      ; example: font_size = 0.02
+      ;
+      ; default:   0.02 
+      ;***************************************************
+      if(.not. isvar("font_size"))then
+      
+      	 
+         font_size = 0.02
+	 
+	 
+      end if 
+      ;***************************************************
       ; OPTIONAL --legend-- SWITCHES ON A LEGEND
       ;
@@ -911,4 +1261,22 @@
 	 
       end if    
+      ;***************************************************
+      ; OPTIONAL --font_size_legend-- FONT SIZE OF LEGEND STRINGS 
+      ;
+      ; font size of the legend can be changed to fit to the current plot
+      ;
+      ; data type: float
+      ;
+      ; example: font_size_legend = 0.2
+      ;
+      ; default:   0.2 
+      ;***************************************************
+      if(.not. isvar("font_size_legend"))then
+      
+      	 
+         font_size_legend = 0.2
+	 
+	 
+      end if 	 
       ;***************************************************
       ; OPTIONAL ---no_files-- NUMBER OF INPUT FILES
@@ -1369,402 +1737,4 @@
       end if 	  	 
       ;***************************************************
-      ; OPTIONAL --start_time_step-- FIRST TIME STEP
-      ;
-      ; first time step of plot; there is no need to specify a precise 
-      ; time value from the input file,
-      ; 'start_time_step' is rounded to the next existent time step
-      ;
-      ; data type: double; dimension: [hour]
-      ;
-      ; example:   start_time_step = 0.5d
-      ;
-      ; default:   -1.d (first available time step)
-      ;***************************************************
-      if (.not. isvar("start_time_step"))then	
-      
-       
-         start_time_step = -1.d
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --end_time_step-- LAST TIME STEP
-      ;
-      ; last time step of plot; there is no need to specify a precise
-      ; time value from the input file,
-      ; 'end_time_step' is rounded to the next existent time step
-      ;
-      ; data type: double; dimension: [hour]
-      ;
-      ; example:   end_time_step = 2.0d
-      ;
-      ; default:   -1.d (last available time step)
-      ;***************************************************
-      if (.not. isvar("end_time_step"))then
-      
-      	 
-         end_time_step = -1.d    
-	 
-	 
-      end if 
-      ;***************************************************
-      ; OPTIONAL --time_stride-- TEMPORAL STRIDE 
-      ;
-      ; temporal stride for the plots; if time_stride=1 all the profiles 
-      ; between first_time_step and end_time_step are plotted 
-      ; (including first_time_step and end_time_step), 
-      ; if time_stride=3 every third time step between start_time_step and 
-      ; end_time_step is plotted
-      ;
-      ; data type: integer
-      ;
-      ; example:   time_stride = 3
-      ;
-      ; default:   1 
-      ;***************************************************
-      if (.not. isvar("time_stride"))then	
-      
-       
-         time_stride = 1
-	 
-	 
-      end if
-      ;***************************************************
-      ; OPTIONAL --start_x-- STARTVALUE IN X-DIRECTION  
-      ;
-      ; if 3D data is used for profiles you can choose a startvalue 
-      ; in x-direction for horizontal averaging 
-      ;
-      ; data type: integer; dimension [grippoint]
-      ;
-      ; example: start_x = 0
-      ;
-      ; default:   0 (minimum of range)
-      ;***************************************************
-      if (.not. isvar("start_x"))then   
-      
-         
-         start_x = 0
-	 
-	 
-      end if
-      ;***************************************************
-      ; OPTIONAL --end_x-- ENDVALUE IN X-DIRECTION  
-      ;
-      ; if 3D data is used for profiles you can choose an endvalue 
-      ; in x-direction for horizontal averaging 
-      ;
-      ; data type: integer; dimension [grippoint]
-      ;
-      ; example: end_x = 200
-      ;
-      ; default:   -1 (maximum of range excluding ghostpoint)
-      ;***************************************************
-      if (.not. isvar("end_x"))then   
-      
-         
-         end_x = -1
-	 
-	 
-      end if
-      ;***************************************************
-      ; OPTIONAL --start_y-- STARTVALUE IN Y-DIRECTION  
-      ;
-      ; if 3D data is used for profiles you can choose a startvalue 
-      ; in y-direction for horizontal averaging 
-      ;
-      ; data type: integer; dimension [grippoint]
-      ;
-      ; example: start_y = 0
-      ;
-      ; default:   0 (minimum of range)
-      ;***************************************************
-      if (.not. isvar("start_y"))then   
-      
-         
-         start_y = 0
-	 
-	 
-      end if
-      ;***************************************************
-      ; OPTIONAL --end_y-- ENDVALUE IN Y-DIRECTION  
-      ;
-      ; if 3D data is used for profiles you can choose an endvalue 
-      ; in y-direction for horizontal averaging 
-      ;
-      ; data type: integer; dimension [grippoint]
-      ;
-      ; example: end_y = 200
-      ;
-      ; default:   -1 (maximum of range excluding ghostpoint)
-      ;***************************************************
-      if (.not. isvar("end_y"))then   
-      
-         
-         end_y = -1
-	 
-	 
-      end if	 
-      ;***************************************************
-      ; OPTIONAL --xs-- MINIMUM X-AXIS 
-      ;
-      ; value for minimum of x-axis
-      ;
-      ; data type: float; dimension of variable
-      ;
-      ; example: xs = 300. (e.g. if var=",pt")
-      ;
-      ; default:   -1. (minimum of range)
-      ;***************************************************
-      if (.not. isvar("xs"))then   
-      
-         
-         xs = -1.
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --xe-- MAXIMUM X-AXIS 
-      ;
-      ; value for maximum of x-axis
-      ;
-      ; data type: float; dimension of variable
-      ;
-      ; example: xe = 302. (e.g. if var=",pt")
-      ;
-      ; default:   -1. (maximum of range)
-      ;***************************************************
-      if (.not. isvar("xe"))then  
-      
-          
-         xe = -1.
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --min_z-- MINIMUM Z-AXIS 
-      ;
-      ; value for minimum height of z-axis
-      ;
-      ; data type: double; dimension: [meter]
-      ;
-      ; example: min_z = 0.0d
-      ;
-      ; default:   -1.d (related to the minimum of z-axis in input file)
-      ;***************************************************
-      if (.not. isvar("min_z"))then   
-      
-         
-         min_z = -1.d
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --max_z-- MAXIMUM Z-AXIS 
-      ;
-      ; value for maximum height of z-axis
-      ;
-      ; data type: double; dimension: [meter]
-      ;
-      ; example: max_z = 1000.0d
-      ;
-      ; default:   -1.d (related to the maximum of z-axis in input file)
-      ;***************************************************
-      if (.not. isvar("max_z"))then   
-      
-         
-         max_z = -1.d
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --log_z-- LOGARITHMIC SCALE OF Z-AXIS 
-      ;
-      ; logarithmic scale for z-axis is switched on [=1] or off [=0]
-      ;
-      ; data type: integer
-      ;
-      ; example: log_z = 0
-      ;
-      ; default:   0
-      ;***************************************************
-      if (.not. isvar("log_z"))then 
-      
-           
-         log_z = 0
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --norm_z-- NORMALISING Z-AXIS 
-      ;
-      ; value for normalising the z-axis
-      ;
-      ; data type: float
-      ;
-      ; example: norm_z = 1.
-      ;
-      ; default:   1. (no normalising)
-      ;***************************************************
-      if (.not. isvar("norm_z"))then 
-      
-           
-         norm_z = 1.
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --over-- OVERLAYING
-      ;
-      ; predefined overlaying of standard variables is switched 
-      ; on [=1] or off [=0];
-      ; this feature cannot be used with statistic regions
-      ;
-      ; data type: integer
-      ;
-      ; example: over = 0
-      ;
-      ; default:   0 
-      ;***************************************************
-      if (.not. isvar("over"))then
-      
-      	 
-         over = 0
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --combine-- COMBINING 
-      ;
-      ; combining of two or three individual variables is possible and 
-      ; switched on [=1] or off[=0]
-      ;
-      ; data type: integer
-      ;
-      ; example: combine = 0
-      ;
-      ; default:   0
-      ;***************************************************
-      if (.not. isvar("combine"))then  
-      
-          
-         combine = 0
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; REQUIRED IF combine=1 --number_comb-- NUMBER FOR COMBINING 
-      ;
-      ; number of variables for combining; 2 or 3 is valid 
-      ;
-      ; data type: integer
-      ;
-      ; example: number_comb = 2
-      ;
-      ; default:   -1
-      ;***************************************************
-      if (.not. isvar("number_comb"))then 
-      
-           
-         number_comb = -1
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; REQUIRED IF combine=1 --c_var-- VARIABLES FOR COMBINING 
-      ;
-      ; names of variables; 
-      ; inidcate them with one comma before and after each variable
-      ; if the name contains double quotes (") use dq and the '+' operation to 
-      ; concatenate the strings
-      ;
-      ; data type: string
-      ;
-      ; example: c_var = ",u,v,w,w*pt*,w"+dq+"pt"+dq+",wpt," 
-      ;
-      ; default:   "c_variables"
-      ;***************************************************
-      if (.not. isvar("c_var"))then 
-      
-           
-         c_var = "c_variables"
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --black-- BLACK OR COLOR LINES
-      ;
-      ; colored [=0] or black and white [=1] plots
-      ;
-      ; data type: integer
-      ;
-      ; example: black = 0
-      ;
-      ; default:   0
-      ;***************************************************
-      if (.not. isvar("black"))then 
-      
-           
-         black = 0
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --dash-- DASHED LINES 
-      ;
-      ; use of different line patterns [=1] or continous lines [=0] 
-      ; for different time steps
-      ;
-      ; data type: integer
-      ;
-      ; example: dash = 0
-      ;
-      ; default:   0
-      ;***************************************************
-      if (.not. isvar("dash"))then     
-      
-       
-         dash = 0      
-	 
-	 
-      end if
-      ;***************************************************
-      ; OPTIONAL --font_size-- FONT SIZE OF STRINGS 
-      ;
-      ; font size can be changed to fit to the current plot
-      ;
-      ; data type: float
-      ;
-      ; example: font_size = 0.02
-      ;
-      ; default:   0.02 
-      ;***************************************************
-      if(.not. isvar("font_size"))then
-      
-      	 
-         font_size = 0.02
-	 
-	 
-      end if 
-      ;***************************************************
-      ; OPTIONAL --font_size_legend-- FONT SIZE OF LEGEND STRINGS 
-      ;
-      ; font size of the legend can be changed to fit to the current plot
-      ;
-      ; data type: float
-      ;
-      ; example: font_size_legend = 0.2
-      ;
-      ; default:   0.2 
-      ;***************************************************
-      if(.not. isvar("font_size_legend"))then
-      
-      	 
-         font_size_legend = 0.2
-	 
-	 
-      end if 	 
-      ;***************************************************
-       
    end if
 
@@ -1881,41 +1851,5 @@
 	 
 	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
-      ;
-      ; number of plots in one row 
-      ;
-      ; data type: integer
-      ; 
-      ; example: no_columns = 1
-      ;
-      ; default:   1
-      ;***************************************************
-      if (.not. isvar("no_columns"))then	 
-      
-      
-         no_columns = 1
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --no_rows-- NUMBER OF ROWS
-      ;
-      ; number of plots in one column 
-      ;
-      ; data type: integer
-      ; 
-      ; example: no_rows = 2
-      ;
-      ; default:   2 
-      ;***************************************************
-      if (.not. isvar("no_rows"))then
-      
-      	 
-         no_rows = 2
-	 
-	 
-      end if 	 
+      end if 	
       ;***************************************************
       ; OPTIONAL --var-- OUTPUT VARIABLES
@@ -1940,4 +1874,44 @@
       end if 	 
       ;***************************************************
+      ; OPTIONAL --start_time_step-- FIRST TIME STEP
+      ;
+      ; first time step of plot; there is no need to specify a precise 
+      ; time value from the input file,
+      ; 'start_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   start_time_step = 0.5d
+      ;
+      ; default:   -1.d (first available time step)
+      ;***************************************************
+      if (.not. isvar("start_time_step"))then
+      
+      	 
+         start_time_step = -1.d
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --end_time_step-- LAST TIME STEP
+      ;
+      ; last time step of plot; there is no need to specify a precise 
+      ; time value from the input file,
+      ; 'end_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   end_time_step = 2.0d
+      ;
+      ; default:   -1.d (last available time step)
+      ;***************************************************
+      if (.not. isvar("end_time_step"))then
+      
+      	 
+         end_time_step = -1.d
+	 
+	 
+      end if    
+      ;***************************************************
       ; OPTIONAL --height_level-- HEIGHT LEVELS 
       ;
@@ -1979,79 +1953,39 @@
       end if 	 
       ;***************************************************
-      ; OPTIONAL --start_time_step-- FIRST TIME STEP
-      ;
-      ; first time step of plot; there is no need to specify a precise 
-      ; time value from the input file,
-      ; 'start_time_step' is rounded to the next existent time step
-      ;
-      ; data type: double; dimension: [hour]
-      ;
-      ; example:   start_time_step = 0.5d
-      ;
-      ; default:   -1.d (first available time step)
-      ;***************************************************
-      if (.not. isvar("start_time_step"))then
-      
-      	 
-         start_time_step = -1.d
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --end_time_step-- LAST TIME STEP
-      ;
-      ; last time step of plot; there is no need to specify a precise 
-      ; time value from the input file,
-      ; 'end_time_step' is rounded to the next existent time step
-      ;
-      ; data type: double; dimension: [hour]
-      ;
-      ; example:   end_time_step = 2.0d
-      ;
-      ; default:   -1.d (last available time step)
-      ;***************************************************
-      if (.not. isvar("end_time_step"))then
-      
-      	 
-         end_time_step = -1.d
-	 
-	 
-      end if    
-      ;***************************************************
-      ; OPTIONAL --black-- BLACK OR COLOR LINES
-      ;
-      ; colored [=0] or black and white [=1] plots
-      ;
-      ; data type: integer
-      ;
-      ; example: black = 0
-      ;
-      ; default:   0
-      ;***************************************************
-      if (.not. isvar("black"))then 
-      
-           
-         black = 0
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --dash-- DASHED LINES 
-      ;
-      ; use of different line patterns [=1] or continous lines [=0]
-      ;
-      ; data type: integer
-      ;
-      ; example: dash = 0
-      ;
-      ; default:   0
-      ;***************************************************
-      if (.not. isvar("dash"))then   
-      
-         
-         dash = 0
-	 
-	 
-      end if 
+      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
+      ;
+      ; number of plots in one row 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_columns = 1
+      ;
+      ; default:   1
+      ;***************************************************
+      if (.not. isvar("no_columns"))then	 
+      
+      
+         no_columns = 1
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --no_rows-- NUMBER OF ROWS
+      ;
+      ; number of plots in one column 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_rows = 2
+      ;
+      ; default:   2 
+      ;***************************************************
+      if (.not. isvar("no_rows"))then
+      
+      	 
+         no_rows = 2
+	 
+	 
+      end if 	 
       ;***************************************************
       ; OPTIONAL --log_x-- LOGARITHMIC SCALE X-AXIS
@@ -2091,4 +2025,23 @@
       end if 	 
       ;***************************************************
+      ; OPTIONAL --norm_height-- NORMALISING X-AXIS WITH HEIGHT
+      ;
+      ; normalising the x-axis with the height of each spectra 
+      ; is switched on [=1] or off [=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: norm_height = 0
+      ;
+      ; default:   0 (no normalising)
+      ;***************************************************
+      if (.not. isvar("norm_height"))then   
+      
+         
+         norm_height = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
       ; OPTIONAL --norm_x-- NORMALISING X-AXIS 
       ;
@@ -2108,23 +2061,4 @@
 	 
       end if 
-      ;***************************************************
-      ; OPTIONAL --norm_height-- NORMALISING X-AXIS WITH HEIGHT
-      ;
-      ; normalising the x-axis with the height of each spectra 
-      ; is switched on [=1] or off [=0]
-      ;
-      ; data type: integer
-      ;
-      ; example: norm_height = 0
-      ;
-      ; default:   0 (no normalising)
-      ;***************************************************
-      if (.not. isvar("norm_height"))then   
-      
-         
-         norm_height = 0
-	 
-	 
-      end if 	 
       ;***************************************************
       ; OPTIONAL --norm_y-- NORMALISE Y-AXIS 
@@ -2165,4 +2099,40 @@
       	 
          unit_y = " "	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL --black-- BLACK OR COLOR LINES
+      ;
+      ; colored [=0] or black and white [=1] plots
+      ;
+      ; data type: integer
+      ;
+      ; example: black = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("black"))then 
+      
+           
+         black = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --dash-- DASHED LINES 
+      ;
+      ; use of different line patterns [=1] or continous lines [=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: dash = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("dash"))then   
+      
+         
+         dash = 0
+	 
 	 
       end if 
@@ -2319,42 +2289,6 @@
 	 
 	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
-      ;
-      ; number of plots in one row 
-      ;
-      ; data type: integer
-      ; 
-      ; example: no_columns = 1
-      ;
-      ; default:   1
-      ;***************************************************
-      if (.not. isvar("no_columns"))then	
-      
-       
-         no_columns = 1
-	 
-	 
-      end if 	 
-      ;***************************************************
-      ; OPTIONAL --no_rows-- NUMBER OF ROWS
-      ;
-      ; number of plots in one column 
-      ;
-      ; data type: integer
-      ; 
-      ; example: no_rows = 2
-      ;
-      ; default:   2 
-      ;***************************************************
-      if (.not. isvar("no_rows"))then
-      
-      	 
-         no_rows = 1
-	 
-	 
-      end if 	 
-      ;***************************************************
+      end if 
+ ;***************************************************
       ; OPTIONAL --var-- OUTPUT VARIABLES
       ;
@@ -2416,5 +2350,5 @@
 	 
 
-      end if 	 
+      end if 	 	 
       ;***************************************************
       ; OPTIONAL --over-- OVERLAYING
@@ -2438,4 +2372,78 @@
       end if
       ;***************************************************
+      ; OPTIONAL --norm_t-- NORMALISING X-AXIS OF TIMESERIES PLOTS (T-AXIS)
+      ;
+      ; normalising the x-axis with the given value; 
+      ; the unit can be set explicitly; 
+      ; by default no normalising and unit is set to [s]
+      ;
+      ; data type: float
+      ;
+      ; example: norm_t = 3600.
+      ;
+      ; default:   1. 
+      ;***************************************************
+      if(.not. isvar("norm_t"))then
+      
+      	 
+         norm_t = 1.
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --unit_t-- UNIT OF X-AXIS OF TIMESERIES PLOTS (T-AXIS)
+      ;
+      ; unit of the x-axis can be set; by default unit is set to [s]
+      ;
+      ; data type: string
+      ;
+      ; example: unit_t = "h"
+      ;
+      ; default:   " " 
+      ;***************************************************
+      if(.not. isvar("unit_t"))then
+      
+      	 
+         unit_t = " "
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
+      ;
+      ; number of plots in one row 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_columns = 1
+      ;
+      ; default:   1
+      ;***************************************************
+      if (.not. isvar("no_columns"))then	
+      
+       
+         no_columns = 1
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --no_rows-- NUMBER OF ROWS
+      ;
+      ; number of plots in one column 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_rows = 2
+      ;
+      ; default:   2 
+      ;***************************************************
+      if (.not. isvar("no_rows"))then
+      
+      	 
+         no_rows = 2
+	 
+	 
+      end if 	 
+      ;***************************************************
       ; OPTIONAL --font_size-- FONT SIZE OF STRINGS 
       ;
@@ -2455,42 +2463,4 @@
 	 
       end if 
-      ;***************************************************
-      ; OPTIONAL --norm_t-- NORMALISING X-AXIS OF TIMESERIES PLOTS (T-AXIS)
-      ;
-      ; normalising the x-axis with the given value; 
-      ; the unit can explicitly set; 
-      ; by default no normalising and unit is set to [s]
-      ;
-      ; data type: float
-      ;
-      ; example: norm_t = 3600.
-      ;
-      ; default:   1. 
-      ;***************************************************
-      if(.not. isvar("norm_t"))then
-      
-      	 
-         norm_t = 1.
-	 
-	 
-      end if
-      ;***************************************************
-      ; OPTIONAL --unit_t-- UNIT OF X-AXIS OF TIMESERIES PLOTS (T-AXIS)
-      ;
-      ; unit of the x-axis can be set; by default unit is set to [s]
-      ;
-      ; data type: string
-      ;
-      ; example: unit_t = "h"
-      ;
-      ; default:   " " 
-      ;***************************************************
-      if(.not. isvar("unit_t"))then
-      
-      	 
-         unit_t = " "
-	 
-	 
-      end if
       ;***************************************************
 
Index: /palm/trunk/SCRIPTS/NCL/cross_sections.ncl
===================================================================
--- /palm/trunk/SCRIPTS/NCL/cross_sections.ncl	(revision 565)
+++ /palm/trunk/SCRIPTS/NCL/cross_sections.ncl	(revision 566)
@@ -26,5 +26,6 @@
       print("Neither the personal configuration file '.ncl.config' exists in")
       print("~/palm/current_version")
-      print("nor the default configuration file '.ncl.config.default' exists in")
+      print("nor the default configuration file '.ncl.config.default' "+\
+            "exists in")
       print(palm_bin_path + "/NCL")
       print(" ")
@@ -49,6 +50,18 @@
 
    ; ***************************************************
-   ; set default parameter values and strings if not assigned in prompt or parameter list
+   ; set default parameter values and strings if not assigned 
+   ; in prompt or parameter list
    ; ***************************************************
+
+   ; Selection of type of cross section is done in palmplot
+   if (.not. isvar("xyc"))then        
+      xyc = 0	
+   end if
+   if (.not. isvar("xzc"))then  
+      xzc = 0	
+   end if
+   if (.not. isvar("yzc"))then     
+      yzc = 0
+   end if
    
    if (file_1 .EQ. "File in") then
@@ -61,5 +74,8 @@
    end if
 
-   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. format_out .NE. "png")then
+   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND.   \
+       format_out .NE. "eps" .AND. format_out .NE. "ps" .AND.    \
+       format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \
+       format_out .NE. "png") then
       print(" ")
       print("'format_out = "+format_out+"' is invalid and set to'x11'")
@@ -91,5 +107,6 @@
    end if
 
-   if (fill_mode .NE. "AreaFill" .AND. fill_mode .NE. "RasterFill" .AND. fill_mode .NE. "CellFill") then
+   if (fill_mode .NE. "AreaFill" .AND. fill_mode .NE. "RasterFill" .AND.\
+       fill_mode .NE. "CellFill") then
       print(" ")
       print("'fill_mode'= "+fill_mode+" is invalid and set to 'AreaFill'")
@@ -196,5 +213,6 @@
    if (start_f .EQ. -1)then
       print(" ")
-      print("'start_f' must be one of the cyclic numbers (at least 0) of your input file(s)")
+      print("'start_f' must be one of the cyclic numbers (at least 0) "+\
+            "of your input file(s)")
       print(" ")  
       exit
@@ -202,5 +220,6 @@
    if (end_f .EQ. -1)then
       print(" ")
-      print("'end_f' must be one of the cyclic numbers (at least 0) of your input file(s)")
+      print("'end_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
       print(" ")  
       exit
@@ -349,8 +368,9 @@
    vecres                          = True
    cs_res@gsnYAxisIrregular2Linear = True  
+   vecres@gsnYAxisIrregular2Linear = True
   
    cs_res@gsnDraw                 = False
    cs_res@gsnFrame                = False
-    cs_res@gsnMaximize                = True
+   cs_res@gsnMaximize                = True
    
    cs_res@tmXBLabelFontHeightF   = font_size
@@ -404,5 +424,6 @@
       if (start_time_step .GT. t_all(nt-1)/3600)
          print(" ")
-         print("'start_time_step' = "+ start_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
+         print("'start_time_step' = "+ start_time_step +"h is greater than "+\
+               "last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
          print(" ")
          print("Select another 'start_time_step'")
@@ -412,5 +433,6 @@
       if (start_time_step .LT. t_all(0)/3600)
          print(" ")
-         print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
+         print("'start_time_step' = "+ start_time_step +"h is lower than "+\
+               "first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
          print(" ")
          print("Select another 'start_time_step'")
@@ -420,5 +442,6 @@
    end if
    do i=0,nt-1    
-      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
          st=i
          break
@@ -444,5 +467,6 @@
       if (end_time_step .LT. t_all(0)/3600)
          print(" ")
-         print("'end_time_step' = "+end_time_step+ "h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
+         print("'end_time_step' = "+end_time_step+ "h is lower than "+\
+               "first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
          print(" ")
          print("Select another 'end_time_step'")
@@ -452,5 +476,6 @@
       if (end_time_step .GT. t_all(nt-1)/3600)
          print(" ")
-         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")
+         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")
          print(" ")
          print("Select another 'end_time_step'")  
@@ -460,5 +485,6 @@
       if (end_time_step .LT. start_time_step/3600)
          print(" ")
-         print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h")
+         print("'end_time_step' = "+ end_time_step +"h is lower than "+\
+               "'start_time_step' = "+start_time_step+"h")
          print(" ")
          print("Select another 'start_time_step' or 'end_time_step'")
@@ -468,5 +494,6 @@
    end if
    do i=0,nt-1     
-      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
          et=i
          break
@@ -489,6 +516,8 @@
 
    print(" ")
-   print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step)
-   print("                     till "+t_all(end_time_step)/3600+" h = "+t_all(end_time_step)+" s => index = "+end_time_step)
+   print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+\
+                t_all(start_time_step)+" s => index = "+start_time_step)
+   print("                     till "+t_all(end_time_step)/3600+" h = "  +\
+                t_all(end_time_step)+" s => index = "+end_time_step)
    print(" ")
   
@@ -502,5 +531,6 @@
       if (vec1 .EQ. "component1") then
          print(" ")
-         print("Indicate Vector 1 ('vec1') for Vector-Plot or set 'vector' to 0")
+         print("Indicate Vector 1 ('vec1') for Vector-Plot or "+\
+               "set 'vector' to 0")
          print(" ")
          exit
@@ -508,5 +538,6 @@
       if (vec2 .EQ. "component2") then
          print(" ")
-         print("Indicate Vector 2 ('vec2') for Vector-Plot or set 'vector' to 0")
+         print("Indicate Vector 2 ('vec2') for Vector-Plot or "+\
+               "set 'vector' to 0")
          print(" ")
          exit
@@ -571,5 +602,6 @@
       end do
       do varn=0,dim-1   
-         if (vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "zu" .OR. vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d") then
+         if (vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "zu" .OR. \
+             vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d") then
             z_d     = f_att->$vNam(varn)$
             zdim    = dimsizes(z_d)-1 
@@ -607,5 +639,6 @@
       end do
       do varn=0,dim-1 
-         if (vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "zu" .OR. vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d") then
+         if (vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "zu" .OR. \
+             vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d") then
             z_d     = f_att->$vNam(varn)$
             zdim    = dimsizes(z_d)-1 
@@ -642,5 +675,6 @@
       if (delta_x .EQ. -1) then
          print(" ") 
-         print("You cannot choose a start value for x, there are preseted layers for x")
+         print("You cannot choose a start value for x, "+\
+               "there are preset layers for x")
          print(" ")
          xstart=0
@@ -649,5 +683,6 @@
       if (delta_x .EQ. -1) then
          print(" ") 
-         print("You cannot choose a start value for x, there are preseted layers for x")
+         print("You cannot choose a start value for x, "+\
+               "there are preset layers for x")
          print(" ")
          xstart=0
@@ -655,5 +690,6 @@
          if (xs .LT. 0-delta_x/2) then
             print(" ")
-            print("range start for x-coordinate = "+xs+"m is lower than first value = "+(0-delta_x/2)+"m")
+            print("range start for x-coordinate = "+\
+                   xs+"m is lower than first value = "+(0-delta_x/2)+"m")
             print(" ")
             exit
@@ -662,5 +698,7 @@
             if (xs .GE. xdim*delta_x) then
                print(" ")
-               print("range start for x-coordinate = "+xs+"m is equal or greater than last value = "+xdim*delta_x+"m")
+               print("range start for x-coordinate = "+\
+                     xs+"m is equal or greater than last value = "+\
+                     xdim*delta_x+"m")
                print(" ")
                exit
@@ -669,5 +707,7 @@
             if (xs .GT. xdim*delta_x) then
                print(" ")
-               print("range start for x-coordinate = "+xs+"m is greater than last value = "+xdim*delta_x+"m")
+               print("range start for x-coordinate = "+\
+                     xs+"m is greater than last value = "+\
+                     xdim*delta_x+"m")
                print(" ")
                exit
@@ -681,5 +721,6 @@
       if (delta_y .EQ. -1) then
          print(" ") 
-         print("You cannot choose a start value for y, there are preseted layers for y")
+         print("You cannot choose a start value for y, "+\
+               "there are preset layers for y")
          print(" ")
          ystart=0
@@ -688,5 +729,6 @@
       if (delta_y .EQ. -1) then
          print(" ") 
-         print("You cannot choose a start value for y, there are preseted layers for y")
+         print("You cannot choose a start value for y, "+\
+                "there are preset layers for y")
          print(" ")
          ystart=0
@@ -694,5 +736,6 @@
          if (ys .LT. 0-delta_y/2) then
             print(" ")
-            print("range start for y-coordinate = "+ys+"m is lower than first value = "+0-delta_y/2+"m")
+            print("range start for y-coordinate = "+\
+                  ys+"m is lower than first value = "+0-delta_y/2+"m")
             print(" ")
             exit
@@ -701,5 +744,7 @@
             if (ys .GE. ydim*delta_y) then
                print(" ")
-               print("range start for y-coordinate = "+ys+"m is equal or greater than last value = "+ydim*delta_y+"m")
+               print("range start for y-coordinate = "+\
+                     ys+"m is equal or greater than last value = "+\
+                     ydim*delta_y+"m")
                print(" ")
                exit
@@ -708,5 +753,6 @@
             if (ys .GT. ydim*delta_y) then
                print(" ")
-               print("range start for y-coordinate = "+ys+"m is greater than last value = "+ydim*delta_y+"m")
+               print("range start for y-coordinate = "+\
+                     ys+"m is greater than last value = "+ydim*delta_y+"m")
                print(" ")
                exit
@@ -720,5 +766,6 @@
       if (delta_z .EQ. -1) then
          print(" ") 
-         print("You cannot choose a start value for z, there are preseted layers for z")
+         print("You cannot choose a start value for z, "+\
+               "there are preset layers for z")
          print(" ")
       end if
@@ -726,5 +773,6 @@
       if (delta_z .EQ. -1) then
          print(" ") 
-         print("You cannot choose a start value for z, there are preseted layers for z")
+         print("You cannot choose a start value for z, "+\
+               "there are preset layers for z")
          print(" ")
          zs = 0
@@ -732,5 +780,6 @@
          if (zs .LT. 0) then
             print(" ")
-            print("range start for z-coordinate = "+zs+" is lower than first gridpoint = 0")
+            print("range start for z-coordinate = "+\
+                  zs+" is lower than first gridpoint = 0")
             print(" ")
             exit
@@ -739,5 +788,6 @@
             if (zs .GE. zdim) then
                print(" ")
-               print("range start for z-coordinate = "+zs+" is equal or greater than last gridpoint = "+zdim)
+               print("range start for z-coordinate = "+\
+                     zs+" is equal or greater than last gridpoint = "+zdim)
                print(" ")
                exit
@@ -746,5 +796,6 @@
             if (zs .GT. zdim) then
                print(" ")
-               print("range start for z-coordinate = "+zs+" is greater than last gridpoint = "+zdim)
+               print("range start for z-coordinate = "+\
+                     zs+" is greater than last gridpoint = "+zdim)
                print(" ")
                exit
@@ -758,5 +809,6 @@
       if (delta_x .EQ. -1) then
          print(" ") 
-         print("You cannot choose an end value for x, there are preseted layers for x")
+         print("You cannot choose an end value for x, "+\
+               "there are preset layers for x")
          print(" ")
          xend=xdim
@@ -765,5 +817,6 @@
       if (delta_x .EQ. -1) then
          print(" ") 
-         print("You cannot choose an end value for x, there are preseted layers for x")
+         print("You cannot choose an end value for x, "+\
+               "there are preset layers for x")
          print(" ")
          xend=xdim
@@ -771,5 +824,6 @@
          if (xe .GT. xdim*delta_x) then
             print(" ")
-            print("range end for x-coordinate = "+xe+"m is greater than last value = "+xdim*delta_x+"m")
+            print("range end for x-coordinate = "+\
+                  xe+"m is greater than last value = "+xdim*delta_x+"m")
             print(" ") 
             exit 
@@ -778,5 +832,7 @@
             if (xe .LE. 0-delta_x/2)
                print(" ")
-               print("range end for x-coordinate = "+xe+"m is equal or lower than first value = "+(0-delta_x/2)+"m")
+               print("range end for x-coordinate = "+\
+                     xe+"m is equal or lower than first value = "+\
+                     (0-delta_x/2)+"m")
                print(" ")
                exit
@@ -784,5 +840,6 @@
             if (xe .LE. xs) then
                print(" ")
-               print("range end for x-coordinate = "+xe+"m is equal or lower than start range = "+xs+"m")
+               print("range end for x-coordinate = "+\
+                     xe+"m is equal or lower than start range = "+xs+"m")
                print(" ")
                exit
@@ -790,5 +847,7 @@
             if (xe .EQ. xs+1) then
                print(" ")
-               print("range end for x-coordinate = "+xe+"m must be at least two more gridpoints greater than start range = "+xs+"m")
+               print("range end for x-coordinate = "+\
+                     xe+"m must be at least two more gridpoints "+\
+                     "greater than start range = "+xs+"m")
                print(" ")
                exit
@@ -797,5 +856,6 @@
             if (xe .LT. 0-delta_x/2)
                print(" ")
-               print("range end for x-coordinate = "+xe+"m is lower than first value = "+(0-delta_x/2)+"m")
+               print("range end for x-coordinate = "+\
+                     xe+"m is lower than first value = "+(0-delta_x/2)+"m")
                print(" ")
                exit
@@ -803,5 +863,6 @@
             if (xe .LT. xs) then
                print(" ")
-               print("range end for x-coordinate = "+xe+"m is lower than start range = "+xs+"m")
+               print("range end for x-coordinate = "+\
+                     xe+"m is lower than start range = "+xs+"m")
                print(" ")
                exit
@@ -815,5 +876,6 @@
       if (delta_y .EQ. -1) then
          print(" ") 
-         print("You cannot choose an end value for y, there are preseted layers for y")
+         print("You cannot choose an end value for y, "+\
+               "there are preset layers for y")
          print(" ")
          yend=ydim
@@ -822,5 +884,6 @@
       if (delta_y .EQ. -1) then
          print(" ") 
-         print("You cannot choose an end value for y, there are preseted layers for y")
+         print("You cannot choose an end value for y, "+\
+               "there are preset layers for y")
          print(" ")
          yend=ydim
@@ -828,5 +891,6 @@
          if (ye .GT. ydim*delta_y) then
             print(" ")
-            print("range end for y-coordinate = "+ye+"m is greater than last value = "+ydim*delta_y+"m")
+            print("range end for y-coordinate = "+\
+                  ye+"m is greater than last value = "+ydim*delta_y+"m")
             print(" ") 
             exit 
@@ -835,5 +899,7 @@
             if (ye .LE. 0-delta_y/2)
                print(" ")
-               print("range end for y-coordinate = "+ye+"m is equal or lower than first value = "+(0-delta_y/2)+"m")
+               print("range end for y-coordinate = "+\
+                     ye+"m is equal or lower than first value = "+\
+                     (0-delta_y/2)+"m")
                print(" ")
                exit
@@ -841,5 +907,6 @@
             if (ye .LE. ys) then
                print(" ")
-               print("range end for y-coordinate = "+ye+"m is equal or lower than start range = "+ys+"m")
+               print("range end for y-coordinate = "+\
+                    ye+"m is equal or lower than start range = "+ys+"m")
                print(" ")
                exit
@@ -847,5 +914,7 @@
             if (ye .EQ. ys+1) then
                print(" ")
-               print("range end for y-coordinate = "+ye+"m must be at least two more gridpoints greater than start range = "+ys+"m")
+               print("range end for y-coordinate = "+\
+                     ye+"m must be at least two more gridpoints greater "+\
+                     "than start range = "+ys+"m")
                print(" ")
                exit
@@ -854,5 +923,6 @@
             if (ye .LT. 0-delta_y/2)
                print(" ")
-               print("range end for y-coordinate = "+ye+"m is lower than first value = "+(0-delta_y/2)+"m")
+               print("range end for y-coordinate = "+\
+                     ye+"m is lower than first value = "+(0-delta_y/2)+"m")
                print(" ")
                exit
@@ -860,5 +930,6 @@
             if (ye .LT. ys) then
                print(" ")
-               print("range end for y-coordinate = "+ye+"m is lower than start range = "+ys+"m")
+               print("range end for y-coordinate = "+\
+                     ye+"m is lower than start range = "+ys+"m")
                print(" ")
                exit
@@ -872,5 +943,6 @@
       if (delta_z .EQ. -1) then
          print(" ") 
-         print("You cannot choose an end value for z, there are preseted layers for z")
+         print("You cannot choose an end value for z, "+\
+               "there are preset layers for z")
          print(" ")
          ze = zdim
@@ -879,5 +951,6 @@
       if (delta_z .EQ. -1) then
          print(" ") 
-         print("You cannot choose an end value for z, there are preseted layers for z")
+         print("You cannot choose an end value for z, "+\
+               "there are preset layers for z")
          print(" ")
          ze = zdim
@@ -885,5 +958,6 @@
          if (ze .GT. zdim) then
             print(" ")
-            print("range end for z-coordinate = "+ze+" is greater than last gridpoint = "+zdim)
+            print("range end for z-coordinate = "+\
+                  ze+" is greater than last gridpoint = "+zdim)
             print(" ") 
             exit 
@@ -892,5 +966,6 @@
             if (ze .LE. 0)
                print(" ")
-               print("range end for z-coordinate = "+ze+" is equal or lower than first gridpoint = 0")
+               print("range end for z-coordinate = "+\
+                     ze+" is equal or lower than first gridpoint = 0")
                print(" ")
                exit
@@ -898,5 +973,6 @@
             if (ze .LE. zs) then
                print(" ")
-               print("range end for z-coordinate = "+ze+" is equal or lower than start range = "+zs)
+               print("range end for z-coordinate = "+\
+                     ze+" is equal or lower than start range = "+zs)
                print(" ")
                exit
@@ -904,5 +980,7 @@
             if (ze .EQ. zs+1) then
                print(" ")
-               print("range end for z-coordinate = "+ze+" must be at least two more gridpoints greater than start range = "+zs)
+               print("range end for z-coordinate = "+\
+                     ze+" must be at least two more gridpoints "+\
+                     "greater than start range = "+zs)
                print(" ")
                exit
@@ -911,5 +989,6 @@
             if (ze .LT. 0)
                print(" ")
-               print("range end for z-coordinate = "+ze+" is lower than first gridpoint = 0")
+               print("range end for z-coordinate = "+\
+                     ze+" is lower than first gridpoint = 0")
                print(" ")
                exit
@@ -917,5 +996,6 @@
             if (ze .LT. zs) then
                print(" ")
-               print("range end for z-coordinate = "+ze+" is lower than start range = "+zs)
+               print("range end for z-coordinate = "+\
+                     ze+" is lower than start range = "+zs)
                print(" ")
                exit
@@ -1066,5 +1146,6 @@
 	 if (ar .GT. 0)
 	    do min_ar=0,3
-                array_minor_yl(4*(ar-1)+min_ar)= y_d(array_yl(ar-1))+(y_d(array_yl(ar))-y_d(array_yl(ar-1)))/5*(min_ar+1)
+                array_minor_yl(4*(ar-1)+min_ar)= y_d(array_yl(ar-1))+\
+                         (y_d(array_yl(ar))-y_d(array_yl(ar-1)))/5*(min_ar+1)
 	    end do 
 	 end if	 
@@ -1075,5 +1156,6 @@
 	 if (br .GT. 0)
 	    do min_br=0,3
-	       array_minor_xb(4*(br-1)+min_br)= x_d(array_xb(br-1))+(x_d(array_xb(br))-x_d(array_xb(br-1)))/5*(min_br+1)
+	       array_minor_xb(4*(br-1)+min_br)= x_d(array_xb(br-1))+\
+                         (x_d(array_xb(br))-x_d(array_xb(br-1)))/5*(min_br+1)
 	    end do 
 	 end if	
@@ -1099,5 +1181,6 @@
 	 if (ar .GT. 0)
 	    do min_ar=0,3
-	       array_minor_yl(4*(ar-1)+min_ar)= z_d(array_yl(ar-1))+(z_d(array_yl(ar))-z_d(array_yl(ar-1)))/5*(min_ar+1)
+	       array_minor_yl(4*(ar-1)+min_ar)= z_d(array_yl(ar-1))+\
+                          (z_d(array_yl(ar))-z_d(array_yl(ar-1)))/5*(min_ar+1)
 	    end do 
 	 end if	 
@@ -1108,5 +1191,6 @@
 	 if (br .GT. 0)
 	    do min_br=0,3
-	       array_minor_xb(4*(br-1)+min_br)= x_d(array_xb(br-1))+(x_d(array_xb(br))-x_d(array_xb(br-1)))/5*(min_br+1)
+	       array_minor_xb(4*(br-1)+min_br)= x_d(array_xb(br-1))+\
+                         (x_d(array_xb(br))-x_d(array_xb(br-1)))/5*(min_br+1)
 	    end do 
 	 end if	
@@ -1132,5 +1216,6 @@
 	 if (ar .GT. 0)
 	    do min_ar=0,3
-               array_minor_yl(4*(ar-1)+min_ar)= z_d(array_yl(ar-1))+(z_d(array_yl(ar))-z_d(array_yl(ar-1)))/5*(min_ar+1)
+               array_minor_yl(4*(ar-1)+min_ar)= z_d(array_yl(ar-1))+\
+                         (z_d(array_yl(ar))-z_d(array_yl(ar-1)))/5*(min_ar+1)
 	    end do 
 	 end if	 
@@ -1141,5 +1226,6 @@
 	 if (br .GT. 0)
 	    do min_br=0,3
-	       array_minor_xb(4*(br-1)+min_br)= y_d(array_xb(br-1))+(y_d(array_xb(br))-y_d(array_xb(br-1)))/5*(min_br+1)
+	       array_minor_xb(4*(br-1)+min_br)= y_d(array_xb(br-1))+\
+                         (y_d(array_xb(br))-y_d(array_xb(br-1)))/5*(min_br+1)
 	    end do 
 	 end if	
@@ -1229,6 +1315,8 @@
       if (xe .EQ. xs+1) then
          print(" ")
-         print("range end for x-coordinate="+xe*delta_x+"m) must be at least two") 
-         print("more gridpoints(="+2*delta_x+"m) greater than start range="+xs*delta_x+"m)")
+         print("range end for x-coordinate="+xe*delta_x+\
+               "m must be at least two") 
+         print("more gridpoints(="+2*delta_x+"m) greater than start range="+\
+               xs*delta_x+"m)")
          print(" ")
          exit
@@ -1238,6 +1326,8 @@
       if (ye .EQ. ys+1) then
          print(" ")
-         print("range end for y-coordinate="+ye*delta_y+"m) must be at least two") 
-         print("more gridpoints(="+2*delta_y+"m) greater than start range="+ys*delta_y+"m)")
+         print("range end for y-coordinate="+ye*delta_y+\
+               "m must be at least two") 
+         print("more gridpoints(="+2*delta_y+"m greater than start range="+\
+               ys*delta_y+"m)")
          print(" ")
          exit
@@ -1247,5 +1337,5 @@
       if (ze .EQ. zs+1) then
          print(" ")
-         print("range end for x-coordinate="+ze+") must be at least two") 
+         print("range end for z-coordinate="+ze+" must be at least two") 
          print("more gridpoints greater than start range="+zs+")")
          print(" ")
@@ -1307,12 +1397,52 @@
    no_zu1=0
 
-   do varn=dim-1,0,1        
+   ;****************************************************
+   ; Preparation of vector plots
+   ; ****************************************************       
+
+   do varn=dim-1,0,1 
+
+     if (vector .EQ. 1) then    
+        check_vec1 = isStrSubset( vec1,","+vNam(varn)+",")
+        if (check_vec1) then
+            temp = f[:]->$vNam(varn)$
+	    data_att = f_att->$vNam(varn)$
+            vect1=temp(:,zs:ze,ys:ye,xs:xe) 
+            delete(temp)
+         end if
+
+         check_vec2 = isStrSubset( vec2,","+vNam(varn)+",")
+         if (check_vec2) then
+            temp = f[:]->$vNam(varn)$
+	    data_att = f_att->$vNam(varn)$
+            vect2=temp(:,zs:ze,ys:ye,xs:xe) 
+            delete(temp)
+         end if
     
-      if (vector .EQ. 1) then    
-         check_vec1 = isStrSubset( vec1,","+vNam(varn)+",")
-         check_vec2 = isStrSubset( vec2,","+vNam(varn)+",")
-      end if
+         if (","+vNam(varn)+"," .EQ. vec1) then
+            v1=v1+1
+         end if
+         if (","+vNam(varn)+"," .EQ. vec2) then
+             v2=v2+1
+          end if
+     end if
+
+   end do
+
+
+
+   do varn=dim-1,0,1     
            
-      if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or. vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi" .or. vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or. vNam(varn) .eq. "y" .or. vNam(varn) .eq. "zu_xy" .or. vNam(varn) .eq. "zw_xy" .or. vNam(varn) .eq. "zu1_xy" .or. vNam(varn) .eq. "ind_z_xy" .or. vNam(varn) .eq. "y_xz" .or. vNam(varn) .eq. "yv_xz" .or. vNam(varn) .eq. "ind_y_xz" .or. vNam(varn) .eq. "x_yz" .or. vNam(varn) .eq. "xu_yz" .or. vNam(varn) .eq. "ind_x_yz") then
+      if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or.          \
+           vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or.          \
+           vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi" .or.      \
+           vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or.     \
+           vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or.         \
+           vNam(varn) .eq. "y" .or. vNam(varn) .eq. "zu_xy" .or.        \
+           vNam(varn) .eq. "zw_xy" .or. vNam(varn) .eq. "zu1_xy" .or.   \
+           vNam(varn) .eq. "ind_z_xy" .or. vNam(varn) .eq. "y_xz" .or.  \
+           vNam(varn) .eq. "yv_xz" .or. vNam(varn) .eq. "ind_y_xz" .or. \
+           vNam(varn) .eq. "x_yz" .or. vNam(varn) .eq. "xu_yz" .or.     \
+           vNam(varn) .eq. "ind_x_yz") then
          check = False
       else
@@ -1327,13 +1457,4 @@
       
          no_var=no_var+1
-
-         if (vector .EQ. 1) then
-            if (","+vNam(varn)+"," .EQ. vec1) then
-               v1=v1+1
-            end if
-            if (","+vNam(varn)+"," .EQ. vec2) then
-               v2=v2+1
-            end if
-         end if 
 
          if (xyc .EQ. 1) then
@@ -1348,5 +1469,6 @@
               .or. vNam(varn) .eq. "shf*_xy" .or. vNam(varn) .eq. "t*_xy"   \
               .or. vNam(varn) .eq. "u*_xy" .or. vNam(varn) .eq. "z0*_xy") then
-              ;these variables depend on zu1_xy and that's why they have only one z-layer
+              ;these variables depend on zu1_xy and that's why they have 
+              ;only one z-layer
               data(varn,:,0,:,:)=temp(:,0,ys:ye,xs:xe) 
               no_zu1=no_zu1+1
@@ -1368,10 +1490,4 @@
             delete(temp)
          end if
-         if (check_vec1) then
-            vect1=data(varn,:,:,:,:)
-         end if
-         if (check_vec2) then
-            vect2=data(varn,:,:,:,:)
-         end if
 
          data!0 = "var"
@@ -1381,6 +1497,8 @@
    	 data!4 = "x"  
 
-         MinVal(varn) = min(data(varn,start_time_step:end_time_step,0:(ze-zs),0:(ye-ys),0:(xe-xs)))
-         MaxVal(varn) = max(data(varn,start_time_step:end_time_step,0:(ze-zs),0:(ye-ys),0:(xe-xs)))
+         MinVal(varn) = min(data(varn,start_time_step:end_time_step,\
+                                               0:(ze-zs),0:(ye-ys),0:(xe-xs)))
+         MaxVal(varn) = max(data(varn,start_time_step:end_time_step,\
+                                               0:(ze-zs),0:(ye-ys),0:(xe-xs)))
 	 
 	 unit(varn) = data_att@units
@@ -1405,10 +1523,20 @@
    do varn=dim-1,0,1   
     
-      if (vector .EQ. 1) then    
-         check_vec1 = isStrSubset( vec1,","+vNam(varn)+",")
-         check_vec2 = isStrSubset( vec2,","+vNam(varn)+",")
-      end if
+      ;if (vector .EQ. 1) then    
+      ;   check_vec1 = isStrSubset( vec1,","+vNam(varn)+",")
+      ;   check_vec2 = isStrSubset( vec2,","+vNam(varn)+",")
+      ;end if
            
-      if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or. vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi" .or. vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or. vNam(varn) .eq. "y" .or. vNam(varn) .eq. "zu_xy" .or. vNam(varn) .eq. "zw_xy" .or. vNam(varn) .eq. "zu1_xy" .or. vNam(varn) .eq. "ind_z_xy" .or. vNam(varn) .eq. "y_xz" .or. vNam(varn) .eq. "yv_xz" .or. vNam(varn) .eq. "ind_y_xz" .or. vNam(varn) .eq. "x_yz" .or. vNam(varn) .eq. "xu_yz" .or. vNam(varn) .eq. "ind_x_yz") then
+      if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or.          \
+           vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or.          \
+           vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi" .or.      \
+           vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or.     \
+           vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or.         \
+           vNam(varn) .eq. "y" .or. vNam(varn) .eq. "zu_xy" .or.        \
+           vNam(varn) .eq. "zw_xy" .or. vNam(varn) .eq. "zu1_xy" .or.   \
+           vNam(varn) .eq. "ind_z_xy" .or. vNam(varn) .eq. "y_xz" .or.  \
+           vNam(varn) .eq. "yv_xz" .or. vNam(varn) .eq. "ind_y_xz" .or. \
+           vNam(varn) .eq. "x_yz" .or. vNam(varn) .eq. "xu_yz" .or.     \
+           vNam(varn) .eq. "ind_x_yz") then
          check = False
       else
@@ -1442,5 +1570,6 @@
       if (v1 .EQ. 0)then
          print(" ")
-         print("Component 1 for the vector-plot ('vec1') must be one of the varibles on the input file:")
+         print("Component 1 for the vector-plot ('vec1') must be one "+\
+               "of the variables on the input file:")
 	 print("- "+var_input)
 	 print("be sure to have one comma before and after the variable")
@@ -1451,5 +1580,6 @@
       if (v2 .EQ. 0)then
          print(" ")
-         print("Component 2 for the vector-plot ('vec2') must be one of the varibles on the input file:")
+         print("Component 2 for the vector-plot ('vec2') must be one "+\
+               "of the variables on the input file:")
 	 print("- "+var_input)
 	 print("be sure to have one comma before and after the variable")
@@ -1478,5 +1608,6 @@
                                          + no_time*no_layer/),graphic)
    else
-      plot=new((/no_time*no_layer*no_var - no_time*(no_layer-1)*no_zu1/),graphic)
+      plot=new((/no_time*no_layer*no_var - no_time*(no_layer-1)*no_zu1/)\
+                                                                ,graphic)
    end if
    dim_plot=dimsizes(plot)
@@ -1546,5 +1677,6 @@
             vecres@vcGlyphStyle     = "CurlyVector"   ; curly vectors
   	    vecres@vcRefMagnitudeF  = ref_mag         ; define vector ref mag
-  	    vecres@vcRefLengthF     = 0.05            ; define length of vec ref
+  	    vecres@vcRefLengthF     = 0.05            ; define length of 
+                                                      ; vec ref
   	    vecres@gsnRightString   = "Vector plot of "+vec1+" and "+vec2
 	    vecres@tmXBLabelFontHeightF   = font_size
@@ -1553,15 +1685,19 @@
             vecres@tiYAxisFontHeightF     = font_size
 	    if (sort .EQ. "time")then
-               vecres@gsnLeftString = "t=" + decimalPlaces(t_all(li)/3600,2,True) +"h   "+level	
+               vecres@gsnLeftString = "t=" + \
+                             decimalPlaces(t_all(li)/3600,2,True) +"h   "+level
 	    else
-	       vecres@gsnLeftString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) +"h   "+level	
+	       vecres@gsnLeftString = "t=" + \
+                             decimalPlaces(t_all(lo)/3600,2,True) +"h   "+level
 	    end if
 	    if (xyc .EQ. 1) then  
                vecres@tiXAxisString = "x (m)"
 	       vecres@tiYAxisString = "y (m)"   
-	       if (sort .EQ. "time")then                                          
-                  plot(n) = gsn_csm_vector(wks_ps,vect1(li,lo-los,:,:),vect2(li,lo-los,:,:),vecres)
+	       if (sort .EQ. "time")then
+                  plot(n) = gsn_csm_vector(wks_ps,vect1(li,lo-los,:,:),\
+                                               vect2(li,lo-los,:,:),vecres)
 	       else
-	          plot(n) = gsn_csm_vector(wks_ps,vect1(lo,li-lis,:,:),vect2(lo,li-lis,:,:),vecres)
+	          plot(n) = gsn_csm_vector(wks_ps,vect1(lo,li-lis,:,:),\
+                                                vect2(lo,li-lis,:,:),vecres)
 	       end if
 	    end if
@@ -1570,7 +1706,9 @@
 	       vecres@tiYAxisString = "z (m)" 
 	       if (sort .EQ. "time")then 
-	          plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,lo-los,:),vect2(li,:,lo-los,:),vecres)
+	          plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,lo-los,:),\
+                                               vect2(li,:,lo-los,:),vecres)
 	       else
-	          plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,li-lis,:),vect2(lo,:,li-lis,:),vecres)
+	          plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,li-lis,:),\
+                                                vect2(lo,:,li-lis,:),vecres)
 	       end if
 	    end if
@@ -1579,7 +1717,9 @@
 	       vecres@tiYAxisString = "z (m)" 
 	       if (sort .EQ. "time")then 
-	          plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,:,lo-los),vect2(li,:,:,lo-los),vecres)
+	          plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,:,lo-los),\
+                                                vect2(li,:,:,lo-los),vecres)
 	       else
-	          plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,:,li-lis),vect2(lo,:,:,li-lis),vecres)
+	          plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,:,li-lis),\
+                                                vect2(lo,:,:,li-lis),vecres)
 	       end if
 	    end if
@@ -1592,8 +1732,18 @@
 
       if (vector .EQ. 1 ) then    
-         check_vecp = isStrSubset( plotvec,","+vNam(varn)+",") 
+         check_vecp = isStrSubset( plotvec,","+vNam(varn)+",")
       end if 
      
-      if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or. vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi" .or. vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or. vNam(varn) .eq. "y" .or. vNam(varn) .eq. "zu_xy" .or. vNam(varn) .eq. "zw_xy" .or. vNam(varn) .eq. "zu1_xy" .or. vNam(varn) .eq. "ind_z_xy" .or. vNam(varn) .eq. "y_xz" .or. vNam(varn) .eq. "yv_xz" .or. vNam(varn) .eq. "ind_y_xz" .or. vNam(varn) .eq. "x_yz" .or. vNam(varn) .eq. "xu_yz" .or. vNam(varn) .eq. "ind_x_yz") then
+      if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or.          \
+           vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or.          \
+           vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi" .or.      \
+           vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or.     \
+           vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or.         \
+           vNam(varn) .eq. "y" .or. vNam(varn) .eq. "zu_xy" .or.        \
+           vNam(varn) .eq. "zw_xy" .or. vNam(varn) .eq. "zu1_xy" .or.   \
+           vNam(varn) .eq. "ind_z_xy" .or. vNam(varn) .eq. "y_xz" .or.  \
+           vNam(varn) .eq. "yv_xz" .or. vNam(varn) .eq. "ind_y_xz" .or. \
+           vNam(varn) .eq. "x_yz" .or. vNam(varn) .eq. "xu_yz" .or.     \
+           vNam(varn) .eq. "ind_x_yz") then
          check = False 
       else
@@ -1642,29 +1792,47 @@
                      end if
 
-                     if(vNam(varn) .eq. "lwps_xy" .or. vNam(varn) .eq. "pras_xy"       \
-                         .or. vNam(varn) .eq. "prrs_xy" .or. vNam(varn) .eq. "qsws_xy" \
-                         .or. vNam(varn) .eq. "shfs_xy" .or. vNam(varn) .eq. "ts_xy"   \
-                         .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy"    \
-                         .or. vNam(varn) .eq. "lwp*_xy" .or. vNam(varn) .eq. "pra*_xy" \
-                         .or. vNam(varn) .eq. "prr*_xy" .or. vNam(varn) .eq. "qsws*_xy"\
-                         .or. vNam(varn) .eq. "shf*_xy" .or. vNam(varn) .eq. "t*_xy"   \
-                         .or. vNam(varn) .eq. "u*_xy" .or. vNam(varn) .eq. "z0*_xy") then
+                     if(vNam(varn) .eq. "lwps_xy"  .or. \
+                        vNam(varn) .eq. "pras_xy"  .or. \
+                        vNam(varn) .eq. "prrs_xy"  .or. \
+                        vNam(varn) .eq. "qsws_xy"  .or. \
+                        vNam(varn) .eq. "shfs_xy"  .or. \
+                        vNam(varn) .eq. "ts_xy"    .or. \
+                        vNam(varn) .eq. "us_xy"    .or. \
+                        vNam(varn) .eq. "z0s_xy"   .or. \
+                        vNam(varn) .eq. "lwp*_xy"  .or. \
+                        vNam(varn) .eq. "pra*_xy"  .or. \
+                        vNam(varn) .eq. "prr*_xy"  .or. \
+                        vNam(varn) .eq. "qsws*_xy" .or. \
+                        vNam(varn) .eq. "shf*_xy"  .or. \
+                        vNam(varn) .eq. "t*_xy"    .or. \
+                        vNam(varn) .eq. "u*_xy"    .or. \
+                        vNam(varn) .eq. "z0*_xy") then
                          loe = 0
                          level = "=" + zu1(0) + "m"
                      end if
                     
-                     cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) +"h  z"+level           
-                     plot(n) = gsn_csm_contour(wks_ps,data(varn,li,lo-los,:,:),cs_res) 
+                     cs_res@gsnCenterString = "t=" + \
+                       decimalPlaces(t_all(li)/3600,2,True) +"h  z"+level
+                     plot(n) = gsn_csm_contour(wks_ps,\
+                                           data(varn,li,lo-los,:,:),cs_res) 
                      if (vector .EQ. 1 .AND. check_vecp) then
-                        vecres                  = True            ; vector only resources
-  			vecres@gsnDraw          = False           ; don't draw
-  	                vecres@gsnFrame         = False           ; don't advance frame
-  	                vecres@vcGlyphStyle     = "CurlyVector"   ; curly vectors
-  		        vecres@vcRefMagnitudeF  = ref_mag         ; define vector ref mag
-  		        vecres@vcRefLengthF     = 0.05            ; define length of vec ref  
-                        vecres@gsnRightString   = " "
-                        vecres@gsnLeftString    = " " 
-  			vecres@tiXAxisString    = " "   
-                        plot_vec=gsn_csm_vector(wks_ps,vect1(li,lo-los,:,:),vect2(li,lo-los,:,:),vecres)
+                        vecres                 = True           ; vector only
+                                                                ; resources
+  			vecres@gsnDraw         = False          ; don't draw
+  	                vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  	                vecres@vcGlyphStyle    = "CurlyVector"  ; curly 
+                                                                ; vectors
+  		        vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  		        vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref  
+                        vecres@gsnRightString  = " "
+                        vecres@gsnLeftString   = " " 
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,\
+                              vect1(li,lo-los,:,:),vect2(li,lo-los,:,:),vecres)
                         overlay(plot(n), plot_vec)
                      end if                         
@@ -1682,30 +1850,49 @@
                      end if 
        
-                     if(vNam(varn) .eq. "lwps_xy" .or. vNam(varn) .eq. "pras_xy"       \
-                         .or. vNam(varn) .eq. "prrs_xy" .or. vNam(varn) .eq. "qsws_xy" \
-                         .or. vNam(varn) .eq. "shfs_xy" .or. vNam(varn) .eq. "ts_xy"   \
-                         .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy"    \
-                         .or. vNam(varn) .eq. "lwp*_xy" .or. vNam(varn) .eq. "pra*_xy" \
-                         .or. vNam(varn) .eq. "prr*_xy" .or. vNam(varn) .eq. "qsws*_xy"\
-                         .or. vNam(varn) .eq. "shf*_xy" .or. vNam(varn) .eq. "t*_xy"   \
-                         .or. vNam(varn) .eq. "u*_xy" .or. vNam(varn) .eq. "z0*_xy") then
+                     if(vNam(varn) .eq. "lwps_xy"  .or. \
+                        vNam(varn) .eq. "pras_xy"  .or. \
+                        vNam(varn) .eq. "prrs_xy"  .or. \
+                        vNam(varn) .eq. "qsws_xy"  .or. \
+                        vNam(varn) .eq. "shfs_xy"  .or. \
+                        vNam(varn) .eq. "ts_xy"    .or. \
+                        vNam(varn) .eq. "us_xy"    .or. \
+                        vNam(varn) .eq. "z0s_xy"   .or. \
+                        vNam(varn) .eq. "lwp*_xy"  .or. \
+                        vNam(varn) .eq. "pra*_xy"  .or. \
+                        vNam(varn) .eq. "prr*_xy"  .or. \
+                        vNam(varn) .eq. "qsws*_xy" .or. \
+                        vNam(varn) .eq. "shf*_xy"  .or. \
+                        vNam(varn) .eq. "t*_xy"    .or. \
+                        vNam(varn) .eq. "u*_xy"    .or. \
+                        vNam(varn) .eq. "z0*_xy") then
                          lie = 0
                          level = "=" + zu1(0) + "m"
                      end if
                 
-                     cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + "h  z"+ level
+                     cs_res@gsnCenterString = "t=" + \
+                           decimalPlaces(t_all(lo)/3600,2,True) + "h  z"+ level
                      
-                     plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,li-lis,:,:),cs_res)
+                     plot(n) = gsn_csm_contour(wks_ps,\
+                                            data(varn,lo,li-lis,:,:),cs_res)
                      if (vector .EQ. 1 .AND. check_vecp) then
-                        vecres                  = True            ; vector only resources
-  			vecres@gsnDraw          = False           ; don't draw
-  			vecres@gsnFrame         = False           ; don't advance frame
-  			vecres@vcGlyphStyle     = "CurlyVector"   ; curly vectors
-  			vecres@vcRefMagnitudeF  = ref_mag         ; define vector ref mag
-  			vecres@vcRefLengthF     = 0.05            ; define length of vec ref
-  			vecres@gsnRightString   = " "             ; turn off right string
-  			vecres@gsnLeftString    = " "             ; turn off left string
-  			vecres@tiXAxisString    = " "   
-                        plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li-lis,:,:),vect2(lo,li-lis,:,:),vecres)
+                        vecres                 = True           ; vector only
+                                                                ; resources
+  			vecres@gsnDraw         = False          ; don't draw
+  			vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  			vecres@vcGlyphStyle    = "CurlyVector"  ; curly vectors
+  			vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  			vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref
+  			vecres@gsnRightString  = " "            ; turn off 
+                                                                ; right string
+  			vecres@gsnLeftString   = " "            ; turn off 
+                                                                ; left string
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li-lis,:,:),\
+                                                   vect2(lo,li-lis,:,:),vecres)
                         overlay(plot(n), plot_vec)
                      end if
@@ -1727,17 +1914,28 @@
                         level = "=" + y_d(lo) + "m"
                      end if
-                     cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) + "h  y"+ level
-                     plot(n) = gsn_csm_contour(wks_ps,data(varn,li,:,lo-los,:),cs_res)
+                     cs_res@gsnCenterString = "t=" + \
+                           decimalPlaces(t_all(li)/3600,2,True) + "h  y"+ level
+                     plot(n) = gsn_csm_contour(wks_ps,\
+                                              data(varn,li,:,lo-los,:),cs_res)
                      if (vector .EQ. 1 .AND. check_vecp) then
-                        vecres                  = True            ; vector only resources
-  			vecres@gsnDraw          = False           ; don't draw
-  			vecres@gsnFrame         = False           ; don't advance frame
-  			vecres@vcGlyphStyle     = "CurlyVector"   ; curly vectors
-  			vecres@vcRefMagnitudeF  = ref_mag         ; define vector ref mag
-  			vecres@vcRefLengthF     = 0.05            ; define length of vec ref
-  			vecres@gsnRightString   = " "             ; turn off right string
-  			vecres@gsnLeftString    = " "             ; turn off left string
-  			vecres@tiXAxisString    = " "   
-                        plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,lo-los,:),vect2(li,:,lo-los,:),vecres)
+                        vecres                 = True           ; vector only 
+                                                                ; resources
+  			vecres@gsnDraw         = False          ; don't draw
+  			vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  			vecres@vcGlyphStyle    = "CurlyVector"  ; curly vectors
+  			vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  			vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref
+  			vecres@gsnRightString  = " "            ; turn off 
+                                                                ; right string
+  			vecres@gsnLeftString   = " "            ; turn off 
+                                                                ; left string
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,lo-los,:),\
+                                                   vect2(li,:,lo-los,:),vecres)
                         overlay(plot(n), plot_vec)
                      end if
@@ -1750,17 +1948,28 @@
                         level = "=" + y_d(li) + "m"
                      end if
-                     cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + "h  y"+ level
-                     plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,:,li-lis,:),cs_res)
+                     cs_res@gsnCenterString = "t=" + \
+                           decimalPlaces(t_all(lo)/3600,2,True) + "h  y"+ level
+                     plot(n) = gsn_csm_contour(wks_ps,\
+                                              data(varn,lo,:,li-lis,:),cs_res)
                      if (vector .EQ. 1 .AND. check_vecp) then
-                        vecres                  = True            ; vector only resources
-  			vecres@gsnDraw          = False           ; don't draw
-  			vecres@gsnFrame         = False           ; don't advance frame
-  			vecres@vcGlyphStyle     = "CurlyVector"   ; curly vectors
-  			vecres@vcRefMagnitudeF  = ref_mag         ; define vector ref mag
-  			vecres@vcRefLengthF     = 0.05            ; define length of vec ref
-  			vecres@gsnRightString   = " "             ; turn off right string
-  			vecres@gsnLeftString    = " "             ; turn off left string
-  			vecres@tiXAxisString    = " "   
-                        plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,li-lis,:),vect2(lo,:,li-lis,:),vecres)
+                        vecres                 = True           ; vector only 
+                                                                ; resources
+  			vecres@gsnDraw         = False          ; don't draw
+  			vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  			vecres@vcGlyphStyle    = "CurlyVector"  ; curly vectors
+  			vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  			vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref
+  			vecres@gsnRightString  = " "            ; turn off 
+                                                                ; right string
+  			vecres@gsnLeftString   = " "            ; turn off 
+                                                                ; left string
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,li-lis,:),\
+                                                   vect2(lo,:,li-lis,:),vecres)
                         overlay(plot(n), plot_vec)
                      end if
@@ -1782,17 +1991,28 @@
                         level = "=" + x_d(lo) + "m"
                      end if
-                     cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) + "h  x"+ level
-                     plot(n) = gsn_csm_contour(wks_ps,data(varn,li,:,:,lo-los),cs_res)
+                     cs_res@gsnCenterString = "t=" + \
+                          decimalPlaces(t_all(li)/3600,2,True) + "h  x"+ level
+                     plot(n) = gsn_csm_contour(wks_ps,\
+                                          data(varn,li,:,:,lo-los),cs_res)
     	             if (vector .EQ. 1 .AND. check_vecp) then
-                        vecres                  = True            ; vector only resources
-  			vecres@gsnDraw          = False           ; don't draw
-  			vecres@gsnFrame         = False           ; don't advance frame
-  			vecres@vcGlyphStyle     = "CurlyVector"   ; curly vectors
-  			vecres@vcRefMagnitudeF  = ref_mag         ; define vector ref mag
-  			vecres@vcRefLengthF     = 0.05            ; define length of vec ref
-  			vecres@gsnRightString   = " "             ; turn off right string
-  			vecres@gsnLeftString    = " "             ; turn off left string
-  			vecres@tiXAxisString    = " "   
-                        plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,:,lo-los),vect2(li,:,:,lo-los),vecres)
+                        vecres                 = True           ; vector only 
+                                                                ; resources
+  			vecres@gsnDraw         = False          ; don't draw
+  			vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  			vecres@vcGlyphStyle    = "CurlyVector"  ; curly vectors
+  			vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  			vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref
+  			vecres@gsnRightString  = " "            ; turn off 
+                                                                ; right string
+  			vecres@gsnLeftString   = " "            ; turn off 
+                                                                ; left string
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,:,lo-los),\
+                                                   vect2(li,:,:,lo-los),vecres)
                         overlay(plot(n), plot_vec)
                      end if
@@ -1805,17 +2025,28 @@
                         level = "=" + x_d(li) + "m"
                      end if
-                     cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + "h  x"+ level
-                     plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,:,:,li-lis),cs_res)
+                     cs_res@gsnCenterString = "t=" + \
+                           decimalPlaces(t_all(lo)/3600,2,True) + "h  x"+ level
+                     plot(n) = gsn_csm_contour(wks_ps,\
+                                          data(varn,lo,:,:,li-lis),cs_res)
                      if (vector .EQ. 1 .AND. check_vecp)then
-                        vecres                  = True            ; vector only resources
-  			vecres@gsnDraw          = False           ; don't draw
-  			vecres@gsnFrame         = False           ; don't advance frame
-  			vecres@vcGlyphStyle     = "CurlyVector"   ; curly vectors
-  			vecres@vcRefMagnitudeF  = ref_mag         ; define vector ref mag
-  			vecres@vcRefLengthF     = 0.05            ; define length of vec ref
-  			vecres@gsnRightString   = " "             ; turn off right string
-  			vecres@gsnLeftString    = " "             ; turn off left string
-  			vecres@tiXAxisString    = " "   
-                        plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,:,li-lis),vect2(lo,:,:,li-lis),vecres)
+                        vecres                 = True           ; vector only 
+                                                                ;resources
+  			vecres@gsnDraw         = False          ; don't draw
+  			vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  			vecres@vcGlyphStyle    = "CurlyVector"  ; curly vectors
+  			vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  			vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref
+  			vecres@gsnRightString  = " "            ; turn off 
+                                                                ; right string
+  			vecres@gsnLeftString   = " "            ; turn off 
+                                                                ; left string
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,:,li-lis),\
+                                                   vect2(lo,:,:,li-lis),vecres)
                         overlay(plot(n), plot_vec)
                      end if 
@@ -1835,6 +2066,8 @@
 
    if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then 
-      if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. no_time*no_layer*(no_var+1) .gt. no_rows*no_columns) then
-         gsn_panel(wks_ps,plot(0:(no_time*no_layer*(no_var+1))-1),(/no_var+1,no_layer*no_time/),cs_resP)
+      if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \
+           no_time*no_layer*(no_var+1) .gt. no_rows*no_columns) then
+         gsn_panel(wks_ps,plot(0:(no_time*no_layer*(no_var+1))-1),\
+                                       (/no_var+1,no_layer*no_time/),cs_resP)
          print(" ")
          print("Outputs to .eps or .epsi have only one frame")
@@ -1843,8 +2076,10 @@
          do np = 0,dim_plot-1,no_rows*no_columns   
             if ( np + no_rows*no_columns .gt. dim_plot-1) then 
-               gsn_panel(wks_ps, plot(np:dim_plot-1),(/no_rows,no_columns/),cs_resP)
+               gsn_panel(wks_ps, plot(np:dim_plot-1),(/no_rows,no_columns/),\
+                                                                      cs_resP)
                no_frames = no_frames + 1
             else
-               gsn_panel(wks_ps, plot(np:np+no_rows*no_columns-1),(/no_rows,no_columns/),cs_resP)
+               gsn_panel(wks_ps, plot(np:np+no_rows*no_columns-1),\
+                                              (/no_rows,no_columns/),cs_resP)
                no_frames = no_frames + 1
             end if
@@ -1852,5 +2087,6 @@
       end if
    else       
-      if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. dim_plot .gt. no_rows*no_columns) then 
+      if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") \
+                               .AND. dim_plot .gt. no_rows*no_columns) then 
          gsn_panel(wks_ps,plot(0:dim_plot-1),(/dim_plot,1/),cs_resP)
          print(" ")
@@ -1860,8 +2096,10 @@
          do np = 0,dim_plot-1,no_rows*no_columns  
             if ( np + no_rows*no_columns .gt. dim_plot-1) then
-               gsn_panel(wks_ps, plot(np:dim_plot-1),(/no_rows,no_columns/),cs_resP)
+               gsn_panel(wks_ps, plot(np:dim_plot-1),(/no_rows,no_columns/),\
+                                                                     cs_resP)
                no_frames = no_frames + 1
             else
-               gsn_panel(wks_ps, plot(np:np+no_rows*no_columns-1),(/no_rows,no_columns/),cs_resP)
+               gsn_panel(wks_ps, plot(np:np+no_rows*no_columns-1),\
+                                              (/no_rows,no_columns/),cs_resP)
                no_frames = no_frames + 1
             end if
Index: /palm/trunk/SCRIPTS/NCL/profiles.ncl
===================================================================
--- /palm/trunk/SCRIPTS/NCL/profiles.ncl	(revision 565)
+++ /palm/trunk/SCRIPTS/NCL/profiles.ncl	(revision 566)
@@ -24,5 +24,6 @@
       print("Neither the personal configuration file '.ncl.config' exists in")
       print("~/palm/current_version")
-      print("nor the default configuration file '.ncl.config.default' exists in")
+      print("nor the default configuration file '.ncl.config.default' "+\
+            "exists in")
       print(palm_bin_path + "/NCL")
       print(" ")
@@ -60,6 +61,6 @@
    file_in   = new(no_files,string)
    file_in_1 = new(no_files,logical)
-   start_f   = new(no_files,integer)
-   end_f     = new(no_files,integer)
+   start_f_t = new(no_files,integer)
+   end_f_t   = new(no_files,integer)
    
    if (file_1 .EQ. "File in") then
@@ -73,22 +74,24 @@
    file_in_1(0) = False
    if (isStrSubset(file_in(0), ".nc"))then
-      start_f_1 = -2
-      end_f_1 = -2 
+      start_f = -2
+      end_f = -2 
       file_in_1(0) = True     
    end if  
-   if (start_f_1 .EQ. -1)then
-      print(" ")
-      print("'start_f_1' must be one of the cyclic numbers (at least 0) of your input file(s)")
+   if (start_f .EQ. -1)then
+      print(" ")
+      print("'start_f' must be one of the cyclic numbers (at least 0) "+\
+            "of your input file(s)")
       print(" ")  
       exit
    end if 
-   if (end_f_1 .EQ. -1)then
-      print(" ")
-      print("'end_f_1' must be one of the cyclic numbers (at least 0) of your input file(s)")
+   if (end_f .EQ. -1)then
+      print(" ")
+      print("'end_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
       print(" ")  
       exit
    end if            
-   start_f(0) = start_f_1 
-   end_f(0) = end_f_1    
+   start_f_t(0) = start_f 
+   end_f_t(0) = end_f   
  
    if (no_files .GT. 1) then
@@ -109,5 +112,6 @@
       if (start_f_2 .EQ. -1)then
          print(" ")
-         print("'start_f_2' must be one of the cyclic numbers (at least 0) of your input file(s)")
+         print("'start_f_2' must be one of the cyclic numbers (at least 0) "+\
+              "of your input file(s)")
          print(" ")  
          exit
@@ -115,5 +119,6 @@
       if (end_f_2 .EQ. -1)then
          print(" ")
-         print("'end_f_2' must be one of the cyclic numbers (at least 0) of your input file(s)")
+         print("'end_f_2' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
          print(" ")  
          exit
@@ -140,5 +145,6 @@
       if (start_f_3 .EQ. -1)then
          print(" ")
-         print("'start_f_3' must be one of the cyclic numbers (at least 0) of your input file(s)")
+         print("'start_f_3' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
          print(" ")  
          exit
@@ -146,5 +152,6 @@
       if (end_f_3 .EQ. -1)then
          print(" ")
-         print("'end_f_3' must be one of the cyclic numbers (at least 0) of your input file(s)")
+         print("'end_f_3' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
          print(" ")  
          exit
@@ -171,5 +178,6 @@
       if (start_f_4 .EQ. -1)then
          print(" ")
-         print("'start_f_4' must be one of the cyclic numbers (at least 0) of your input file(s)")
+         print("'start_f_4' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
          print(" ")  
          exit
@@ -177,5 +185,6 @@
       if (end_f_4 .EQ. -1)then
          print(" ")
-         print("'end_f_4' must be one of the cyclic numbers (at least 0) of your input file(s)")
+         print("'end_f_4' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
          print(" ")  
          exit
@@ -202,5 +211,6 @@
       if (start_f_5 .EQ. -1)then
          print(" ")
-         print("'start_f_5' must be one of the cyclic numbers (at least 0) of your input file(s)")
+         print("'start_f_5' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
          print(" ")  
          exit
@@ -208,5 +218,6 @@
       if (end_f_5 .EQ. -1)then
          print(" ")
-         print("'end_f_5' must be one of the cyclic numbers (at least 0) of your input file(s)")
+         print("'end_f_5' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
          print(" ")  
          exit
@@ -233,5 +244,6 @@
       if (start_f_6 .EQ. -1)then
          print(" ")
-         print("'start_f_6' must be one of the cyclic numbers (at least 0) of your input file(s)")
+         print("'start_f_6' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
          print(" ")  
          exit
@@ -239,5 +251,6 @@
       if (end_f_6 .EQ. -1)then
          print(" ")
-         print("'end_f_6' must be one of the cyclic numbers (at least 0) of your input file(s)")
+         print("'end_f_6' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
          print(" ")  
          exit
@@ -248,5 +261,8 @@
 
    
-   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. format_out .NE. "png")then
+   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND.  \
+      format_out .NE. "eps" .AND. format_out .NE. "ps" .AND.    \
+      format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \
+      format_out .NE. "png")then
       print(" ")
       print("'format_out = "+format_out+"' is invalid and set to'x11'")
@@ -273,5 +289,6 @@
       over = 0
       print(" ")
-      print("If you have more than one input file - you cannot overlay variables: over is set to 0")
+      print("If you have more than one input file - you cannot overlay "+\
+            "variables: over is set to 0")
       print(" ")
    end if
@@ -286,5 +303,6 @@
       combine = 0
       print(" ")
-      print("If you have more than one input file you cannot combine variables: combine is set to 0")
+      print("If you have more than one input file you cannot combine "+\
+            "variables: combine is set to 0")
       print(" ")
    end if   
@@ -336,5 +354,5 @@
    do nof=0,no_files-1
 
-   files=new(end_f(nof)-start_f(nof)+1,string)
+   files=new(end_f_t(nof)-start_f_t(nof)+1,string)
    if (file_in_1(nof))then
       if (isfilepresent(file_in(nof)))then
@@ -347,13 +365,14 @@
       end if
    else
-      if (start_f(nof) .EQ. 0)then
+      if (start_f_t(nof) .EQ. 0)then
          if (isfilepresent(file_in(nof)+".nc"))then
             files(0)=file_in(nof)+".nc"
-            do i=1,end_f(nof)
+            do i=1,end_f_t(nof)
    	       if (isfilepresent(file_in(nof)+"."+i+".nc"))then    
                   files(i)=file_in(nof)+"."+i+".nc"
 	       else
 	          print(" ")
-                  print("Input file: '"+file_in(nof)+"."+i+".nc' does not exist")
+                  print("Input file: '"+file_in(nof)+"."+i+".nc' does not "+\
+                        "exist")
                   print(" ")
                   exit  
@@ -367,7 +386,7 @@
          end if
       else
-         do i=start_f(nof),end_f(nof)
+         do i=start_f_t(nof),end_f_t(nof)
             if (isfilepresent(file_in(nof)+"."+i+".nc"))then    
-               files(i-start_f(nof))=file_in(nof)+"."+i+".nc"
+               files(i-start_f_t(nof))=file_in(nof)+"."+i+".nc"
    	    else
 	       print(" ")
@@ -392,5 +411,6 @@
       if (dim0 .NE. dim)then
          print(" ")
-	 print("There are 'no_files'="+no_files+" input files but they do not contain the same variables")
+	 print("There are 'no_files'="+no_files+" input files but they do "+\
+               "not contain the same variables")
          print(" ")
          exit
@@ -399,5 +419,6 @@
             if (vNam0(i) .NE. vNam(i))then
                print(" ")
-               print("There are 'no_files'="+no_files+" input files but they do not contain the same variables")
+               print("There are 'no_files'="+no_files+" input files but "+\
+                     "they do not contain the same variables")
                print(" ")
                exit
@@ -423,5 +444,6 @@
    prof3d = 0
    do varn = dim-1,0,1
-      if ( isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then
+      if ( isStrSubset( vNam(varn), "zu_3d") .OR. \
+           isStrSubset( vNam(varn), "zw_3d")) then
          prof3d = 1
 	 break
@@ -475,5 +497,6 @@
 
       do j=0,comma-2
-         vNam_temp(j) = charactertostring(var_char(indices(j)+1:indices(j+1)-1))
+         vNam_temp(j) = charactertostring(\
+                                   var_char(indices(j)+1:indices(j+1)-1))
       end do
 
@@ -548,5 +571,5 @@
     end if
 
-   ;-----------------------------------------------------below steps only for first file -> nof=0
+   ;---------below steps only for first file -> nof=0
    if (nof .EQ. 0) then
 
@@ -564,5 +587,6 @@
  
    do varn=0,dim-1
-      if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then
+      if ( isStrSubset( vNam(varn), "time") .OR. \
+           isStrSubset( vNam(varn), "NORM")) then
          continue
       end if
@@ -616,6 +640,6 @@
                                           break
                                        else
-                                          if(vNam(varn) .EQ. "es" .OR. isStrSubset(vNam(varn), "es_")\
-                                             .OR. vNam(varn) .EQ. "e*" .OR. isStrSubset(vNam(varn), "e*_"))then
+                                          if(vNam(varn) .EQ. "es" .OR. \
+                                           isStrSubset(vNam(varn), "es_") .OR. vNam(varn) .EQ. "e*" .OR. isStrSubset(vNam(varn), "e*_"))then
                                              z_u = f_att->$vNam(varn+1)$ 
                                              break
@@ -881,5 +905,6 @@
       co=0
       do varn=0,dim-1      
-         if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then
+         if ( isStrSubset( vNam(varn), "time") .OR. \
+              isStrSubset( vNam(varn), "NORM")) then
             check = False
          else
@@ -983,5 +1008,7 @@
       if (start_time_step .GT. t_all(nt-1)/3600)then
          print(" ")
-         print("'start_time_step' = "+ start_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
+         print("'start_time_step' = "+ start_time_step +"h is greater "+\
+               "than last time step = " \
+               + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
          print(" ")
          print("Select another 'start_time_step'")
@@ -991,5 +1018,6 @@
       if (start_time_step .LT. t_all(0)/3600)then
          print(" ")
-         print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
+         print("'start_time_step' = "+ start_time_step +"h is lower "+\
+               "than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
          print(" ")
          exit
@@ -998,5 +1026,6 @@
 
    do i=0,nt-1    
-      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND.\
+          start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
          st=i
          break
@@ -1021,5 +1050,7 @@
       if (end_time_step .GT. t_all(nt-1)/3600)then
          print(" ")
-         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")
+         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")
          print(" ")
          print("Select another 'end_time_step'")  
@@ -1029,5 +1060,6 @@
       if (end_time_step .LT. start_time_step/3600)then
          print(" ")
-         print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h")
+         print("'end_time_step' = "+ end_time_step +"h is lower "+\
+               "than 'start_time_step' = "+start_time_step+"h")
          print(" ")
          print("Select another 'start_time_step' or 'end_time_step'")
@@ -1038,5 +1070,6 @@
 
    do i=0,nt-1     
-      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND.\
+          end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
          et=i
          break
@@ -1072,15 +1105,20 @@
    if (time_stride .GE. no_time) then
       print(" ")
-      print("'time_stride' is greater equal than number of available time steps,")
+      print("'time_stride' is greater equal than number of available "+\
+           "time steps,")
       print("=> 'time_stride' is set to 1")
       time_stride = 1
    end if
 
-   ti_in = ispan(start_time_step,end_time_step,time_stride) ;ti_in contents the time indices to plot
+   ti_in = ispan(start_time_step,end_time_step,time_stride) ;ti_in contents 
+                                                            ;the time indices 
+                                                            ;to plot
    np    = dimsizes(ti_in)  
 
    print(" ")
-   print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step)
-   print("                     till "+t_all(ti_in(np-1))/3600+" h = "+t_all(ti_in(np-1))+" s => index = "+end_time_step)
+   print("Output of time steps from "+t_all(start_time_step)/3600+\
+         " h = "+t_all(start_time_step)+" s => index = "+start_time_step)
+   print("                     till "+t_all(ti_in(np-1))/3600+" h = "\
+        +t_all(ti_in(np-1))+" s => index = "+end_time_step)
    print("                     with temporal stride = "+time_stride)
    print(" ")
@@ -1091,9 +1129,8 @@
    ; ****************************************************
    
-   legend_label=new(np,double)
+   legend_label=new(np,string)
    do p=0, np-1
-      legend_label(p)=decimalPlaces(t_all(ti_in(p))/3600,3,True)         
+      legend_label(p)=sprintf("%6.2f", t_all(ti_in(p))/3600)
    end do
-   
 
    ; ***************************************************
@@ -1150,5 +1187,6 @@
          res@xyMonoDashPattern       = True  
          print(" ") 
-         print("If you use more than one file, patterns for different timesteps cannot be used")
+         print("If you use more than one file, patterns for different "+\
+               "timesteps cannot be used")
          print(" ") 
       end if       
@@ -1202,5 +1240,6 @@
             if (min_z .GE. max(z_w) ) then
                print(" ")
-               print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_w)+")")
+               print("Minimum of height ('min_z'="+min_z+") is greater "+\
+                     "than available heights (="+max(z_w)+")")
                print(" ")
                exit
@@ -1209,5 +1248,6 @@
 	    if (min_z .GE. max(z_u) ) then
                print(" ")
-               print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_u)+")")
+               print("Minimum of height ('min_z'="+min_z+") is greater "+\
+                     "than available heights (="+max(z_u)+")")
                print(" ")
                exit
@@ -1217,5 +1257,6 @@
             if (min_z .LT. z_u(1) ) then
                print(" ")
-               print("Begin height 'min_z' at least at level k=1 (="+z_u(1)+"m) due to the logarithmic scale of the y-axis")
+               print("Begin height 'min_z' at least at level k=1 (="+\
+                     z_u(1)+"m) due to the logarithmic scale of the y-axis")
                print(" ")
                exit
@@ -1224,5 +1265,6 @@
 	    if (min_z .LT. z_w(1) ) then
                print(" ")
-               print("Begin height 'min_z' at least at level k=1 (="+z_w(1)+"m) due to the logarithmic scale of the y-axis")
+               print("Begin height 'min_z' at least at level k=1 (="+\
+                     z_w(1)+"m) due to the logarithmic scale of the y-axis")
                print(" ")
                exit
@@ -1244,5 +1286,6 @@
          if (min_z .GE. max(z_w) ) then
             print(" ")
-            print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_w)+")")
+            print("Minimum of height ('min_z'="+min_z+") is greater than "+\
+                  "available heights (="+max(z_w)+")")
             print(" ")
             exit
@@ -1254,5 +1297,6 @@
 	 if (min_z .GE. max(z_u) ) then
             print(" ")
-            print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_u)+")")
+            print("Minimum of height ('min_z'="+min_z+") is greater than "+\
+                  "available heights (="+max(z_u)+")")
             print(" ")
             exit
@@ -1274,5 +1318,6 @@
       if (max_z .GT. max(z_w) ) then
          print(" ")
-         print("Maximum of height ('max_z'="+max_z+") is greater than available heights (="+max(z_w)+")")
+         print("Maximum of height ('max_z'="+max_z+") is greater than "+\
+               "available heights (="+max(z_w)+")")
          print(" ")
          exit
@@ -1359,5 +1404,5 @@
 
    end if
-   ;------------------------------------------------------ above steps only for first file
+   ;-------above steps only for first file
 
    ; ***************************************************
@@ -1535,5 +1580,6 @@
    if (start_x .GT. dimx-1)then
       print(" ")
-      print("'start_x' is greater than available x-range and set to maximum of x-range (excluding ghostpoint)")
+      print("'start_x' is greater than available x-range and set to "+\
+            "maximum of x-range (excluding ghostpoint)")
       print(" ")
       start_x=dimx-2
@@ -1546,5 +1592,6 @@
    if (end_x .GT. dimx-1)then
       print(" ")
-      print("'end_x' = "+end_x+" is greater than available x-range and set to maximum of x-range (excluding ghostpoint)")
+      print("'end_x' = "+end_x+" is greater than available x-range and set "+\
+            "to maximum of x-range (excluding ghostpoint)")
       print(" ")
       end_x=dimx-2
@@ -1552,5 +1599,6 @@
    if (end_x .LT. start_x)then
       print(" ")
-      print("'end_x' = "+end_x+" is lower than 'start_x' = "+start_x+" and set to maximum of x-range (excluding ghostpoint)")
+      print("'end_x' = "+end_x+" is lower than 'start_x' = "+start_x+\
+            " and set to maximum of x-range (excluding ghostpoint)")
       print(" ")
       end_x=dimx-2
@@ -1564,5 +1612,6 @@
    if (start_y .GT. dimy-1)then
       print(" ")
-      print("'start_y' is greater than available y-range and set to maximum of y-range (excluding ghostpoint)")
+      print("'start_y' is greater than available y-range and set to "+\
+            "maximum of y-range (excluding ghostpoint)")
       print(" ")
       start_x=dimy-2
@@ -1575,5 +1624,6 @@
    if (end_y .GT. dimy-1)then
       print(" ")
-      print("'end_y' = "+end_y+" is greater than available y-range and set to maximum of y-range (excluding ghostpoint)")
+      print("'end_y' = "+end_y+" is greater than available y-range and "+\
+            "set to maximum of y-range (excluding ghostpoint)")
       print(" ")
       end_x=dimy-2
@@ -1581,5 +1631,6 @@
    if (end_y .LT. start_y)then
       print(" ")
-      print("'end_y' = "+end_y+" is lower than 'start_y' = "+start_y+" and set to maximum of y-range (excluding ghostpoint)")
+      print("'end_y' = "+end_y+" is lower than 'start_y' = "+start_y+\
+            " and set to maximum of y-range (excluding ghostpoint)")
       print(" ")
       end_y=dimy-2
@@ -1603,9 +1654,18 @@
       
       if (prof3d .EQ. 0) then
-         if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then
+         if ( isStrSubset( vNam(varn), "time") .OR. \
+              isStrSubset( vNam(varn), "NORM")) then
             check = False
          end if
       else
-         if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then
+         if ( isStrSubset( vNam(varn), "time") .OR.  \
+              isStrSubset( vNam(varn), "zusi") .OR.  \
+              isStrSubset( vNam(varn), "zwwi") .OR.  \
+              isStrSubset( vNam(varn), "x") .OR.     \
+              isStrSubset( vNam(varn), "xu") .OR.    \
+              isStrSubset( vNam(varn), "y") .OR.     \
+              isStrSubset( vNam(varn), "yv") .OR.    \ 
+              isStrSubset( vNam(varn), "zu_3d") .OR. \
+              isStrSubset( vNam(varn), "zw_3d")) then
             check = False
          end if
@@ -1637,6 +1697,8 @@
                         temp = f[:]->$vNam(varn)$
 			temp_att = f_att->$vNam(varn)$ 
-	                data_temp = temp(ti_in(j),i,start_y:end_y,start_x:end_x)
-			data(varn,j,i-1) = dim_avg_Wrap(dim_avg_Wrap(data_temp))
+	                data_temp = temp(ti_in(j),i,\
+                                         start_y:end_y,start_x:end_x)
+			data(varn,j,i-1) = dim_avg_Wrap(\
+                                                   dim_avg_Wrap(data_temp))
                      end do
                   end do
@@ -1646,5 +1708,6 @@
                         temp = f[:]->$vNam(varn)$
 			temp_att = f_att->$vNam(varn)$ 
-			data_temp = temp(ti_in(j),i,start_y:end_y,start_x:end_x)
+			data_temp = temp(ti_in(j),i,\
+                                            start_y:end_y,start_x:end_x)
                         data(varn,j,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp))
                      end do
@@ -1658,5 +1721,6 @@
             if (n_o .GT. number_comb-1) then
                print(" ")
-               print("Set 'number_comb' to the number of overlaying variables ('c_var' = "+c_var+")")
+               print("Set 'number_comb' to the number of overlaying "+\
+                     "variables ('c_var' = "+c_var+")")
                print(" ")
                exit
@@ -1666,9 +1730,11 @@
 	       max_value = abs(0.01*max(data(varn,:,:)))
 	    else
-	       if (abs(min(data(varn,:,:))) .LT. 0.01 .AND. abs(max(data(varn,:,:))) .GT. 0.01)then
+	       if (abs(min(data(varn,:,:))) .LT. 0.01 .AND. \
+                   abs(max(data(varn,:,:))) .GT. 0.01)then
 	          min_value = abs(0.1*max(data(varn,:,:)))
 	          max_value = abs(0.1*max(data(varn,:,:)))
 	       else
-	          if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. abs(min(data(varn,:,:))) .GT. 0.01)then
+	          if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. \
+                      abs(min(data(varn,:,:))) .GT. 0.01)then
 	             min_value = abs(0.1*min(data(varn,:,:)))
 	             max_value = abs(0.1*min(data(varn,:,:)))
@@ -1679,5 +1745,6 @@
 	       end if
 	    end if 
-	    if (min(data(varn,:,:)) .EQ. 0 .AND. max(data(varn,:,:)) .EQ. 0)then
+	    if (min(data(varn,:,:)) .EQ. 0 .AND. \
+                max(data(varn,:,:)) .EQ. 0)then
 	       min_value = 0.1
 	       max_value = 0.1
@@ -1782,5 +1849,6 @@
          if(max_z_int .eq. min_z_int)
              print(" ")
-             print("Please increase 'max_z' or decrease 'min_z' so that there are")
+             print("Please increase 'max_z' or decrease 'min_z' so that "+\
+                   "there are")
              print("at least two layers for the z-axis to plot")
              print(" ")
@@ -1843,10 +1911,12 @@
             res@trYMaxF            = max_z 
             if (xs .EQ. -1) then 
-               res@trXMinF            = min(data(varn,:,min_z_int:max_z_int))-min_value
+               res@trXMinF            = min(data(varn,:,min_z_int:max_z_int))-\
+                                                                      min_value
             else 
                res@trXMinF            = xs     
             end if
             if (xe .EQ. -1) then 
-               res@trXMaxF            = max(data(varn,:,min_z_int:max_z_int))+max_value 
+               res@trXMaxF            = max(data(varn,:,min_z_int:max_z_int))+\
+                                                                      max_value
             else 
                res@trXMaxF            = xe  
@@ -2301,5 +2371,6 @@
             end if
 
-            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq) then
+            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) \
+               .EQ. "w"+dq+"pt"+dq) then
                miniwpptp=min(data(varn,:,min_z_int:max_z_int))-min_value
                maxiwpptp=max(data(varn,:,min_z_int:max_z_int))+max_value
@@ -2418,5 +2489,6 @@
             end if
 
-            if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "w"+dq+"vpt"+dq) then
+            if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) \
+                .EQ. "w"+dq+"vpt"+dq) then
                miniwpvptp=min(data(varn,:,min_z_int:max_z_int))-min_value
                maxiwpvptp=max(data(varn,:,min_z_int:max_z_int))+max_value
@@ -2558,5 +2630,6 @@
             end if
 
-            if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq) then
+            if (vNam(varn) .EQ. "wpqvp" .OR. \
+               vNam(varn) .EQ. "w"+dq+"qv"+dq) then
                miniwpqvp=min(data(varn,:,min_z_int:max_z_int))-min_value
                maxiwpqvp=max(data(varn,:,min_z_int:max_z_int))+max_value
@@ -2698,5 +2771,6 @@
             end if
 
-            if (vNam(varn) .EQ. "wpsap" .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq) then
+            if (vNam(varn) .EQ. "wpsap" .OR. \
+                vNam(varn) .EQ. "w"+dq+"sa"+dq) then
                miniwpsap=min(data(varn,:,min_z_int:max_z_int))-min_value
                maxiwpsap=max(data(varn,:,min_z_int:max_z_int))+max_value
@@ -2838,5 +2912,6 @@
             end if
 
-            if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "w*u*u*:dz") then
+            if (vNam(varn) .EQ. "wsususodz" .OR. \
+                vNam(varn) .EQ. "w*u*u*:dz") then
                miniwsususodz=min(data(varn,:,min_z_int:max_z_int))-min_value
                maxiwsususodz=max(data(varn,:,min_z_int:max_z_int))+max_value
@@ -2884,5 +2959,6 @@
                end if 
             end if
-            if (vNam(varn) .EQ. "wpeodz" .OR. vNam(varn) .EQ. "w"+dq+"p:dz") then
+            if (vNam(varn) .EQ. "wpeodz" .OR. \
+                vNam(varn) .EQ. "w"+dq+"p:dz") then
                miniwpeodz=min(data(varn,:,min_z_int:max_z_int))-min_value
                maxiwpeodz=max(data(varn,:,min_z_int:max_z_int))+max_value
@@ -2935,5 +3011,6 @@
    if (isStrSubset(data@long_name," SR " ) .and. over_remind) then
       print(" ")
-      print("If you have outputs of statistic regions you cannot overlay variables;")
+      print("If you have outputs of statistic regions you cannot overlay "+\
+            "variables;")
       print("'over' is set to 0" )
       print(" ")
@@ -2992,5 +3069,6 @@
          lgres@vpHeightF          = 0.03*no_files          
          lgres@lgDashIndexes      = multi_dash(no_files-1:0)
-         lbid = gsn_create_legend(wks,no_files,multi_legend(no_files-1:0),lgres)       
+         lbid = gsn_create_legend(\
+                            wks,no_files,multi_legend(no_files-1:0),lgres)
 
          amres = True
@@ -3073,9 +3151,18 @@
       
          if (prof3d .EQ. 0) then
-            if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then
+            if ( isStrSubset( vNam(varn), "time") .OR. \
+                 isStrSubset( vNam(varn), "NORM")) then
                check = False
             end if
          else
-            if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then
+            if ( isStrSubset( vNam(varn), "time") .OR.  \
+                 isStrSubset( vNam(varn), "zusi") .OR.  \
+                 isStrSubset( vNam(varn), "zwwi") .OR.  \
+                 isStrSubset( vNam(varn), "x") .OR.     \
+                 isStrSubset( vNam(varn), "xu") .OR.    \
+                 isStrSubset( vNam(varn), "y") .OR.     \
+                 isStrSubset( vNam(varn), "yv") .OR.    \
+                 isStrSubset( vNam(varn), "zu_3d") .OR. \
+                 isStrSubset( vNam(varn), "zw_3d")) then
                check = False
             end if
@@ -3162,5 +3249,6 @@
             plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)  
             
-            if (vNam(varn) .EQ. "u" .OR. vNam(varn) .EQ. "v" .OR. vNam(varn) .EQ. "w") then
+            if (vNam(varn) .EQ. "u" .OR. vNam(varn) .EQ. "v" .OR. \
+                vNam(varn) .EQ. "w") then
                if (u .EQ. 0) then
                   res@gsnLeftString      = "u, v and w"
@@ -3186,5 +3274,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3193,5 +3281,5 @@
                   lgres@lgLabelFont        = "helvetica"    
                   lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.06           
+                  lgres@vpWidthF           = 0.07           
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
@@ -3199,7 +3287,7 @@
 
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_u)
                   u=1
@@ -3212,5 +3300,6 @@
             end if  
      
-            if (vNam(varn) .EQ. "pt" .OR. vNam(varn) .EQ. "vpt" .OR. vNam(varn) .EQ. "lpt") then
+            if (vNam(varn) .EQ. "pt" .OR. vNam(varn) .EQ. "vpt" .OR. \
+                vNam(varn) .EQ. "lpt") then
                if (pt .EQ. 0) then
                   res@gsnLeftString      = "pt, vpt and lpt"
@@ -3236,5 +3325,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3246,10 +3335,9 @@
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"pt","vpt","lpt"/),lgres)       
-
+                  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)                  
+                  amres@amParallelPosF   = 0.88	    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_pt)
                   pt=1
@@ -3261,5 +3349,6 @@
                end if
             end if            
-            if (vNam(varn) .EQ. "q" .OR. vNam(varn) .EQ. "qv" .OR. vNam(varn) .EQ. "ql") then
+            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"
@@ -3285,5 +3374,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3292,13 +3381,13 @@
                   lgres@lgLabelFont        = "helvetica"    
                   lgres@lgLabelFontHeightF = font_size_legend            
-                  lgres@vpWidthF           = 0.06          
+                  lgres@vpWidthF           = 0.07          
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"q","qv","ql"/),lgres)       
+                  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)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_q)
                   q=1
@@ -3311,5 +3400,6 @@
             end if    
            
-            if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es" .OR. vNam(varn) .EQ. "e*" ) then
+            if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es" .OR. \
+                vNam(varn) .EQ. "e*" ) then
                if (e .EQ. 0) then
                   res@gsnLeftString      = "e and e*"
@@ -3332,5 +3422,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3339,5 +3429,5 @@
                   lgres@lgLabelFont        = "helvetica"    
                   lgres@lgLabelFontHeightF = font_size_legend           
-                  lgres@vpWidthF           = 0.06           
+                  lgres@vpWidthF           = 0.07           
                   lgres@vpHeightF          = 0.08          
                   lgres@lgDashIndexes      = (/0,1,2/)
@@ -3345,7 +3435,7 @@
 
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.365            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_e)
                   e=1
@@ -3378,5 +3468,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3385,5 +3475,5 @@
                   lgres@lgLabelFont        = "helvetica"    
                   lgres@lgLabelFontHeightF = font_size_legend           
-                  lgres@vpWidthF           = 0.06           
+                  lgres@vpWidthF           = 0.07           
                   lgres@vpHeightF          = 0.08          
                   lgres@lgDashIndexes      = (/0,1,2/)
@@ -3391,7 +3481,7 @@
 
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.365            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_km) 
                   km=1
@@ -3404,6 +3494,7 @@
             end if           
            
-            if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "wu" \
-                .OR. vNam(varn) .EQ. "w"+dq+"u"+dq .OR. vNam(varn) .EQ. "w*u*") then
+            if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR.      \
+                vNam(varn) .EQ. "wu" .OR. vNam(varn) .EQ. "w"+dq+"u"+dq .OR. \
+                vNam(varn) .EQ. "w*u*") then
                if (wpup .EQ. 0) then
                   res@gsnLeftString      = "w"+dq+"u"+dq+", w*u* and wu"
@@ -3429,5 +3520,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3439,10 +3530,11 @@
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"u"+dq,"w*u*","wu"/),lgres)       
+                  lbid = gsn_create_legend(\
+                                wks,3,(/"w"+dq+"u"+dq,"w*u*","wu"/),lgres)
 
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_wpup)
                   wpup=1
@@ -3454,6 +3546,7 @@
                end if
             end if
-            if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR.vNam(varn) .EQ. "wv"\
-                .OR. vNam(varn) .EQ. "w"+dq+"v"+dq .OR. vNam(varn) .EQ. "w*v*") then
+            if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR.     \
+               vNam(varn) .EQ. "wv" .OR. vNam(varn) .EQ. "w"+dq+"v"+dq .OR. \
+               vNam(varn) .EQ. "w*v*") then
                if (wpvp .EQ. 0) then
                   res@gsnLeftString      = "w"+dq+"v"+dq+", w*v* and wv"
@@ -3479,5 +3572,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3489,10 +3582,11 @@
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"v"+dq,"w*v*","wv"/),lgres)       
+                  lbid = gsn_create_legend(\
+                             wks,3,(/"w"+dq+"v"+dq,"w*v*","wv"/),lgres)       
 
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_wpvp)
                   wpvp=1
@@ -3504,6 +3598,7 @@
                end if
             end if
-            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "wpt"\
-                .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq .OR. vNam(varn) .EQ. "w*pt*") then
+            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR.     \
+                vNam(varn) .EQ. "wpt" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq .OR.\
+                vNam(varn) .EQ. "w*pt*") then
                if (wpptp .EQ. 0) then                 
                   res@gsnLeftString      = "w"+dq+"pt"+dq+", w*pt* and wpt"
@@ -3529,5 +3624,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3539,10 +3634,11 @@
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)              
-                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"pt"+dq,"w*pt*","wpt"/),lgres)     
+                  lbid = gsn_create_legend(\
+                               wks,3,(/"w"+dq+"pt"+dq,"w*pt*","wpt"/),lgres)
 
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_wpptp)
                   wpptp=1
@@ -3554,5 +3650,6 @@
                end if
             end if
-            if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC" .OR. vNam(varn) .EQ. "w*pt*BC") then
+            if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC" .OR.\
+                vNam(varn) .EQ. "w*pt*BC") then
                if (wsptsBC .EQ. 0) then
                   res@gsnLeftString      = "w*pt*BC and wptBC"
@@ -3575,5 +3672,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3585,10 +3682,11 @@
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"w*pt*BC","wptBC"/),lgres)       
+                  lbid = gsn_create_legend(\
+                                        wks,3,(/"w*pt*BC","wptBC"/),lgres)
 
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_wsptsBC)
                   wsptsBC=1
@@ -3600,6 +3698,7 @@
                end if  
             end if             
-            if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. vNam(varn) .EQ. "wvpt"\
-                .OR. vNam(varn) .EQ. "w"+dq+"vpt"+dq .OR. vNam(varn) .EQ. "w*vpt*") then
+            if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. \
+                vNam(varn) .EQ. "wvpt" .OR. vNam(varn) .EQ. \
+                "w"+dq+"vpt"+dq .OR. vNam(varn) .EQ. "w*vpt*") then
                if (wpvptp .EQ. 0) then
                   res@gsnLeftString      = "w"+dq+"vpt"+dq+", w*vpt* and wvpt"
@@ -3625,5 +3724,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3635,10 +3734,10 @@
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"vpt"+dq,"w*vpt*","wvpt"/),lgres)       
-
+                  lbid = gsn_create_legend(\
+                             wks,3,(/"w"+dq+"vpt"+dq,"w*vpt*","wvpt"/),lgres)
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_wpvptp)
                   wpvptp=1
@@ -3650,6 +3749,7 @@
                end if
             end if
-            if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR. vNam(varn) .EQ. "wq"\
-                 .OR. vNam(varn) .EQ. "w"+dq+"q"+dq .OR. vNam(varn) .EQ. "w*q*") then
+            if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR.      \
+                vNam(varn) .EQ. "wq" .OR. vNam(varn) .EQ. "w"+dq+"q"+dq .OR. \
+                vNam(varn) .EQ. "w*q*") then
                if (wpqp .EQ. 0) then 
                   res@gsnLeftString      = "w"+dq+"q"+dq+", w*q* and wq"
@@ -3675,5 +3775,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3685,10 +3785,11 @@
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"q"+dq,"w*q*","wq"/),lgres)       
+                  lbid = gsn_create_legend(\
+                             wks,3,(/"w"+dq+"q"+dq,"w*q*","wq"/),lgres)       
 
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_wpqp)
                   wpqp=1
@@ -3700,6 +3801,7 @@
                end if
             end if
-            if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR. vNam(varn) .EQ. "wqv"\
-                .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq .OR. vNam(varn) .EQ. "w*qv*") then
+            if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR.     \
+                vNam(varn) .EQ. "wqv" .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq .OR.\
+                vNam(varn) .EQ. "w*qv*") then
                if (wpqvp .EQ. 0) then
                   res@gsnLeftString      ="w"+dq+"qv"+dq+" , w*qv* and wqv"
@@ -3725,5 +3827,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3735,10 +3837,11 @@
                   lgres@vpHeightF          = 0.12         
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"qv"+dq,"w*qv*","wqv"/),lgres)       
+                  lbid = gsn_create_legend(\
+                                wks,3,(/"w"+dq+"qv"+dq,"w*qv*","wqv"/),lgres)
 
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_wpqvp) 
                   wpqvp=1
@@ -3750,6 +3853,7 @@
                end if
             end if
-            if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR. vNam(varn) .EQ. "ws"\
-                .OR. vNam(varn) .EQ. "w"+dq+"s"+dq .OR. vNam(varn) .EQ. "w*s*") then
+            if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR.     \
+                vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w"+dq+"s"+dq .OR.\
+                vNam(varn) .EQ. "w*s*") then
                if (wpsp .EQ. 0) then
                   res@gsnLeftString      = "w"+dq+"s"+dq+", w*s* and ws"
@@ -3775,5 +3879,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3785,10 +3889,11 @@
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"s"+dq,"w*s*","ws"/),lgres)       
+                  lbid = gsn_create_legend(\
+                           wks,3,(/"w"+dq+"s"+dq,"w*s*","ws"/),lgres)       
 
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_wpsp)
                   wpsp=1
@@ -3800,6 +3905,7 @@
                end if
             end if 
-            if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR. vNam(varn) .EQ. "wsa"\
-                .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq .OR. vNam(varn) .EQ. "w*sa*") then
+            if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR.      \
+                vNam(varn) .EQ. "wsa" .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq .OR.\
+                vNam(varn) .EQ. "w*sa*") then
                if (wpsap .EQ. 0) then
                   res@gsnLeftString      = "w"+dq+"sa"+dq+", w*sa* and wsa"
@@ -3825,5 +3931,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3835,10 +3941,10 @@
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"sa"+dq,"w*sa*","wsa"/),lgres)       
-
+                  lbid = gsn_create_legend(\
+                             wks,3,(/"w"+dq+"sa"+dq,"w*sa*","wsa"/),lgres)
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_wpsap)
                   wpsap=1
@@ -3851,6 +3957,7 @@
             end if
           
-            if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "ws2" \
-                .OR. vNam(varn) .EQ. "u*2" .OR. vNam(varn) .EQ. "v*2" .OR. vNam(varn) .EQ. "w*2" ) then
+            if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. \
+                vNam(varn) .EQ. "ws2" .OR. vNam(varn) .EQ. "u*2" .OR. \
+                vNam(varn) .EQ. "v*2" .OR. vNam(varn) .EQ. "w*2" ) then
                if (us2 .EQ. 0) then
                   res@gsnLeftString      = "u*2, v*2 and w*2"
@@ -3876,5 +3983,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3886,10 +3993,9 @@
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"u*2","v*2","w*2"/),lgres)       
-
+                  lbid = gsn_create_legend(wks,3,(/"u*2","v*2","w*2"/),lgres)
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_us2)
                   us2=1
@@ -3902,6 +4008,10 @@
             end if
            
-            if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "wpeodz" \
-               .OR. vNam(varn) .EQ. "w*u*u*:dz" .OR. vNam(varn) .EQ. "w*p*:dz" .OR. vNam(varn) .EQ. "w"+dq+"e:dz") then
+            if (vNam(varn) .EQ. "wsususodz" .OR. \
+                vNam(varn) .EQ. "wspsodz" .OR.   \
+                vNam(varn) .EQ. "wpeodz" .OR.    \
+                vNam(varn) .EQ. "w*u*u*:dz" .OR. \
+                vNam(varn) .EQ. "w*p*:dz" .OR.   \
+                vNam(varn) .EQ. "w"+dq+"e:dz") then
                if (wsususodz .EQ. 0) then 
                   res@gsnLeftString      = "w*u*u*:dz, w*p*:dz and w"+dq+"e:dz"
@@ -3909,10 +4019,12 @@
                   res@gsnRightString     = " "
                   if (xs .EQ. -1) then
-                     res@trXMinF = min((/miniwsususodz,miniwspsodz,miniwpeodz/))
+                     res@trXMinF = min((/miniwsususodz,\
+                                                   miniwspsodz,miniwpeodz/))
                   else 
                      res@trXMinF = xs
                   end if
                   if (xe .EQ. -1) then
-                     res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,maxiwpeodz/))
+                     res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,\
+                                                               maxiwpeodz/))
                   else 
                      res@trXMaxF = xe  
@@ -3927,5 +4039,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -3937,10 +4049,10 @@
                   lgres@vpHeightF          = 0.12          
                   lgres@lgDashIndexes      = (/0,1,2/)
-                  lbid = gsn_create_legend(wks,3,(/"w*u*u*:dz","w*p*:dz","w"+dq+"e:dz"/),lgres)       
-
+                  lbid = gsn_create_legend(\
+                           wks,3,(/"w*u*u*:dz","w*p*:dz","w"+dq+"e:dz"/),lgres)
                   amres = True
-                  amres@amParallelPosF   = 0.65		    
-                  amres@amOrthogonalPosF = -0.2            
-                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                  
+                  amres@amParallelPosF   = 0.88		    
+                  amres@amOrthogonalPosF = 0.33            
+                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
                   overlay(plot(n),plot_wsususodz)
                   wsususodz=1
@@ -3970,9 +4082,18 @@
       
          if (prof3d .EQ. 0) then
-            if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then
+            if ( isStrSubset( vNam(varn), "time") .OR. \
+                 isStrSubset( vNam(varn), "NORM")) then
                check = False
             end if
          else
-            if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then
+            if ( isStrSubset( vNam(varn), "time") .OR.  \
+                 isStrSubset( vNam(varn), "zusi") .OR.  \
+                 isStrSubset( vNam(varn), "zwwi") .OR.  \
+                 isStrSubset( vNam(varn), "x") .OR.     \
+                 isStrSubset( vNam(varn), "xu") .OR.    \
+                 isStrSubset( vNam(varn), "y") .OR.     \
+                 isStrSubset( vNam(varn), "yv") .OR.    \
+                 isStrSubset( vNam(varn), "zu_3d") .OR. \
+                 isStrSubset( vNam(varn), "zw_3d")) then
                check = False
             end if
@@ -4059,5 +4180,6 @@
             print(" ")
 	    print("combining is not possible,")
-            print("'c_var'(= "+c_var+") must include two variables of the general plots = ")
+            print("'c_var'(= "+c_var+") must include two variables of "+\
+                  "the general plots = ")
 	    print("- "+com_var_avail)
 	    print("be sure to have one comma before and after the variable")
@@ -4073,5 +4195,6 @@
             print(" ")
 	    print("combining is not possible,")
-            print("'c_var'(= "+c_var+") must include three variables of the general plots = ")
+            print("'c_var'(= "+c_var+") must include three variables of "+\
+                  "the general plots = ")
 	    print("- "+com_var_avail)
 	    print("be sure to have one comma before and after the variable")
@@ -4114,5 +4237,6 @@
    no_frames = 0
 
-   if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. n .gt. no_rows*no_columns) then
+   if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \
+       n .gt. no_rows*no_columns) then
       gsn_panel(wks,plot_,(/n,1/),resP)
       print(" ")
@@ -4125,5 +4249,6 @@
             no_frames = no_frames + 1  
          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)
             no_frames = no_frames + 1  
          end if
Index: /palm/trunk/SCRIPTS/NCL/spectra.ncl
===================================================================
--- /palm/trunk/SCRIPTS/NCL/spectra.ncl	(revision 565)
+++ /palm/trunk/SCRIPTS/NCL/spectra.ncl	(revision 566)
@@ -24,5 +24,6 @@
       print("Neither the personal configuration file '.ncl.config' exists in")
       print("~/palm/current_version")
-      print("nor the default configuration file '.ncl.config.default' exists in")
+      print("nor the default configuration file '.ncl.config.default' "+\
+            "exists in")
       print(palm_bin_path + "/NCL")
       print(" ")
@@ -59,5 +60,8 @@
    end if
 
-   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. format_out .NE. "png")then
+   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND.   \
+       format_out .NE. "eps" .AND. format_out .NE. "ps" .AND.    \
+       format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \
+       format_out .NE. "png")then
       print(" ")
       print("'format_out = "+format_out+"' is invalid and set to'x11'")
@@ -136,5 +140,6 @@
    if (start_f .EQ. -1)then
       print(" ")
-      print("'start_f' must be one of the cyclic numbers (at least 0) of your input file(s)")
+      print("'start_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
       print(" ")  
       exit
@@ -142,5 +147,6 @@
    if (end_f .EQ. -1)then
       print(" ")
-      print("'end_f' must be one of the cyclic numbers (at least 0) of your input file(s)")
+      print("'end_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
       print(" ")  
       exit
@@ -224,5 +230,6 @@
 	    if (dim_level .GT. dimsizes(zu))then
                print(" ")
-               print("'height_level' has more elements than available height levels in input file (= "+dimz+")")
+               print("'height_level' has more elements than available "+\
+                     "height levels in input file (= "+dimsizes(zu)+")")
                print(" ")
                exit
@@ -230,4 +237,14 @@
 	       zuh=new(dim_level,double)
 	       do le=0,dim_level-1
+                  if (height_level(le) .GE. dimsizes(zu)) then
+                     no_levels=dimsizes(zu)-1
+                     print(" ")
+                     print("Element "+le+" of 'height_level' is greater "  +\
+                          "than the maximum available index in input file "+\
+                          "which is "+no_levels+". Note that the first "   +\
+                          "element has the index 0.")
+                     print(" ")
+                     exit
+                  end if
 	          zuh(le)=zu(height_level(le))
 	       end do
@@ -243,5 +260,6 @@
 	       if (dim_level .GT. dimsizes(zw))then
                   print(" ")
-                  print("'height_level' has more elements than available height levels in input file (= "+dimz+")")
+                  print("'height_level' has more elements than available "+\
+                        "height levels in input file (= "+dimsizes(zw)+")")
                   print(" ")
                   exit
@@ -249,4 +267,14 @@
 	          zwh=new(dim_level,double)
 	          do le=0,dim_level-1
+                     if (height_level(le) .GE. dimsizes(zw)) then
+                        no_levels=dimsizes(zw)-1
+                        print(" ")
+                        print("Element "+le+" of 'height_level' is greater "+\
+                              "than the maximum available index in input "  +\
+                              "file which is "+no_levels+". Note that the " +\
+                              "first element has the index 0.")
+                        print(" ")
+                        exit
+                     end if
 	             zwh(le)=zw(height_level(le))
 	          end do
@@ -267,5 +295,6 @@
       if (start_time_step .GT. t_all(nt-1)/3600)then
          print(" ")
-         print("'start_time_step' = "+ start_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
+         print("'start_time_step' = "+ start_time_step +"h is greater than "+\
+               "last time step = "+ t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
          print(" ")
          print("Select another 'start_time_step'")
@@ -275,5 +304,6 @@
       if (start_time_step .LT. t_all(0)/3600)then
          print(" ")
-         print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")        
+         print("'start_time_step' = "+ start_time_step +"h is lower than "+\
+               "first time step = "+ t_all(0)+"s = "+t_all(0)/3600+"h")        
          exit
       end if
@@ -281,5 +311,6 @@
 
    do i=0,nt-1     
-      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
          st=i
          break
@@ -305,5 +336,6 @@
       if (end_time_step .GT. t_all(nt-1)/3600)then
          print(" ")
-         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")
+         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")
          print(" ")
          print("Select another 'end_time_step'")  
@@ -313,5 +345,6 @@
       if (end_time_step .LT. start_time_step/3600)then
          print(" ")
-         print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h")
+         print("'end_time_step' = "+ end_time_step +"h is lower than "+\
+               "'start_time_step' = "+start_time_step+"h")
          print(" ")
          print("Select another 'start_time_step' or 'end_time_step'")
@@ -322,5 +355,6 @@
 
    do i=0,nt-1     
-      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
          et=i
          break
@@ -343,6 +377,8 @@
 
    print(" ")
-   print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step)
-   print("                     till "+t_all(end_time_step)/3600+" h = "+t_all(end_time_step)+" s => index = "+end_time_step)
+   print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+\
+         t_all(start_time_step)+" s => index = "+start_time_step)
+   print("                     till "+t_all(end_time_step)/3600+" h = "+\
+         t_all(end_time_step)+" s => index = "+end_time_step)
    print(" ")
 
@@ -387,14 +423,10 @@
    end if
 
-   legend_label=new(dimt,double)
+   legend_label=new(dimt,string)
    legend_label_zu=new(dimz,double)
    legend_label_zw=new(dimz,double)
    legend_label_z=new(dimz,double)
    do p=start_time_step,end_time_step
-      if (t_all(p)/3600 .LT. 1) then
-         legend_label(p-start_time_step)=decimalPlaces(t_all(p)/3600,2,True)
-      else
-         legend_label(p-start_time_step)=decimalPlaces(t_all(p)/3600,0,True)
-      end if
+      legend_label(p-start_time_step)=sprintf("%6.2f", t_all(p)/3600)
    end do  
    if (sort .EQ. "time")
@@ -447,5 +479,9 @@
       check = True
 
-      if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zu_sp") .OR. isStrSubset( vNam(varn), "zw_sp") .OR. isStrSubset( vNam(varn), "k_x") .OR. isStrSubset( vNam(varn), "k_y")) then
+      if ( isStrSubset( vNam(varn), "time") .OR.  \
+           isStrSubset( vNam(varn), "zu_sp") .OR. \
+           isStrSubset( vNam(varn), "zw_sp") .OR. \
+           isStrSubset( vNam(varn), "k_x") .OR.   \
+           isStrSubset( vNam(varn), "k_y")) then
             check = False
       end if
@@ -458,5 +494,5 @@
 
          temp = f[:]->$vNam(varn)$
-	 data = temp(start_time_step:end_time_step,0:dimz-1,:)
+	 data = temp(start_time_step:end_time_step,0:dimz-1,:) 
 
          temp_att = f_att->$vNam(varn)$
@@ -467,10 +503,10 @@
          if (height_level(0) .NE. -1)then
 	    do te=0,dimz-1
-	    print(height_level(te))
-	       data(:,te,:) = temp(start_time_step:end_time_step,height_level(te),:)	       
+	       data(:,te,:) = temp(start_time_step:end_time_step,\
+                                                    height_level(te),:)	       
 	    end do
 	 end if
 
-         data=data/(norm_y*norm_x)  ;SMOOTHING: #temp=smth9(temp/norm, 0.50, -0.25, False)#
+         data=data/(norm_y*norm_x) 
             
          do i=0,b-1            
@@ -541,5 +577,6 @@
             res@pmLegendOrthogonalPosF  = -1.0
             res@pmLegendWidthF          = 0.12
-            res@pmLegendHeightF         = 0.04*(end_time_step-start_time_step+1)
+            res@pmLegendHeightF         = 0.04*\
+                                          (end_time_step-start_time_step+1)
             do p=dimz-1,0,1
 	       if (log_y .EQ. 1)then  
@@ -549,5 +586,7 @@
                            st=p+start_time_step
                            print(" ")
-                           print("'"+vNam(varn)+"("+st+","+q+","+r+")' is equal 0; Logarithmic scale for y-axis and height "+z(p)+" cannot be used")
+                           print("'"+vNam(varn)+"("+st+","+q+","+r+")' is "+\
+                                 "equal 0. Logarithmic scale for y-axis "+\
+                                 "and height "+z(p)+" cannot be used")
                            print(" ")
                            res@trYLog = False
@@ -577,5 +616,7 @@
                            st=p+start_time_step
                            print(" ")
-                           print("'"+vNam(varn)+"("+st+","+q+","+r+")' is equal 0; Logarithmic scale for y-axis and time "+legend_label(p)+" cannot be used")
+                           print("'"+vNam(varn)+"("+st+","+q+","+r+")' "+\
+                                 "is equal 0. Logarithmic scale for y-axis "+\
+                                 "and time "+legend_label(p)+" h cannot be used")
                            print(" ")
                            res@trYLog = False
@@ -583,11 +624,13 @@
                      end do
 		     if (norm_height .EQ. 1 .AND. p .EQ. 0)then
-		        data(p,q,:) = data(p,q,:)*doubletofloat(legend_label_z(q))
-			x_axis(q,:) = x_axis(q,:)*doubletofloat(legend_label_z(q))
+		        data(p,q,:) = data(p,q,:)*\
+                                           doubletofloat(legend_label_z(q))
+			x_axis(q,:) = x_axis(q,:)*\
+                                           doubletofloat(legend_label_z(q))
 		     end if
 	             max_y(q)=max(data(p,q,:))
 		     min_y(q)=min(data(p,q,:))
 		     min_x(q)=min(x_axis(q,:))
-		     max_x(q)=max(x_axis(q,:))                                    
+		     max_x(q)=max(x_axis(q,:))
                   end do 
 		  do q=0,dimz-1
@@ -597,5 +640,5 @@
 	             end if
 		     if (q .EQ. 0)then
-		        res@tiYAxisString      = "("+unit_y+")"		        
+		        res@tiYAxisString      = "("+unit_y+")"
 		        res@gsnLeftString      = vNam(varn)
                         res@gsnRightString     = "Time = "+legend_label(p)+"h"
@@ -605,5 +648,6 @@
                         res@trYMaxF = max(max_y)
 			
-			plot_h(q)  = gsn_csm_xy(wks,x_axis(q,:),data(p,q,:),res)
+			plot_h(q)  = gsn_csm_xy(wks,x_axis(q,:),\
+                                                         data(p,q,:),res)
 			
 			lgres = True
@@ -618,12 +662,12 @@
 			   lgres@lgLineColors = color
 			end if
-			lgres@lgTitleString = "Height (m)"  
+			lgres@lgTitleString      = "Height (m)"  
                         lgres@lgLabelFont        = "helvetica"
-			lgres@lgLabelFontHeightF     = font_size_legend*6 
-                        lgres@lgTitleFontHeightF     = font_size      
+			lgres@lgLabelFontHeightF = font_size_legend*6 
+                        lgres@lgTitleFontHeightF = font_size      
                         lgres@vpWidthF           = 0.12           
-                        lgres@vpHeightF          = font_size_legend*(dimz+3)           
+                        lgres@vpHeightF          = font_size_legend*(dimz+3)
   
-                        lbid = gsn_create_legend(wks,dimz,legend_label_z,lgres)       
+                        lbid = gsn_create_legend(wks,dimz,legend_label_z,lgres)
 
                         amres = True
@@ -632,5 +676,6 @@
                         annoid1 = gsn_add_annotation(plot_h(q),lbid,amres)
 		     else
-		        plot_h(q)  = gsn_csm_xy(wks,x_axis(q,:),data(p,q,:),res) 
+		        plot_h(q)  = gsn_csm_xy(wks,x_axis(q,:),\
+                                                        data(p,q,:),res) 
 			overlay(plot_h(0),plot_h(q))
 		     end if
@@ -672,5 +717,6 @@
    no_frames = 0
 
-   if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. n .gt. no_rows*no_columns) then
+   if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \
+                                          n .gt. no_rows*no_columns) then
       gsn_panel(wks,plot,(/n,1/),resP)
       print(" ")
@@ -683,5 +729,6 @@
             no_frames = no_frames + 1
          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)
             no_frames = no_frames + 1   
          end if
Index: /palm/trunk/SCRIPTS/NCL/timeseries.ncl
===================================================================
--- /palm/trunk/SCRIPTS/NCL/timeseries.ncl	(revision 565)
+++ /palm/trunk/SCRIPTS/NCL/timeseries.ncl	(revision 566)
@@ -25,5 +25,6 @@
       print("Neither the personal configuration file '.ncl.config' exists in")
       print("~/palm/current_version")
-      print("nor the default configuration file '.ncl.config.default' exists in")
+      print("nor the default configuration file '.ncl.config.default' "+\
+            "exists in")
       print(palm_bin_path + "/NCL")
       print(" ")
@@ -60,5 +61,8 @@
    end if
 
-   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. format_out .NE. "png")then
+   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND.   \
+       format_out .NE. "eps" .AND. format_out .NE. "ps" .AND.    \
+       format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \
+       format_out .NE. "png")then
       print(" ")
       print("'format_out = "+format_out+"' is invalid and set to'x11'")
@@ -104,5 +108,6 @@
    if (start_f .EQ. -1)then
       print(" ")
-      print("'start_f' must be one of the cyclic numbers (at least 0) of your input file(s)")
+      print("'start_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
       print(" ")  
       exit
@@ -110,5 +115,6 @@
    if (end_f .EQ. -1)then
       print(" ")
-      print("'end_f' must be one of the cyclic numbers (at least 0) of your input file(s)")
+      print("'end_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
       print(" ")  
       exit
@@ -191,5 +197,7 @@
       if (start_time_step .GE. t_all(nt-1)/3600)
          print(" ")
-         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")
+         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")
          print(" ")
          print("Select another 'start_time_step'")
@@ -199,5 +207,7 @@
       if (start_time_step .LT. t_all(0)/3600)
          print(" ")
-         print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
+         print("'start_time_step' = "+ start_time_step +\
+               "h is lower than first time step = " + t_all(0)+"s = "+\
+               t_all(0)/3600+"h")
          print(" ")
          print("Select another 'start_time_step'")
@@ -207,10 +217,12 @@
    end if
    do i=0,nt-2     
-      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
          st=i
          break
       end if
    end do
-   if (start_time_step .GE. t_all(nt-1)-delta_t/2 .AND. start_time_step .LT. t_all(nt-1)) then
+   if (start_time_step .GE. t_all(nt-1)-delta_t/2 .AND. \
+       start_time_step .LT. t_all(nt-1)) then
       st=nt-2   
    end if
@@ -233,5 +245,7 @@
       if (end_time_step .LE. t_all(0)/3600)
          print(" ")
-         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")
+         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")
          print(" ")
          print("Select another 'end_time_step'")
@@ -241,5 +255,7 @@
       if (end_time_step .GT. t_all(nt-1)/3600)
          print(" ")
-         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")
+         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")
          print(" ")
          print("Select another 'end_time_step'")  
@@ -249,5 +265,7 @@
       if (end_time_step .LE. start_time_step/3600)
          print(" ")
-         print("'end_time_step' = "+ end_time_step +"h is equal or lower than 'start_time_step' = "+start_time_step+"h")
+         print("'end_time_step' = "+ end_time_step +\
+               "h is equal or lower than 'start_time_step' = "+\
+               start_time_step+"h")
          print(" ")
          print("Select another 'start_time_step' or 'end_time_step'")
@@ -257,5 +275,6 @@
    end if
    do i=0,nt-1     
-      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
          et=i
          break
@@ -278,6 +297,8 @@
 
    print(" ")
-   print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step)
-   print("                     till "+t_all(end_time_step)/3600+" h = "+t_all(end_time_step)+" s => index = "+end_time_step)
+   print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+\
+         t_all(start_time_step)+" s => index = "+start_time_step)
+   print("                     till "+t_all(end_time_step)/3600+" h = "+\
+         t_all(end_time_step)+" s => index = "+end_time_step)
    print(" ")
 
@@ -300,4 +321,6 @@
    res@tmYLLabelFont           = "helvetica" 
    res@xyLineColors            = (/237/) 
+   res@trXMaxF                 = t_all(start_time_step)
+   res@trXMinF                 = t_all(end_time_step)
    
    res@lgLabelFontHeightF     = 0.02
@@ -405,5 +428,6 @@
 
       do j = 0, comma -2
-         vNam_temp(j) = charactertostring(var_char(indices(j)+1:indices(j+1)-1))
+         vNam_temp(j) = charactertostring(\
+                                   var_char(indices(j)+1:indices(j+1)-1))
       end do
      
@@ -458,5 +482,6 @@
             maxi(varn) = max(data(varn,:))
            
-            if (vNam(varn) .EQ. "E" .OR. vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") then
+            if (vNam(varn) .EQ. "E" .OR. vNam(varn) .EQ. "Es" .OR. \
+                vNam(varn) .EQ. "E*") then
                if (mini(varn) .EQ. maxi(varn)) then
                   if (min(data(varn,:)) .EQ. 0)then
@@ -497,5 +522,6 @@
             end if
 
-            if (vNam(varn) .EQ. "umax" .OR. vNam(varn) .EQ. "vmax" .OR. vNam(varn) .EQ. "wmax") then
+            if (vNam(varn) .EQ. "umax" .OR. vNam(varn) .EQ. "vmax" .OR. \
+                vNam(varn) .EQ. "wmax") then
                if (mini(varn) .EQ. maxi(varn)) then
                   if (mini(varn) .EQ. 0)then
@@ -535,6 +561,7 @@
             end if
 
-            if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wpt"\
-               .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq ) then
+            if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "wpptp" .OR. \
+                vNam(varn) .EQ. "wpt" .OR. vNam(varn) .EQ. \
+                "w"+dq+"pt"+dq+"0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq ) then
                if (mini(varn) .EQ. maxi(varn)) then
                   if (min(data(varn,:)) .EQ. 0)then
@@ -581,5 +608,6 @@
   if (isStrSubset(data@long_name," SR " ))then
       print(" ")
-      print("If you have outputs of statistic regions you cannot overlay variables;")
+      print("If you have outputs of statistic regions you cannot overlay "+\
+            "variables;")
       print("'over' is set to 0" )
       print(" ")
@@ -690,5 +718,6 @@
             end if
 
-            if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" )
+            if (vNam(varn) .EQ. "wpptp0" .OR. \
+                vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" )
                w0=0
                res@xyLineColors            = (/237/)
@@ -759,5 +788,5 @@
 
                ; ***************************************************
-               ; legend for combined plot
+               ; legend for overlaid plot
                ; ***************************************************
       
@@ -777,5 +806,6 @@
                annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)            
             end if
-            if ((vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") .AND. E .NE. 1) then
+            if ((vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") .AND. \
+                E .NE. 1) then
                Es=1
                overlay(plot_E,plot_Es)
@@ -784,5 +814,5 @@
 
                ; ***************************************************
-               ; legend for combined plot
+               ; legend for overlaid plot
                ; ***************************************************
       
@@ -803,5 +833,6 @@
             end if
 
-            if ((vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*") .AND. ws .NE. 1) then
+            if ((vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*") .AND. \
+                 ws .NE. 1) then
                us=1
                overlay(plot_us,plot_ws)
@@ -810,5 +841,5 @@
 
                ; ***************************************************
-               ; legend for combined plot
+               ; legend for overlaid plot
                ; ***************************************************
       
@@ -828,5 +859,6 @@
                annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
             end if
-            if ((vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*") .AND. us .NE. 1) then
+            if ((vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*") .AND. \
+                 us .NE. 1) then
                ws=1
                overlay(plot_us,plot_ws)
@@ -835,5 +867,5 @@
 
                ; ***************************************************
-               ; legend for combined plot
+               ; legend for overlaid  plot
                ; ***************************************************
       
@@ -864,5 +896,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -875,5 +907,6 @@
                   lgres@lgDashIndexes      = (/0,0,0/)
                   lgres@lgLineColors       = (/237,144,80/)
-                  lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres)       
+                  lbid = gsn_create_legend(\
+                                  wks_ps,3,(/"umax","vmax","wmax"/),lgres)
 
                   amres = True
@@ -892,5 +925,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -903,6 +936,6 @@
                   lgres@lgDashIndexes      = (/0,0,0/)
                   lgres@lgLineColors       = (/237,144,80/)
-                  lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres)       
-
+                  lbid = gsn_create_legend(\
+                                      wks_ps,3,(/"umax","vmax","wmax"/),lgres)
                   amres = True
                   amres@amParallelPosF   = 0.6		    
@@ -920,5 +953,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -931,6 +964,6 @@
                   lgres@lgDashIndexes      = (/0,0,0/)
                   lgres@lgLineColors       = (/237,144,80/)
-                  lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres)       
-
+                  lbid = gsn_create_legend(\
+                                       wks_ps,3,(/"umax","vmax","wmax"/),lgres)
                   amres = True
                   amres@amParallelPosF   = 0.6		    
@@ -947,5 +980,5 @@
        
                ; ***************************************************
-               ; legend for combined plot
+               ; legend for overlaid plot
                ; ***************************************************
       
@@ -958,5 +991,5 @@
                lgres@lgDashIndexes      = (/0,0,0/)
                lgres@lgLineColors       = (/237,144,80/)
-               lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres)       
+               lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres)
 
                amres = True
@@ -972,5 +1005,5 @@
 
                ; ***************************************************
-               ; legend for combined plot
+               ; legend for overlaid plot
                ; ***************************************************
       
@@ -983,5 +1016,5 @@
                lgres@lgDashIndexes      = (/0,0,0/)
                lgres@lgLineColors       = (/237,144,80/)
-               lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres)       
+               lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres) 
 
                amres = True
@@ -1000,5 +1033,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -1011,6 +1044,6 @@
                   lgres@lgDashIndexes      = (/0,0,0/)
                   lgres@lgLineColors       = (/237,144,80/)
-                  lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)       
-
+                  lbid = gsn_create_legend(\
+                                    wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)
                   amres = True
                   amres@amParallelPosF   = 0.6		    
@@ -1019,5 +1052,6 @@
                end if            
             end if
-            if ((vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq) .AND. w0 .NE. 1)
+            if ((vNam(varn) .EQ. "wpptp" .OR. \
+                 vNam(varn) .EQ. "w"+dq+"pt"+dq) .AND. w0 .NE. 1)
                if (wt .NE. 1) then
                  wp=1
@@ -1028,5 +1062,5 @@
                  
                  ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -1039,5 +1073,6 @@
                   lgres@lgDashIndexes      = (/0,0,0/)
                   lgres@lgLineColors       = (/237,144,80/)
-                  lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)       
+                  lbid = gsn_create_legend(\
+                                     wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)
 
                   amres = True
@@ -1056,5 +1091,5 @@
 
                   ; ***************************************************
-                  ; legend for combined plot
+                  ; legend for overlaid plot
                   ; ***************************************************
       
@@ -1067,6 +1102,6 @@
                   lgres@lgDashIndexes      = (/0,0,0/)
                   lgres@lgLineColors       = (/237,144,80/)
-                  lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)       
-
+                  lbid = gsn_create_legend(\
+                                  wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)
                   amres = True
                   amres@amParallelPosF   = 0.6		    
@@ -1076,5 +1111,6 @@
             end if
 
-            if ((vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)") .AND. pz .NE. 1) then
+            if ((vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)") .AND. \
+                pz .NE. 1) then
                p=1      
                overlay(plot_pt_0_,plot_pt_zp_)
@@ -1083,5 +1119,5 @@
       
                ; ***************************************************
-               ; legend for combined plot
+               ; legend for overlaid plot
                ; ***************************************************
       
@@ -1094,5 +1130,5 @@
                lgres@lgDashIndexes      = (/0,0,0/)
                lgres@lgLineColors       = (/237,144,80/)
-               lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)       
+               lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)
 
                amres = True
@@ -1101,5 +1137,6 @@
                annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
             end if 
-            if ((vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)") .AND. p .NE. 1) then
+            if ((vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)") .AND.\
+                 p .NE. 1) then
                pz=1        
                overlay(plot_pt_0_,plot_pt_zp_)
@@ -1108,5 +1145,5 @@
 
                ; ***************************************************
-               ; legend for combined plot
+               ; legend for overlaid plot
                ; ***************************************************
       
@@ -1119,5 +1156,5 @@
                lgres@lgDashIndexes      = (/0,0,0/)
                lgres@lgLineColors       = (/237,144,80/)
-               lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)       
+               lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)
 
                amres = True
@@ -1128,13 +1165,15 @@
 
             if(vNam(varn) .NE. "pt_zp_" .AND. vNam(varn) .NE. "pt(zp)" .AND. \
-               vNam(varn) .NE. "pt_0_" .AND. vNam(varn) .NE. "pt(0)" .AND. \
-               vNam(varn) .NE. "wpt" .AND. vNam(varn) .NE. "wpptp" .AND. \
-               vNam(varn) .NE. "w"+dq+"pt"+dq .AND. vNam(varn) .NE. "wpptp0" .AND. \
-               vNam(varn) .NE. "w"+dq+"pt"+dq+"0" .AND. vNam(varn) .NE. "z_i_pt" .AND.\
-               vNam(varn) .NE. "z_i_wpt" .AND. vNam(varn) .NE. "wmax" .AND. \
-               vNam(varn) .NE. "vmax" .AND. vNam(varn) .NE. "umax" .AND. \
-               vNam(varn) .NE. "ws" .AND. vNam(varn) .NE. "w*" .AND.  \
-               vNam(varn) .NE. "us" .AND. vNam(varn) .NE. "u*" .AND. \
-               vNam(varn) .NE. "Es" .AND. vNam(varn) .NE. "E*" .AND. \
+               vNam(varn) .NE. "pt_0_" .AND. vNam(varn) .NE. "pt(0)" .AND.   \
+               vNam(varn) .NE. "wpt" .AND. vNam(varn) .NE. "wpptp" .AND.     \
+               vNam(varn) .NE. "w"+dq+"pt"+dq .AND.                          \
+               vNam(varn) .NE. "wpptp0" .AND.                                \
+               vNam(varn) .NE. "w"+dq+"pt"+dq+"0" .AND.                      \
+               vNam(varn) .NE. "z_i_pt" .AND.                                \
+               vNam(varn) .NE. "z_i_wpt" .AND. vNam(varn) .NE. "wmax" .AND.  \
+               vNam(varn) .NE. "vmax" .AND. vNam(varn) .NE. "umax" .AND.     \
+               vNam(varn) .NE. "ws" .AND. vNam(varn) .NE. "w*" .AND.         \
+               vNam(varn) .NE. "us" .AND. vNam(varn) .NE. "u*" .AND.         \
+               vNam(varn) .NE. "Es" .AND. vNam(varn) .NE. "E*" .AND.         \
                vNam(varn) .NE. "E") then
 
@@ -1230,5 +1269,6 @@
    no_frames = 0
  
-   if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. n .gt. no_rows*no_columns) then
+   if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \
+        n .gt. no_rows*no_columns) then
       gsn_panel(wks_ps,plot_ps(1:n),(/n,1/),resP)
       print(" ")
@@ -1241,5 +1281,6 @@
             no_frames = no_frames + 1            
          else
-            gsn_panel(wks_ps, plot_ps(np:np+no_rows*no_columns-1),(/no_rows,no_columns/),resP)
+            gsn_panel(wks_ps, plot_ps(np:np+no_rows*no_columns-1),\
+                                                   (/no_rows,no_columns/),resP)
             no_frames = no_frames + 1
          end if
Index: /palm/trunk/SCRIPTS/palmplot
===================================================================
--- /palm/trunk/SCRIPTS/palmplot	(revision 565)
+++ /palm/trunk/SCRIPTS/palmplot	(revision 566)
@@ -14,4 +14,6 @@
     # 01/04/10 - Rieke - bugfix - treatment of special character *
     #                    in NCL variables containing lists corrected
+    # 23/08/10 - Rieke - bugfix - "" had to be added in if-queries 
+    # 30/09/10 - Rieke - Link to new online documentation of PALM NCL scripts
 
 
@@ -24,8 +26,9 @@
      printf "\n   script_identifier has to be one of the following:"
      printf "\n    xy, xz, yz, pr, ts, sp"
-     printf "\n   in dependence of the data that wants to be plotted\n"
+     printf "\n   in dependence on the data that wants to be plotted\n"
      printf "\n   the further arguments control the plot"
      printf "\n   they can also be set in the configuration file .ncl.config"
-     printf "\n   a documentation is available at $PALM_BIN/\NCL\/UserGuide_for_NCLscripts.pdf\n\n")
+     printf "\n   a documentation is available at"
+     printf "\n   http://palm.muk.uni-hannover.de/wiki/doc/app/ncl \n\n")
      exit
  fi
