anchor.diff:     use f90sac
   
      implicit none
  -
  +   
  +   private
  +   
      ! Kind parameters
      integer, parameter, private :: r4 = selected_real_kind(6,37)
      integer, parameter, private :: r8 = selected_real_kind(15,307)
  
positive.code:    type(SACtrace), intent(inout)   :: E, N, Z
     real, intent(in), optional :: freq, delta, noise, spol
     character(len=*), intent(in), optional :: wavetype
     real(r4), allocatable :: trace(:), random_noise(:)
     real :: delta_in, spol_in, freq_in, noise_in
     integer :: npts
     character(len=1) :: wavetype_in
  
negative.code:          call sw_error('sw_misfit_ecs: Output array for dt_ecs is too small')
     endif
  
     call sw_alloc(phi2,n)
     call sw_alloc(dt2,n)
  
     ! Calculate splitting and misfit for each observation
     do i=1,n
  