Index: palm/trunk/SCRIPTS/NCL/cross_sections.ncl
===================================================================
--- palm/trunk/SCRIPTS/NCL/cross_sections.ncl	(revision 193)
+++ palm/trunk/SCRIPTS/NCL/cross_sections.ncl	(revision 194)
@@ -8,5 +8,12 @@
 ; load ncl_preferences.ncl
 ;***************************************************
-   
+
+function which_script()
+local script 
+begin 
+   script="cross_section"
+   return(script)
+end
+       
 if (isfilepresent("~/ncl_preferences.ncl")) then
    loadscript("~/ncl_preferences.ncl")
@@ -21,15 +28,6 @@
    end if
 end if
-    
+
 begin
-
-   if (cross_sections .NE. 1 .OR. profiles .NE. 0 .OR. timeseries .NE. 0 .OR. spectra .NE. 0)then
-      print(" ")
-      print("Please specify the used script in 'ncl_preferences.ncl' (Line 7-10)")
-      print(" ")
-      print("Set 'cross_sections' equal 1 and the other variables equal 0")
-      print(" ")
-      exit
-   end if
 
    ; ***************************************************
@@ -916,11 +914,7 @@
          check = True
       end if  
-    
-      if (var .NE. "all") then
-         check = isStrSubset( var,","+vNam(varn)+"," ) 
-      end if  
 
       if(check) then
-
+      
          no_var=no_var+1
 
@@ -965,4 +959,6 @@
    var_input=new(no_var,string)
    numb=0
+   no_var=0
+   
    do varn=dim-1,0,1   
     
@@ -977,8 +973,4 @@
          check = True
       end if  
-    
-      if (var .NE. "all") then
-         check = isStrSubset( var,","+vNam(varn)+"," ) 
-      end if  
 
       if(check) then     
@@ -986,4 +978,12 @@
 	 numb=numb+1     
       end if
+                  
+      if (var .NE. "all") then
+         check = isStrSubset( var,","+vNam(varn)+"," ) 
+      end if
+      
+      if (check) then
+         no_var = no_var+1
+      end if
       
    end do
@@ -1000,5 +1000,5 @@
       if (v1 .EQ. 0)then
          print(" ")
-         print("Component 1 for the vector-plot ('vec1') must be one of the input varibles:")
+         print("Component 1 for the vector-plot ('vec1') must be one of the varibles on the input file:")
 	 print("- "+var_input)
 	 print("be sure to have one comma berfore and after the variable")
@@ -1009,5 +1009,5 @@
       if (v2 .EQ. 0)then
          print(" ")
-         print("Component 2 for the vector-plot ('vec2') must be one of the input varibles:")
+         print("Component 2 for the vector-plot ('vec2') must be one of the varibles on the input file:")
 	 print("- "+var_input)
 	 print("be sure to have one comma berfore and after the variable")
@@ -1024,5 +1024,5 @@
    gsn_define_colormap(wks_ps,"rainbow+white")
 
-   plot=new((/no_time*no_layer*no_var*2/),graphic)
+   plot=new((/no_time*no_layer*no_var/),graphic)
  
    page = 0
@@ -1099,6 +1099,10 @@
                   
                   if ( sort .eq. "time" ) then
-                     if ( data&z(lo) .eq. -1 ) then
-                        level = "-average"
+                     if ( data&z(lo) .eq. -1)then
+		        if (delta_z .EQ. -1) then
+                           level = "-average"
+			else
+			   level = "=" + data&z(lo) + "m"
+			end if
                      else 
                         level = "=" + data&z(lo) + "m"
@@ -1122,6 +1126,10 @@
                  
                   if ( sort .eq. "layer" ) then
-		     if ( data&z(li) .eq. -1 ) then
-                        level = "-average"
+		     if (data&z(li) .eq. -1) then
+		        if (delta_z .EQ. -1) then
+                           level = "-average"
+			else
+			   level = "=" + data&z(li) + "m"
+			end if
                      else 
                         level = "=" + data&z(li) + "m"
@@ -1267,5 +1275,5 @@
    ; merge plots onto one page 
    ; ***************************************************
-
+   
    if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec")then 
       if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then
@@ -1291,5 +1299,5 @@
       else
          do np = 0,no_layer*no_time*no_var-1,no_lines*no_columns   
-            if ( np + no_lines*no_columns .gt. (no_layer*no_time*no_var)-1) then 
+            if ( np + no_lines*no_columns .gt. (no_layer*no_time*no_var)-1) then
                gsn_panel(wks_ps, plot(np:(no_layer*no_time*no_var)-1),(/no_lines,no_columns/),cs_resP)
             else
Index: palm/trunk/SCRIPTS/NCL/ncl_preferences.ncl
===================================================================
--- palm/trunk/SCRIPTS/NCL/ncl_preferences.ncl	(revision 193)
+++ palm/trunk/SCRIPTS/NCL/ncl_preferences.ncl	(revision 194)
@@ -1,20 +1,15 @@
 begin
 
-;*********************************************************
-; Please specify the used script by setting it to 1:
 ;********************************************************* 
-  
-   cross_sections = 0
-   profiles       = 0
-   timeseries     = 0
-   spectra        = 0
+
+script=which_script
    
 ;*********************************************************
-
+   
    ;******************************************************
    ; parameters used by CROSS_SECTIONS
    ;******************************************************
    
-   if (cross_sections .EQ. 1)then
+   if (script .EQ. "cross_section")then
    
       ;***************************************************
@@ -28,9 +23,9 @@
       ;***************************************************
       if(.not. isvar("file_1"))then
-      
-      
+
+
          file_1 = "File in" 
 	 
-       
+	 
       end if
       ;***************************************************
@@ -81,5 +76,5 @@
       ; data type: string
       ;
-      ; default:   "~/test" 
+      ; default:   "~/test_cs" 
       ;***************************************************
       if(.not. isvar("file_out"))then	 
@@ -264,7 +259,6 @@
       ; OPTIONAL --zs-- MINIMUM Z-AXIS 
       ;
-      ; value for minimum of z-axis, selectable if there are NO preseted layers for z (as for XZ or YZ 2D-DATA);
-      ; you don't have to specify a precise meter value from the input file, it will be rounded to the next 
-      ; existent value 
+      ; index for minimum of z-axis, selectable if there are NO preseted layers for z (as for XZ or YZ 2D-DATA);
+      ; you cannot specify a meter value from the input file due to grid stretching  
       ;
       ; data type: integer
@@ -282,7 +276,6 @@
       ; OPTIONAL --ze-- MAXIMUM Z-AXIS 
       ;
-      ; value for maximum of z-axis, selectable if there are NO preseted layers for z (as for XZ or YZ 2D-DATA);
-      ; you don't have to specify a precise meter value from the input file, it will be rounded to the next 
-      ; existent value 
+      ; index for maximum of z-axis, selectable if there are NO preseted layers for z (as for XZ or YZ 2D-DATA);
+      ; you cannot specify a meter value from the input file due to grid stretching  
       ;
       ; data type: integer
@@ -417,5 +410,5 @@
       end if      	 
       ;***************************************************
-     
+
    end if 
 
@@ -424,6 +417,6 @@
    ;******************************************************
    
-   if (profiles .EQ. 1)then
-   
+   if (script .EQ. "profiles")then
+
       ;***************************************************
       ; REQUIRED --file_1-- INPUT FILE
@@ -481,5 +474,5 @@
       ; data type: string
       ;
-      ; default:   "~/test" 
+      ; default:   "~/test_pr" 
       ;***************************************************
       if (.not. isvar("file_out"))then	
@@ -1157,11 +1150,11 @@
        
    end if
-   
+
    ;******************************************************
    ; parameters used by SPECTRA
    ;******************************************************
    
-   if (spectra .EQ. 1) then
-   
+   if (script .EQ. "spectra") then
+
       ;***************************************************
       ; REQUIRED --file_1-- INPUT FILE
@@ -1203,5 +1196,5 @@
       ; data type: string
       ;
-      ; default:   "~/test" 
+      ; default:   "~/test_sp" 
       ;***************************************************
       if (.not. isvar("file_out"))then	
@@ -1428,12 +1421,11 @@
      
    end if
-   
-   
+
    ;******************************************************
    ; parameters used by TIMESERIES
    ;******************************************************
 
-   if (timeseries .EQ. 1) then
-   
+   if (script .EQ. "timeseries") then
+
       ;***************************************************
       ; REQUIRED --file_1-- INPUT FILE
@@ -1475,5 +1467,5 @@
       ; data type: string
       ;
-      ; default:   "~/test" 
+      ; default:   "~/test_ts" 
       ;***************************************************
       if (.not. isvar("file_out"))then	
@@ -1587,5 +1579,4 @@
 
    end if
-
 	 
 ;*********************************************************	 
Index: palm/trunk/SCRIPTS/NCL/profiles.ncl
===================================================================
--- palm/trunk/SCRIPTS/NCL/profiles.ncl	(revision 193)
+++ palm/trunk/SCRIPTS/NCL/profiles.ncl	(revision 194)
@@ -6,4 +6,11 @@
 ; load ncl_preferences.ncl
 ;***************************************************
+
+function which_script()
+local script 
+begin 
+   script="profiles"
+   return(script)
+end
    
 if (isfilepresent("~/ncl_preferences.ncl")) then
@@ -22,13 +29,4 @@
 begin
 
-   if (cross_sections .NE. 0 .OR. profiles .NE. 1 .OR. timeseries .NE. 0 .OR. spectra .NE. 0)then
-      print(" ")
-      print("Please specify the used script in 'ncl_preferences.ncl' (Line 7-10)")
-      print(" ")
-      print("Set 'profiles' equal 1 and the other variables equal 0")
-      print(" ")
-      exit
-   end if
- 
    ;***************************************************
    ; set up default parameter values and strings 
Index: palm/trunk/SCRIPTS/NCL/spectra.ncl
===================================================================
--- palm/trunk/SCRIPTS/NCL/spectra.ncl	(revision 193)
+++ palm/trunk/SCRIPTS/NCL/spectra.ncl	(revision 194)
@@ -6,4 +6,11 @@
 ; load ncl_preferences.ncl
 ;***************************************************
+
+function which_script()
+local script 
+begin 
+   script="spectra"
+   return(script)
+end
    
 if (isfilepresent("~/ncl_preferences.ncl")) then
@@ -21,13 +28,4 @@
    
 begin
-      
-   if (cross_sections .NE. 0 .OR. profiles .NE. 0 .OR. timeseries .NE. 0 .OR. spectra .NE. 1)then
-      print(" ")
-      print("Please specify the used script in 'ncl_preferences.ncl' (Line 7-10)")
-      print(" ")
-      print("Set 'spectra' equal 1 and the other variables equal 0")
-      print(" ")
-      exit
-   end if 
 
    ;***************************************************
@@ -339,8 +337,12 @@
       end do
    end if
-   
-   step=round(235/(np-1),3)
-   if (black .eq. 0 ) then  
-      res@xyLineColors = ispan(2,237,step)
+
+   if (black .eq. 0 ) then 
+      if (np .EQ. 1)then
+         res@xyLineColors = 237
+      else   
+         step=round(235/(np-1),3) 
+         res@xyLineColors = ispan(2,237,step)
+      end if
    end if
    if ( dash .eq. 0 ) then
Index: palm/trunk/SCRIPTS/NCL/timeseries.ncl
===================================================================
--- palm/trunk/SCRIPTS/NCL/timeseries.ncl	(revision 193)
+++ palm/trunk/SCRIPTS/NCL/timeseries.ncl	(revision 194)
@@ -1,3 +1,3 @@
-6load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
@@ -7,4 +7,11 @@
 ; load ncl_preferences.ncl
 ;***************************************************
+
+function which_script()
+local script 
+begin 
+   script="timeseries"
+   return(script)
+end
    
 if (isfilepresent("~/ncl_preferences.ncl")) then
@@ -22,13 +29,4 @@
    
 begin
-      
-   if (cross_sections .NE. 0 .OR. profiles .NE. 0 .OR. timeseries .NE. 1 .OR. spectra .NE. 0)then
-      print(" ")
-      print("Please specify the used script in 'ncl_preferences.ncl' (Line 7-10)")
-      print(" ")
-      print("Set 'timeseries' equal 1 and the other variables equal 0")
-      print(" ")
-      exit
-   end if
 
    ;***************************************************
