anchor.diff:     real :: freq_in, delta_in, noise_in
      character(len=*), intent(in), optional :: wavetype
      character(len=1) :: wavetype_in
  -   real(rs), allocatable, save :: phi2(:), dt2(:)
  +   real(rs), allocatable :: phi2(:), dt2(:)
      real(rs) :: vs1, vs2
      integer :: i, n
   
  
positive.code:    N%f = 4.0/freq_in ; N%user2 = N%f ; N%user3 = N%f + delta_in
     E%f = 4.0/freq_in ; N%user2 = E%f ; N%user3 = E%f + delta_in
     Z%f = 4.0/freq_in ; Z%user2 = N%f ; Z%user3 = Z%f + delta_in
  
  end subroutine sw_create_wave
  !------------------------------------------------------------------------------
  
negative.code: 
     ! Add noise
     if (noise_in > 1.0e-5) then
        allocate(random_noise(2*(npts-1)+1))
        call random_seed()
  
        call random_number(random_noise)
  