SUBROUTINE M7_EMI_SS_LSCE &
  &( KIDIA, KFDIA, KLON , &
  &  PCI  , PLSM , PWIND, &
  &  PFLXM7 & 
  &)

!*** * M7_EMI_SS_LSCE* - SOURCE TERMS FOR SEA SALT AEROSOLS A LA MONAHAN

!**   INTERFACE.
!     ----------
!          *M7_EMI_SS_LSCE* IS CALLED FROM *  *.

!     AUTHOR.
!     -------
!       M. Schulz  , LSCE 				   20020802
!       P. Stier   , MPI (Adaption to ECHAM/HAM structure) 20040511

!     MODIFICATIONS.
!     --------------
!        FROM original M7 *seasalt_emissions_lsce*
!        JJMorcrette 20100106 Adaptation to ECMWF IFS

!-----------------------------------------------------------------------

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

USE YO_AERO_M7  ,ONLY : nm7aer, rmass1, rmass2, rnumb1, rnumb2 &
  &                   , rdmas1, rdmas2, rdnum1, rdnum2
USE YO_AERO_TRAC,ONLY : idt_mssas, idt_msscs, idt_nas, idt_ncs

IMPLICIT NONE

!-----------------------------------------------------------------------

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

INTEGER(KIND=JPIM),INTENT(IN)    :: KLON 
INTEGER(KIND=JPIM),INTENT(IN)    :: KIDIA 
INTEGER(KIND=JPIM),INTENT(IN)    :: KFDIA 

REAL(KIND=JPRB)   ,INTENT(IN)    :: PCI(KLON), PLSM(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)    :: PWIND(KLON) 

REAL(KIND=JPRB)   ,INTENT(INOUT) :: PFLXM7(KLON,nm7aer)


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

INTEGER(KIND=JPIM) :: JL, INDX
INTEGER(KIND=JPIM) :: IWCL(KLON)

REAL(KIND=JPRB) :: ZDSP(KLON), ZOPENS

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

 
DO JL=KIDIA,KFDIA
  IWCL(JL)=INT(PWIND(JL))
  INDX = MAX(0,MIN(IWCL(JL),40))
  ZDSP(JL)=PWIND(JL)-REAL(INDX,JPRB) 

!*       1.    EMITTED MASS-FLUX;   2.	  EMITTED NUMBER-FLUX
!              ----------------------------------------------
  
  IF (PLSM(JL) == 1._JPRB) THEN
    ZOPENS=1._JPRB-PCI(JL)

! accumulation soluble
    PFLXM7(JL,idt_mssas)=(rmass1(INDX) + rdmas1(INDX)*ZDSP(JL))*ZOPENS
    PFLXM7(JL,idt_nas)  =(rnumb1(INDX) + rdnum1(INDX)*ZDSP(JL))*ZOPENS 
! coarse soluble
    PFLXM7(JL,idt_msscs)=(rmass2(INDX) + rdmas2(INDX)*ZDSP(JL))*ZOPENS
    PFLXM7(JL,idt_ncs  )=(rnumb2(INDX) + rdnum2(INDX)*ZDSP(JL))*ZOPENS 
  ELSE
    PFLXM7(JL,idt_mssas)=0._JPRB
    PFLXM7(JL,idt_nas)  =0._JPRB
    PFLXM7(JL,idt_msscs)=0._JPRB
    PFLXM7(JL,idt_ncs)  =0._JPRB
  ENDIF

ENDDO

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