SUBROUTINE AER_STRCLOG &
  &( KLAT   , KLEV   , &
  &  PH2SO4, PR2SO4, PDENSO4, PRSTDEV, PRMODRA, PT, PRNLOG )

!*** *AER_STRCLOG* - DERIVE TOTAL NUMBER OF AEROSOL PARTICLES

!     DERIVE NO (TOTAL NUMBER OF AEROSOL PARTICLES CONCENTRATION) 
!     FROM TOTAL H2SO4 AND RMOD/SIGMA OF AEROSOL LOG-NORMAL 
!                                       SIZE DISTRIBTUION
!     ASSUMING ALL THE H2SO4 IS CONDENSED
!    -----------------------------------------------

!     AUTHOR.
!     -------
!        FROM S.BEKKI's *calnlog*
!        JJMorcrette  ECMWF 20080423 rewritten for IFS

! INPUTS
! ------
!   PH2SO4 : VMR of total H2SO4
!   PR2SO4 : aerosol H2SO4 weight fraction (percent)
!   PDENSO4: aerosol volumic mass (gr/cm3 = aerosol mass/aerosol volume)
!!      for total mass, almost same result with ro=1.67 gr/cm3
!   PRSTDEV: standard deviation of aerosol distribution (no unit)
!   PRMODRA: mode radius (cm)
!   PT     : temperature (K)
!   KLAT   : number of latitude bands in the model domain
!   KLEV   : number of altitude bands in the model domain
!   for IFS: perhaps add another dimension for longitude

! OUTPUTS
! -------
!   PRNLOG: total number of aerosol particles (VMR)
!   PRNLOG is in the same units as H2SO4
!   if PH2SO4 is in number density (for example, molec/cm3), 
!      PRNLOG (number of particles/cm3), etc...

!------------------------------------------------------------------------------
 
USE PARKIND1  ,ONLY : JPRB , JPIM
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK

IMPLICIT NONE
   
!-----------------------------------------------------------------------

!*       0.1   ARGUMENTS
!              ---------

INTEGER(KIND=JPIM),INTENT(IN) :: KLAT,KLEV

REAL(KIND=JPRB),INTENT(IN) :: PH2SO4(KLAT,KLEV) , PR2SO4(KLAT,KLEV)
REAL(KIND=JPRB),INTENT(IN) :: PRSTDEV(KLAT,KLEV), PRMODRA(KLAT,KLEV)
REAL(KIND=JPRB),INTENT(IN) :: PDENSO4(KLAT,KLEV), PT(KLAT,KLEV)

REAL(KIND=JPRB),INTENT(OUT) :: PRNLOG (KLAT,KLEV)

!*       0.5   LOCAL VARIABLES
!              ---------------

INTEGER(KIND=JPIM) :: JI,JK
REAL(KIND=JPRB) :: ZRMH2S4, ZPI1, ZRMTOT

REAL(KIND=JPRB) :: ZHOOK_HANDLE
!-----------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('AER_STRCLOG',0,ZHOOK_HANDLE)

! masse of an H2SO4 molecule (g)
ZRMH2S4=98.082_JPRB*1.66E-24_JPRB

!     3/4*PI
ZPI1    =3._JPRB/(4._JPRB*4.0_JPRB*ATAN(1.0_JPRB))
     
!     Loop on model domain (2 dimension for UPMC model; 3 for IFS)
DO JI=1,KLAT
  DO JK=1,KLEV
 
!   ZRMTOT: Aerosol volume (cm3)
!       = aerosol volume density (cm3 of aerosol/cm3 of air) /
!   air number density (molec/cm3 of air)
    ZRMTOT=PH2SO4(JI,JK)*ZRMH2S4/(PDENSO4(JI,JK)*PR2SO4(JI,JK)*0.01_JPRB)

!   PRNLOG: total number of aerosol particles (VMR)
    PRNLOG(JI,JK) = &
      &   ZRMTOT*EXP(-4.5_JPRB* LOG(PRSTDEV(JI,JK))* LOG(PRSTDEV(JI,JK))) &
      & * ZPI1/( PRMODRA(JI,JK)*PRMODRA(JI,JK)*PRMODRA(JI,JK) )

  ENDDO
ENDDO

!-----------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('AER_STRCLOG',1,ZHOOK_HANDLE)
END SUBROUTINE AER_STRCLOG
