!+ Subroutine to rescale optical depth and albedo.
!
! Method:
!	The standard rescaling formulae are applied.
!
! Current Owner of Code: J. M. Edwards
!
! History:
!	Version		Date			Comment
!	1.0		12-04-95		First Version under RCS
!						(J. M. Edwards)
!
! Description of Code:
!   FORTRAN 77  with extensions listed in documentation.
!
!- ---------------------------------------------------------------------
      SUBROUTINE RESCALE_TAU_OMEGA(N_PROFILE
     &   , I_LAYER_FIRST, I_LAYER_LAST
     &   , TAU, OMEGA, FORWARD_SCATTER
     &   )
!
!
      IMPLICIT NONE
!
!
!     INCLUDE HEADER FILES.
      INCLUDE 'incl/dimensions_field.ucf'
!
!     DUMMY ARGUMENTS.
      INTEGER	!, INTENT(IN)
     &     N_PROFILE
!             NUMBER OF PROFILES
     &   , I_LAYER_FIRST
!             FIRST LAYER TO RESCALE
     &   , I_LAYER_LAST
!             FIRST LAYER TO RESCALE
      REAL*8	!, INTENT(IN)
     &     FORWARD_SCATTER(NPD_PROFILE, NPD_LAYER)
!             FORWARD SCATTERING
      REAL*8	!, INTENT(INOUT)
     &     TAU(NPD_PROFILE, NPD_LAYER)
!             OPTICAL DEPTH
     &   , OMEGA(NPD_PROFILE, NPD_LAYER)
!             ALBEDO OF SINGLE SCATTERING
!
!     LOCAL VARIABLES.
      INTEGER
     &     I
!             LOOP VARIABLE
     &   , L
!             LOOP VARIABLE
!
!
!
      DO I=I_LAYER_FIRST, I_LAYER_LAST
         DO L=1, N_PROFILE
            TAU(L, I)=TAU(L, I)*(1.0D+00
     &         -OMEGA(L, I)*FORWARD_SCATTER(L, I))
            OMEGA(L, I)=OMEGA(L, I)*(1.0D+00-FORWARD_SCATTER(L, I))
     &         /(1.0D+00-OMEGA(L, I)*FORWARD_SCATTER(L, I))
         ENDDO
      ENDDO
!
!
      RETURN
      END
