SYNOPSIS

PERL PROGRAM NAME:

AUTHOR: Juan Lorenzo (Perl module only)

DATE:

DESCRIPTION:

Version:

USE

NOTES

Examples

SYNOPSIS

SEISMIC UNIX NOTES ADDRVL3D - Add a random velocity layer (RVL) to a gridded

            v(x,y,z) velocity model                                    



	addrvl3d <infile n1= n2= >outfile [parameters]			



 Required Parameters:							

 n1=		number of samples along 1st dimension			

 n2=		number of samples along 2nd dimension			



 Optional Parameters:							



 n3=1          number of samples along 3rd dimension			



 mode=1             add single layer populated with random vels	

                    =2 add nrvl layers of random thickness and vel     

 seed=from_clock    random number seed (integer)			



 ---->New layer geometry info						

 i1beg=1       1st dimension beginning sample 				

 i1end=n1/5    1st dimension ending sample 				

 i2beg=1       2nd dimension beginning sample 				

 i2end=n2      2nd dimension ending sample 				

 i3beg=1       3rd dimension beginning sample 				

 i3end=n3      3rd dimension ending sample 				

 ---->New layer velocity info						

 vlsd=v/3     range (std dev) of random velocity in layer, 		

               where v=v(0,0,i1) and i1=(i1beg+i1end)/2 	 	

 add=1         add random vel to original vel (v_orig) at that point 	

               =0 replace vel at that point with (v_orig+v_rand) 	

 how=0         random vels can be higher or lower than v_orig		

               =1 random vels are always lower than v_orig		

               =2 random vels are always higher than v_orig		

 cvel=2000     layer filled with constant velocity cvel 		

               (overides vlsd,add,how params)			

 ---->Smoothing parameters (0 = no smoothing)				

 r1=0.0	1st dimension operator length in samples		

 r2=0.0	2nd dimension operator length in samples		

 r3=0.0	3rd dimension operator length in samples		

 slowness=0	=1 smoothing on slowness; =0 smoothing on velocity	



 nrvl=n1/10    number of const velocity layers to add     		

 pdv=10.       percentage velocity deviation (max) from input model	



 Notes:								

 1. Smoothing radii usually fall in the range of [0,20].		

 2. Smoothing radii can be used to set aspect ratio of random velocity 

    anomalies in the new layer.  For example (r1=5,r2=0,r3=0) will     

    result in vertical vel streaks that mimick vertical fracturing.    

 3. Smoothing on slowness works better to preserve traveltimes relative

    to the unsmoothed case.						

 4. Default case is a random velocity (+/-30%) near surface layer whose

    thickness is 200f the total 2D model thickness.			

 5. Each layer vel is a random perturbation on input model at that level.

 6. The depth dimension is assumed to be along axis 1.			



 Example:								

 1. 2D RVL with no smoothing						

   makevel nz=250 nx=200 | addrvl3d n1=250 n2=200 | ximage n1=250      

 2. 3D RVL with no smoothing						

   makevel nz=250 nx=200 ny=220 |					

   addrvl3d n1=250 n2=200 n3=220 | 					

   xmovie n1=250 n2=200					    	







 Author:  Saudi Aramco: Chris Liner Jan/Feb 2005

          Based on smooth3d (CWP: Zhenyue Liu  March 1995)

User's notes (Juan Lorenzo) untested

CHANGES and their DATES

Import packages

instantiation of packages

Encapsulated hash of private variables

sub Step

collects switches and assembles bash instructions by adding the program name

sub note

collects switches and assembles bash instructions by adding the program name

sub clear

sub add

sub cvel

sub how

sub i1beg

sub i1end

sub i2beg

sub i2end

sub i3beg

sub i3end

sub mode

sub n1

sub n2

sub n3

sub nrvl

sub nz

sub pdv

sub r1

sub r2

sub r3

sub seed

sub slowness

sub v

sub vlsd

sub get_max_index

max index = number of input variables -1