Index: palm/trunk/SCRIPTS/NCL/ncl_preferences.ncl
===================================================================
--- palm/trunk/SCRIPTS/NCL/ncl_preferences.ncl	(revision 347)
+++ palm/trunk/SCRIPTS/NCL/ncl_preferences.ncl	(revision 351)
@@ -1256,4 +1256,24 @@
       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  
       ;
Index: palm/trunk/SCRIPTS/NCL/profiles.ncl
===================================================================
--- palm/trunk/SCRIPTS/NCL/profiles.ncl	(revision 347)
+++ palm/trunk/SCRIPTS/NCL/profiles.ncl	(revision 351)
@@ -990,9 +990,35 @@
    delete(end_time_step)
    end_time_step=round(et,3)
+
+   no_time = end_time_step-start_time_step+1
    
+   ; ****************************************************
+   ; time_stride and different types of mistakes that could be done
+   ; ****************************************************
+ 
+   if(time_stride .LT. 1)
+      print(" ")
+      print("'time_stride' has to be positive and is set to 1")
+      print(" ")
+      time_stride = 1
+   end if
+
+   if(time_stride .GE. no_time)
+      print(" ")
+      print("'time_stride' is greater equal than number of available time steps,")
+      print("only start time step will be plotted then")
+      print(" ")
+      time_stride = no_time
+   end if
+
+   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(end_time_step)/3600+" h = "+t_all(end_time_step)+" s => index = "+end_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(" ")
+
 
    ; ****************************************************
@@ -1000,10 +1026,9 @@
    ; ****************************************************
    
-   legend_label=new(nt,double)
-   do p=start_time_step,end_time_step
-      legend_label(p-start_time_step)=decimalPlaces(t_all(p)/3600,3,True)         
+   legend_label=new(np,double)
+   do p=0, np-1
+      legend_label(p)=decimalPlaces(t_all(ti_in(p))/3600,3,True)         
    end do
    
-   np = end_time_step-start_time_step+1  
 
    ; ***************************************************
@@ -1034,5 +1059,5 @@
    res@pmLegendOrthogonalPosF  = -1.0
    res@pmLegendWidthF          = 0.12
-   res@pmLegendHeightF         = 0.05*(end_time_step-start_time_step+1)
+   res@pmLegendHeightF         = 0.05*np
    res@lgLabelFontHeightF     = font_size
    res@lgTitleString      = "Time [h]"
@@ -1193,6 +1218,6 @@
    ; ***************************************************
       
-   do ti = start_time_step, end_time_step
-      if( t_all(ti) .lt. 10^36) then
+   do ti =0,np-1
+      if( t_all(ti_in(ti)) .lt. 10^36) then
          start_time_step = ti
          break
@@ -1201,9 +1226,9 @@
    
    if (log_z .EQ. 1) then
-      data   = new((/dim,(end_time_step-start_time_step)+1,dimz-1/),float) 
+      data   = new((/dim,np,dimz-1/),float) 
       data@_FillValue=9.96921e+36
-      data_0 = new((/(end_time_step-start_time_step)+1,dimz-1/),float)
+      data_0 = new((/np,dimz-1/),float)
       data_0 = 0.1
-      t      = new((/(end_time_step-start_time_step)+1,dimz-1/),float) 
+      t      = new((/np,dimz-1/),float) 
       t      = 0.0
       unit   = new(dim,string)
@@ -1232,9 +1257,9 @@
       end if
    else
-      data   = new((/dim,(end_time_step-start_time_step)+1,dimz/),float) 
+      data   = new((/dim,np,dimz/),float) 
       data@_FillValue=9.96921e+36
-      data_0 = new((/(end_time_step-start_time_step)+1,dimz/),float)
+      data_0 = new((/np,dimz/),float)
       data_0 = 0.0
-      t      = new((/(end_time_step-start_time_step)+1,dimz/),float) 
+      t      = new((/np,dimz/),float) 
       t      = 0.0
       unit   = new(dim,string)
@@ -1526,25 +1551,29 @@
 	       temp_att = f_att->$vNam(varn)$ 
                if (log_z .EQ. 1) then
-                  data(varn,:,:) = temp(start_time_step:end_time_step,1:dimz-1)
-               else
-                  data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz-1)
+                  do j=0,np-1
+                     data(varn,j,:) = temp(ti_in(j),1:dimz-1)
+                  end do
+               else
+                  do j=0,np-1
+                     data(varn,j,:) = temp(ti_in(j),0:dimz-1)
+                  end do
                end if
             else
                if (log_z .EQ. 1) then
                   do i=1,dimz-1
-                     do j=start_time_step,end_time_step
+                     do j=0,np-1
                         temp= f[:]->$vNam(varn)$
 			temp_att = f_att->$vNam(varn)$ 
-			data_temp = temp(j,i,start_y:end_y,start_x:end_x)
-			data(varn,j-start_time_step,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
                else
                   do i=0,dimz-1
-                     do j=start_time_step,end_time_step
+                     do j=0,np-1
                         temp= f[:]->$vNam(varn)$
 			temp_att = f_att->$vNam(varn)$ 
-			data_temp = temp(j,i,start_y:end_y,start_x:end_x)
-                        data(varn,j-start_time_step,i) = 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) = dim_avg_Wrap(dim_avg_Wrap(data_temp))
                      end do
                   end do
@@ -1598,9 +1627,9 @@
              if (log_z .EQ. 1) then
                do i=1,dimz-1
-                  do j=start_time_step,end_time_step
-                     temp= f[:]->$vNam(varn)$(j,i,start_y:end_y,start_x:end_x)
+                  do j=0,np-1
+                     temp= f[:]->$vNam(varn)$
 		     temp_att = f_att->$vNam(varn)$ 
-		     data_temp = temp(j,i,start_y:end_y,start_x:end_x)
-                     data(varn,j-start_time_step,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))
                      delete(data_temp)
                   end do
@@ -1608,11 +1637,11 @@
             else
                do i=0,dimz-1
-                  do j=start_time_step,end_time_step
-                     temp= f[:]->$vNam(varn)$;(j,i,start_y:end_y,start_x:end_x)
+                  do j=0,np-1
+                     temp= f[:]->$vNam(varn)$
 		     temp_att = f_att->$vNam(varn)$ 
-		     data_temp = temp(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_temp!0 = "t"
 		     data_temp!1 = "z"
-                     data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp))
+                     data(varn,j,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp))
                      delete(data_temp)
                   end do
@@ -1631,9 +1660,13 @@
                z = f_att->$vNam(varn+1)$(1:dimz-1) 
                unit(varn) = temp_att@units
-               data(varn,:,:) = temp(start_time_step:end_time_step,1:dimz-1) 
+               do j=0,np-1
+                  data(varn,j,:) = temp(ti_in(j),1:dimz-1) 
+               end do
             else
                z = f_att->$vNam(varn+1)$ 
                unit(varn) = temp_att@units
-               data(varn,:,:) = temp(start_time_step:end_time_step,:)
+               do j=0,np-1
+                  data(varn,j,:) = temp(ti_in(j),:) 
+               end do
             end if
          else 
