anchor.diff:         ! Read VLIDORT look up table. Variables are declared at module level
          ! ------------------------------------------------------------------
          CALL read_lookup_table (locerrstat)
  -       
  +
          ! ----------------------------------------------------------------------
          ! amfdiag is used to keep track of the pixels were enough information is
          ! available to carry on the AMFs calculation.
  
positive.code:           ! different from r8_missval and it needs to be
            ! initialized to 0.0 to work out the average
            ! ----------------------------------------------
            scattw(ixtrack,itime,:) = 0.0_r8
  
            ! ----------------------------------------------
            ! If sza > amf_max_sza set it for calculation to
  
negative.code:                    ! If we are below the level of the land, no need to
                     ! work out those scattering weights.
                     ! --------------------------------------------------
                     IF ( local_chg(ialt) .LE. local_srf(1) ) THEN
                        clear_scattw(one,one,one) = linInterpol (           &
                             vl_nsza, vl_nvza, vl_nalt,                     &
                              re_sza,  re_vza,  re_alt,                     &
                             scattwe(index_thg(1),:,:,:),                   &
                             local_sza(1), local_vza(1), local_chg(ialt),        &
                             status=status)
                     END IF
  
  