!+ Program to calculate volume fractions for SRA profiles.
!
! Method:
!	The volume fractions are calculated from extinctions
!	at 550 nm.
!
! 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 CALC_VOLUME_FRACTION(N_COMPONENT
     &   , FRACTION_COMPONENT, EXT_550NM_COMPONENT, EXT_550NM_AEROSOL
     &   , VOLUME_FRACTION
     &   )
!
!
      IMPLICIT NONE
!
!
!     DUMMY ARGUMENTS
      INTEGER	!, INTENT(IN)
     &     N_COMPONENT
!             NUMBER OF COMPONENTS
      REAL*8	!, INTENT(IN)
     &     EXT_550NM_COMPONENT(N_COMPONENT)
!             COMPONENT EXTINC. AT 550 NM
     &   , EXT_550NM_AEROSOL
!             AEROSOL EXTINCTION AT 550 NM
     &   , FRACTION_COMPONENT(N_COMPONENT)
!             FRACTION OF EACH CMPT.
      REAL*8	!, INTENT(OUT)
     &     VOLUME_FRACTION(N_COMPONENT)
!             VOLUME FRACTIONS OF COMPONENTS

!
!     LOCAL VARIABLES
      INTEGER
     &     I
!             LOOP VARIABLE
      REAL*8
     &     INV_SUM_EXT
!             1/SUM OF WEIGHT EXTINCTIONS
     &   , SUM_VOLUME_FRACTION
!             SUM OF VOLUME FRACTIONS
!
!
      INV_SUM_EXT=0.0D+00
      DO I=1, N_COMPONENT
         INV_SUM_EXT=INV_SUM_EXT
     &      +EXT_550NM_COMPONENT(I)*FRACTION_COMPONENT(I)
         print*,I,FRACTION_COMPONENT,EXT_550NM_COMPONENT(I)
      ENDDO
      SUM_VOLUME_FRACTION=EXT_550NM_AEROSOL/INV_SUM_EXT
      PRINT*,SUM_VOLUME_FRACTION
      DO I=1, N_COMPONENT
         VOLUME_FRACTION(I)=FRACTION_COMPONENT(I)*SUM_VOLUME_FRACTION
         PRINT*,I,VOLUME_FRACTION(I)
      ENDDO
!
!
      RETURN
      END
