C (c) CROWN COPYRIGHT 1995, METEOROLOGICAL OFFICE, All Rights Reserved.            RAD_ALL.14442 
C                                                                                  RAD_ALL.14443 
C Use, duplication or disclosure of this code is subject to the                    RAD_ALL.14444 
C restrictions as set forth in the contract.                                       RAD_ALL.14445 
C                                                                                  RAD_ALL.14446 
C                Meteorological Office                                             RAD_ALL.14447 
C                London Road                                                       RAD_ALL.14448 
C                BRACKNELL                                                         RAD_ALL.14449 
C                Berkshire UK                                                      RAD_ALL.14450 
C                RG12 2SZ                                                          RAD_ALL.14451 
C                                                                                  RAD_ALL.14452 
C If no contract has been raised with this copy of the code, the use,              RAD_ALL.14453 
C duplication or disclosure of it is strictly prohibited.  Permission              RAD_ALL.14454 
C to do so must first be obtained in writing from the Head of Numerical            RAD_ALL.14455 
C Modelling at the above address.                                                  RAD_ALL.14456 
C ******************************COPYRIGHT******************************            RAD_ALL.14457 
C                                                                                  RAD_ALL.14458 
!+ Subroutine to rescale optical depth and albedo.                                 RAD_ALL.14459 
!                                                                                  RAD_ALL.14460 
! Method:                                                                          RAD_ALL.14461 
!       The standard rescaling formulae are applied.                               RAD_ALL.14462 
!                                                                                  RAD_ALL.14463 
! Current Owner of Code: J. M. Edwards                                             RAD_ALL.14464 
!                                                                                  RAD_ALL.14465 
! History:                                                                         RAD_ALL.14466 
!       Version         Date                    Comment                            RAD_ALL.14467 
!       4.0             27-07-95                Original Code                      RAD_ALL.14468 
!                                               (J. M. Edwards)                    RAD_ALL.14469 
!                                                                                  RAD_ALL.14470 
! Description of Code:                                                             RAD_ALL.14471 
!   FORTRAN 77  with extensions listed in documentation.                           RAD_ALL.14472 
!                                                                                  RAD_ALL.14473 
!- ---------------------------------------------------------------------           RAD_ALL.14474 
      SUBROUTINE RESCALE_TAU_OMEGA(N_PROFILE                                       RAD_ALL.14475 
     &   , I_LAYER_FIRST, I_LAYER_LAST                                             RAD_ALL.14476 
     &   , TAU, OMEGA, FORWARD_SCATTER                                             RAD_ALL.14477 
     &   , NPD_PROFILE, NPD_LAYER                                                  RAD_ALL.14478 
     &   )                                                                         RAD_ALL.14479 
!                                                                                  RAD_ALL.14480 
!                                                                                  RAD_ALL.14481 
      IMPLICIT NONE                                                                RAD_ALL.14482 
!                                                                                  RAD_ALL.14483 
!                                                                                  RAD_ALL.14484 
!     SIZES OF DUMMY ARRAYS.                                                       RAD_ALL.14485 
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.14486 
     &     NPD_PROFILE                                                             RAD_ALL.14487 
!             MAXIMUM NUMBER OF PROFILES                                           RAD_ALL.14488 
     &   , NPD_LAYER                                                               RAD_ALL.14489 
!             MAXIMUM NUMBER OF LAYERS                                             RAD_ALL.14490 
!                                                                                  RAD_ALL.14491 
!     DUMMY ARGUMENTS.                                                             RAD_ALL.14492 
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.14493 
     &     N_PROFILE                                                               RAD_ALL.14494 
!             NUMBER OF PROFILES                                                   RAD_ALL.14495 
     &   , I_LAYER_FIRST                                                           RAD_ALL.14496 
!             FIRST LAYER TO RESCALE                                               RAD_ALL.14497 
     &   , I_LAYER_LAST                                                            RAD_ALL.14498 
!             FIRST LAYER TO RESCALE                                               RAD_ALL.14499 
      REAL      !, INTENT(IN)                                                      RAD_ALL.14500 
     &     FORWARD_SCATTER(NPD_PROFILE, NPD_LAYER)                                 RAD_ALL.14501 
!             FORWARD SCATTERING                                                   RAD_ALL.14502 
      REAL      !, INTENT(INOUT)                                                   RAD_ALL.14503 
     &     TAU(NPD_PROFILE, NPD_LAYER)                                             RAD_ALL.14504 
!             OPTICAL DEPTH                                                        RAD_ALL.14505 
     &   , OMEGA(NPD_PROFILE, NPD_LAYER)                                           RAD_ALL.14506 
!             ALBEDO OF SINGLE SCATTERING                                          RAD_ALL.14507 
!                                                                                  RAD_ALL.14508 
!     LOCAL VARIABLES.                                                             RAD_ALL.14509 
      INTEGER                                                                      RAD_ALL.14510 
     &     I                                                                       RAD_ALL.14511 
!             LOOP VARIABLE                                                        RAD_ALL.14512 
     &   , L                                                                       RAD_ALL.14513 
!             LOOP VARIABLE                                                        RAD_ALL.14514 
!                                                                                  RAD_ALL.14515 
!                                                                                  RAD_ALL.14516 
!                                                                                  RAD_ALL.14517 
      DO I=I_LAYER_FIRST, I_LAYER_LAST                                             RAD_ALL.14518 
         DO L=1, N_PROFILE                                                         RAD_ALL.14519 
            TAU(L, I)=TAU(L, I)*(1.0E+00                                           RAD_ALL.14520 
     &         -OMEGA(L, I)*FORWARD_SCATTER(L, I))                                 RAD_ALL.14521 
            OMEGA(L, I)=OMEGA(L, I)*(1.0E+00-FORWARD_SCATTER(L, I))                RAD_ALL.14522 
     &         /(1.0E+00-OMEGA(L, I)*FORWARD_SCATTER(L, I))                        RAD_ALL.14523 
         ENDDO                                                                     RAD_ALL.14524 
      ENDDO                                                                        RAD_ALL.14525 
!                                                                                  RAD_ALL.14526 
!                                                                                  RAD_ALL.14527 
      RETURN                                                                       RAD_ALL.14528 
      END
