anchor.diff:      ! Input variables
       ! ---------------
       INTEGER (KIND=i4),                                INTENT(IN) :: nt, nx, CmETA
  -    REAL    (KIND=r8), DIMENSION (1:nx,0:nt-1,CmETA), INTENT(IN) :: climatology, scattw
  +    REAL    (KIND=r8), DIMENSION (1:nx,0:nt-1,CmETA), INTENT(IN) :: climatology, climatology_sd, scattw
       INTEGER (KIND=i2), DIMENSION (1:nx,0:nt-1),       INTENT(IN) :: amfdiag
   
       ! -----------------------------
  
positive.code:     ! ------------------------------------
      ! Initialize variables that are output
      ! ------------------------------------
      albedo       = r8_missval
      climatology  = r8_missval
      cli_psurface = r8_missval
      scattw       = r8_missval
      saoamf       = r8_missval
      amfgeo       = r8_missval
      amfdiag      = i2_missval
  
      ! -----------------------------------------
      ! If amf_wvl < 0.0 then the slant column is
  
negative.code:        ! Work out the AMF using the scattering weights and the climatology
         ! Work out Averaging Kernels
         ! -----------------------------------------------------------------
         CALL compute_amf ( nt, nx, CmETA, climatology, climatology_sd, &
              scattw, saoamf, amfdiag, locerrstat)
  
         ! -----------------------------------------------------------------
  