SMOOTH3D - 3D grid velocity SMOOTHing by the damped least squares 

      smooth3d <infile >outfile [parameters]                     

 Required Parameters:                                      
 n1=        number of samples along 1st dimension                
 n2=        number of samples along 2nd dimension                
 n3=        number of samples along 3rd dimension                

 Optional Parameters:                                      

 Smoothing parameters (0 = no smoothing)                   
 r1=0.0     operator length in 1st dimension               
 r2=0.0     operator length in 2nd dimension               
 r3=0.0     operator length in 3rd dimension               

 Sample intervals:                                         
 d1=1.0     1st dimension                                  
 d2=1.0     2nd dimension                                  
 d3=1.0     3rd dimension                                  
 iter=2     number of iteration used                       
 time=0     which dimension the time axis is (0 = no time axis)  
 depth=1    which dimension the depth axis is (ignored when time>0)    
 mu=1       the relative weight at maximum depth (or time)       
 verbose=0  =1 for printing minimum wavelengths            
 slowness=0 =1 smoothing on slowness; =0 smoothing on velocity   
 vminc=0    velocity values below it are cliped before smoothing 
 vmaxc=99999      velocity values above it are cliped before smoothing 

 Notes:                                              
 1. The larger the smoothing parameters, the smoother the output velocity.
    These parameters are lengths of smoothing operators in each dimension.
 2. iter controls the orders of derivatives to be smoothed in the output
    velocity. e.g., iter=2 means derivatives until 2nd order smoothed. 
 3. mu is the multipler of smoothing parameters at the bottom compared to
    those at the surface.                                  
 4. Minimum wavelengths of each dimension and the total may be printed 
   for the resulting output velocity is. To compute these parameters for
   the input velocity, use r1=r2=r3=0.                           
 5. Smoothing directly on slowness works better to preserve traveltime.
   So the program optionally converts the input velocity into slowness  ",
   and smooths the slowness, then converts back into velocity.         



 Author:  CWP: Zhenyue Liu  March 1995

 Reference:
 Liu, Z., 1994,"A velocity smoothing technique based on damped least squares
            in Project Reveiew, May 10, 1994, Consortium Project on
            Seismic Inverse Methods for Complex Stuctures.