anchor.diff:            saoamf(ixtrack,itimes) = SUM(scattw(ixtrack, itimes, 1:CmETA) * &
                                           climatology(ixtrack,itimes,1:CmETA))     / &
                                      SUM(climatology(ixtrack,itimes,1:CmETA))
  +
  +          amf_pro_err(ixtrack,itimes) = SUM(scattw(ixtrack, itimes, 1:CmETA) * &
  +               climatology_sd(ixtrack,itimes,1:CmETA))     / &
  +               SUM(climatology_sd(ixtrack,itimes,1:CmETA)+climatology(ixtrack,itimes,1:CmETA))
   
          END DO ! Finish xtrack pixel loop
       END DO ! Finish 
  
positive.code:     ! -----------------------------
      ! Output and modified variables
      ! -----------------------------
      REAL    (KIND=r8), DIMENSION (1:nx,0:nt-1),       INTENT (INOUT) :: saoamf
      INTEGER (KIND=i4),                                INTENT (INOUT) :: errstat
  
      ! ---------------
  
negative.code:        ! Work out Averaging Kernels
         ! -----------------------------------------------------------------
         CALL compute_amf ( nt, nx, CmETA, climatology, climatology_sd, &
              scattw, saoamf, amf_pro_err, amfdiag, locerrstat)
  
         ! -----------------------------------------------------------------
         ! Write out scattering weights, altitude grid and averaging kernels
  