anchor.diff:      ! Input variables
       ! ---------------
       CHARACTER (LEN=1), INTENT (IN) :: ad
  -    INTEGER (KIND=i4), INTENT (IN) :: anozo, ancld, analb, ansza, anvza, anwav, anlay, anlev
  +    INTEGER (KIND=i4), INTENT (IN) :: anozo, ansrf, ancld, analb, ansza, anvza, anwav, anlay, anlev
   
       ! ------------------
       ! Modified variables
  
positive.code:           ELSE IF ( ABS(lat(ixtrack,itime)) .LE. 30.0 ) THEN
               toms_idx = MINLOC(ABS(lxxx-omi_ozone_amount(ixtrack,itime)/du), 1) + 11
            ENDIF
           
            ! ----------------------------------------------
            ! Work out relative azimuth angle for this pixel
            ! ----------------------------------------------
            tmp_saa = saa(ixtrack,itime); tmp_vaa = vaa(ixtrack,itime)
            ! (1) Map [-180, +180] to [0, 360]
            IF ( tmp_saa .NE. r4_missval .AND. tmp_saa .LT. 0.0_r4 .AND. &
                 tmp_saa .GE. -180.0_r4 ) THEN
               tmp_saa = 360.0_r4 + tmp_saa
            ENDIF
            IF ( tmp_vaa .NE. r4_missval .AND. tmp_vaa .LT. 0.0_r4 .AND. &
                 tmp_vaa .GE. -180.0_r4 ) THEN
               tmp_vaa = 360.0_r4 + tmp_vaa
            ENDIF
            ! (2) Compute relative azimuth angle (RELATIVE means absolute value)
            IF ( tmp_saa .GE. 0.0_r4 .AND. tmp_vaa .GE. 0.0_r4 ) THEN
               raa = ABS( tmp_saa - tmp_vaa )
            ENDIF
            IF ( raa .GE. 180.0_r4 ) THEN
               raa = 360.0_r4 - raa
            ENDIF
  
            ! ----------------------------------------------
  
negative.code:        ! 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.
  