anchor.diff:                     ! must be GT than 0.0. Only interpolate for values
                      ! above the cloud top.
                      ! --------------------------------------------------
  -                   IF ( local_chg(isalt) .LE. local_cld .AND. local_cfr .GT. 0.0 ) THEN
  +                   IF ( local_chg(isalt) .LE. local_cld(1) .AND. local_cfr(1) .GT. 0.0 ) THEN
                         cloud_scattw(one,one,one) =  linInterpol (              &
                              vl_nsza, vl_nvza, vl_nalt,                         &
                              re_sza,  re_vza,  re_alt,                          &
                              scattwe_cld(index_cld(1),:,:,:),                   &
  -                           local_sza, local_vza, local_chg(isalt),            &
  +                           local_sza(1), local_vza(1), local_chg(isalt),            &
                              status=status)
                      END IF
                      
  
positive.code:     ! ---------------
      ! Local variables
      ! ---------------
      INTEGER (KIND=i4) :: itime, ixtrack, ispre, isozo, isalt, iswav, issza, isvza, status, one
      INTEGER (KIND=i4), DIMENSION(1) :: iwavs, iwavf, index_thg, index_cld
      REAL    (KIND=r8) :: temp, tempsquare, grad, raa, tmp_saa, tmp_vaa
      REAL    (KIND=r8) :: ozo_abs, Intensity, Jacobian, Oz_xs, Intensity_cld, Jacobian_cld
      REAL    (KIND=r8) :: crf, nwavs!, Icr, Icl ,cloud_scattw, clear_scattw
      REAL    (KIND=r8), DIMENSION(clp_dim(1), sza_dim(1), vza_dim(1), alt_lay_dim(1)) :: scattwe, scattwe_cld
      REAL    (KIND=r8), DIMENSION(clp_dim(1), sza_dim(1), vza_dim(1))          :: Inte_clear, Inte_cloud
      REAL    (KIND=r8), DIMENSION(alt_lay_dim(1)) :: re_alt
      REAL    (KIND=r8), DIMENSION(clp_dim(1)) :: re_pre
      REAL    (KIND=r8), DIMENSION(sza_dim(1)) :: re_sza
      REAL    (KIND=r8), DIMENSION(vza_dim(1)) :: re_vza
      REAL    (KIND=r8)                     :: local_alb, local_sza, local_vza, local_thg, local_cld, local_cfr
      REAL    (KIND=r8), DIMENSION(1)       :: ezlocal_sza, ezlocal_vza
      REAL    (KIND=r8), DIMENSION(1,1,1)   :: cloud_scattw, clear_scattw
      REAL    (KIND=r8), DIMENSION(1,1)     :: Icr, Icl
      REAL    (KIND=r8), DIMENSION(alt_lay_dim(1)) :: local_chg
      REAL    (KIND=r8), PARAMETER :: d2r = 3.141592653589793d0/180.0  !! JED fix
      REAL    (KIND=r8), PARAMETER :: du  = 2.69e16 ! molecules/cm^2
  
negative.code:                    ! If we are below the level of the land, no need to
                     ! work out those scattering weights.
                     ! --------------------------------------------------
                     IF ( local_chg(isalt) .LE. local_thg(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(isalt),        &
                             status=status)
                     END IF
  
  