SUBROUTINE LAITLITLAD(KPROMA,KPROMB,KSTART,KPROF,KFLEV,&
 & KFLDN,KFLDX,KFLD,KSEP,KMAP,PSIGN,LDVECADIN,&
 & PDLAT,PDLO,KL0,PDVER,PDLAT5,PDLO5,PDVER5,&
 & KINC,PZINC,KDIM,PXSL,PXSL5,PXF)  

!**** *LAITLITLAD - semi-LAgrangian scheme: (adjoint version)
!                 Trilinear interpolations for one variable.

!     Purpose.
!     --------
!       Performs trilinear interpolations for one variable.

!**   Interface.
!     ----------
!        *CALL* *LAITLITLAD(KPROMA,KPROMB,KSTART,KPROF,KFLEV
!                      ,KFLDN,KFLDX,KFLD,KSEP,KMAP,PSIGN,LDVECADIN
!                      ,PDLAT,PDLO,KL0,PDVER,PDLAT5,PDLO5,PDVER5
!                      ,KINC,PZINC,KDIM,PXSL,PXSL5,PXF)

!        Explicit arguments :
!        --------------------

!        INPUT:
!          KPROMA  - horizontal dimension for grid-point quantities.
!          KPROMB  - horizontal dimension for interpolation point
!                    quantities.
!          KSTART  - first element of arrays where
!                    computations are performed.
!          KPROF   - depth of work.
!          KFLEV   - vertical dimension.
!          KFLDN   - number of the first field.
!          KFLDX   - number of the last field.
!          KFLD    - field offset in semi-lagrangian buffer
!          KSEP    - vertical separation for updates.
!          KMAP    - mapping array for bit reproducibility
!          PSIGN   - sign (+ or -) to be applied to point (symmetric/
!                    antisymmetric properties at polar latitudes)
!          LDVECADIN - switch for scalar adjoint interpolation
!          KL0     - indices of the four western points
!                    of the 16 points interpolation grid.
!          KDIM    - first dimension of KINC and PZINC
!          PXF     - interpolated variable.
! ------------------------trajectory variables --------------------------
!          PDLAT5  - weight (distance) for horizontal linear interpolation
!                    on a same latitude.
!          PDLO5   - weights (distances) for horizontal linear interpolation
!                    on a same longitude.
!          PDVER5  - weights (distances) for vertical linear interpolation
!                    on a same vertical.
!          PXSL5   - semi-lagrangian variable.
! -----------------------------------------------------------------------

!        OUTPUT:
!          KINC    - addresses for increments.
!          PZINC   - increments (saved for later).

!        INPUT/OUTPUT:
!          PDLAT   - weight (distance) for horizontal linear interpolation
!                    on a same latitude.
!          PDLO    - weights (distances) for horizontal linear interpolation
!                    on a same longitude.
!          PDVER   - weights (distances) for vertical linear interpolation
!                    on a same vertical.
!          PXSL    - semi-lagrangian variable.

!        Implicit arguments :
!        --------------------

!     Method.
!     -------
!        See documentation

!     Externals.
!     ----------

!        No external.
!        Called by LARCINAD.

!     Reference.
!     ----------

!     Author.
!     -------
!        C. Temperton (ECMWF)                   

!     Modifications.
!     --------------
!      Original : 99/09/22
!      Modified 00-02-04 by C. Temperton: KINC array transposed.
!      Modified 00-02-09 by C. Temperton: KSEP introduced.     
!      Modified 00-02-17 by C. Temperton: more optimization....
!      Modified 00-07-11 by G. Mozdzynski: bit reproducibility support
!      Modified 01-02-27 by C. Temperton: LVECADIN option.
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
!      Modified 05-02-18 by C. Temperton: Removed redundant computation
!                         and output of interpolated trajectory variable.
!     ------------------------------------------------------------------

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

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

IMPLICIT NONE

INTEGER(KIND=JPIM),INTENT(IN)    :: KPROMA 
INTEGER(KIND=JPIM),INTENT(IN)    :: KPROMB 
INTEGER(KIND=JPIM),INTENT(IN)    :: KFLEV 
INTEGER(KIND=JPIM),INTENT(IN)    :: KFLDN 
INTEGER(KIND=JPIM),INTENT(IN)    :: KFLDX 
INTEGER(KIND=JPIM),INTENT(IN)    :: KDIM 
INTEGER(KIND=JPIM),INTENT(IN)    :: KSTART 
INTEGER(KIND=JPIM),INTENT(IN)    :: KPROF 
INTEGER(KIND=JPIM),INTENT(IN)    :: KFLD 
INTEGER(KIND=JPIM),INTENT(IN)    :: KSEP 
INTEGER(KIND=JPIM),INTENT(IN)    :: KMAP(KPROMB,8,KFLEV) 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PSIGN(KPROMB,8,KFLEV) 
LOGICAL           ,INTENT(IN)    :: LDVECADIN 
REAL(KIND=JPRB)   ,INTENT(INOUT) :: PDLAT(KPROMB,KFLEV) 
REAL(KIND=JPRB)   ,INTENT(INOUT) :: PDLO(KPROMB,KFLEV,1:2) 
INTEGER(KIND=JPIM),INTENT(IN)    :: KL0(KPROMB,KFLEV,1:2) 
REAL(KIND=JPRB)   ,INTENT(INOUT) :: PDVER(KPROMB,KFLEV) 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PDLAT5(KPROMB,KFLEV) 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PDLO5(KPROMB,KFLEV,1:2) 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PDVER5(KPROMB,KFLEV) 
INTEGER(KIND=JPIM),INTENT(OUT)   :: KINC(KDIM*KFLEV+1,KPROMB) 
REAL(KIND=JPRB)   ,INTENT(OUT)   :: PZINC(KDIM*KFLEV+1,KPROMB) 
REAL(KIND=JPRB)   ,INTENT(INOUT) :: PXSL(KPROMA*(KFLDX-KFLDN+1)) 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PXSL5(KPROMA*(KFLDX-KFLDN+1)) 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PXF(KPROMB,KFLEV) 

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

INTEGER(KIND=JPIM) :: IB, ILEV, IV1L1, IV1L2, IV2L1, IV2L2, JJLEV, JLEV, JROF, IBASE

REAL(KIND=JPRB) :: ZDLAT, ZDLO1, ZDLO2, ZDVER, ZINF, ZINFLO1,&
 & ZINFLO2, ZSUP, ZSUPLO1, ZSUPLO2,&
 & ZDLAT5, ZDLO15, ZDLO25, ZDVER5, ZINF5, ZINFLO15,&
 & ZINFLO25, ZSUP5, ZSUPLO15, ZSUPLO25  

REAL(KIND=JPRB) :: ZSUM(KPROMB,8,KFLEV)
REAL(KIND=JPRB) :: ZHOOK_HANDLE

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

IF (LHOOK) CALL DR_HOOK('LAITLITLAD',0,ZHOOK_HANDLE)

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

!*       1.    INTERPOLATIONS.
!              ---------------

IBASE=(KFLD-1)*KPROMA

IV1L1=1+KPROMA
IV1L2=2+KPROMA
IV2L1=IV1L1+KPROMA
IV2L2=IV1L2+KPROMA

ILEV=1

IF( LSLADREP )THEN
 
  IF (.NOT.LDVECADIN) THEN

    DO JLEV=1,KFLEV

      DO JROF=KSTART,KPROF

!     Computation of coordinates and distances (trajectory).

        ZDLAT5=PDLAT5(JROF,JLEV)
        ZDLO15=PDLO5(JROF,JLEV,1)
        ZDLO25=PDLO5(JROF,JLEV,2)
        ZDVER5=PDVER5(JROF,JLEV)

!     Interpolation (TRAJECTORY).

        ZSUPLO15=PXSL5(KL0(JROF,JLEV,1)+IV1L1) + ZDLO15*&
         & ( PXSL5(KL0(JROF,JLEV,1)+IV1L2)-PXSL5(KL0(JROF,JLEV,1)+IV1L1) )  
        ZSUPLO25=PXSL5(KL0(JROF,JLEV,2)+IV1L1) + ZDLO25*&
         & ( PXSL5(KL0(JROF,JLEV,2)+IV1L2)-PXSL5(KL0(JROF,JLEV,2)+IV1L1) )  
        ZSUP5  =  ZSUPLO15+ ZDLAT5*(ZSUPLO25-ZSUPLO15)
  
        ZINFLO15=PXSL5(KL0(JROF,JLEV,1)+IV2L1) + ZDLO15*&
         & ( PXSL5(KL0(JROF,JLEV,1)+IV2L2)-PXSL5(KL0(JROF,JLEV,1)+IV2L1) )  
        ZINFLO25=PXSL5(KL0(JROF,JLEV,2)+IV2L1) + ZDLO25*&
         & ( PXSL5(KL0(JROF,JLEV,2)+IV2L2)-PXSL5(KL0(JROF,JLEV,2)+IV2L1) )  
        ZINF5  =  ZINFLO15+ ZDLAT5*(ZINFLO25-ZINFLO15)

!     Interpolation (adjoint).

        ZSUP=(1.0_JPRB-ZDVER5)* PXF(JROF,JLEV)
        ZINF=ZDVER5*PXF(JROF,JLEV)
        ZDVER=(ZINF5-ZSUP5)*PXF(JROF,JLEV)

        ZINFLO1=(1.0_JPRB-ZDLAT5)*ZINF
        ZINFLO2=ZDLAT5*ZINF
        ZDLAT=(ZINFLO25-ZINFLO15)*ZINF

        ZSUM(JROF,3,JLEV)=PSIGN(JROF,3,JLEV)*((1.0_JPRB-ZDLO15)*ZINFLO1)
        ZSUM(JROF,4,JLEV)=PSIGN(JROF,4,JLEV)*(ZDLO15*ZINFLO1)
        ZDLO1=(PXSL5(KL0(JROF,JLEV,1)+IV2L2)-PXSL5(KL0(JROF,JLEV,1)+IV2L1))&
         & *ZINFLO1  
        ZSUM(JROF,7,JLEV)=PSIGN(JROF,7,JLEV)*((1.0_JPRB-ZDLO25)*ZINFLO2)
        ZSUM(JROF,8,JLEV)=PSIGN(JROF,8,JLEV)*(ZDLO25*ZINFLO2)
        ZDLO2=(PXSL5(KL0(JROF,JLEV,2)+IV2L2)-PXSL5(KL0(JROF,JLEV,2)+IV2L1))&
         & *ZINFLO2  
  
        ZSUPLO1=(1.0_JPRB-ZDLAT5)*ZSUP
        ZSUPLO2=ZDLAT5*ZSUP
        ZDLAT=ZDLAT+(ZSUPLO25-ZSUPLO15)*ZSUP
  
        ZSUM(JROF,1,JLEV)=PSIGN(JROF,1,JLEV)*((1.0_JPRB-ZDLO15)*ZSUPLO1)
        ZSUM(JROF,2,JLEV)=PSIGN(JROF,2,JLEV)*(ZDLO15*ZSUPLO1)
        ZDLO1=ZDLO1 + &
         & (PXSL5(KL0(JROF,JLEV,1)+IV1L2)-PXSL5(KL0(JROF,JLEV,1)+IV1L1))&
         & *ZSUPLO1  
        ZSUM(JROF,5,JLEV)=PSIGN(JROF,5,JLEV)*((1.0_JPRB-ZDLO25)*ZSUPLO2)
        ZSUM(JROF,6,JLEV)=PSIGN(JROF,6,JLEV)*(ZDLO25*ZSUPLO2)
        ZDLO2=ZDLO2 + &
         & (PXSL5(KL0(JROF,JLEV,2)+IV1L2)-PXSL5(KL0(JROF,JLEV,2)+IV1L1))&
         & *ZSUPLO2  
  
        PDLAT(JROF,JLEV)=PDLAT(JROF,JLEV)+ZDLAT
        PDLO(JROF,JLEV,1)=PDLO(JROF,JLEV,1)+ZDLO1
        PDLO(JROF,JLEV,2)=PDLO(JROF,JLEV,2)+ZDLO2
        PDVER(JROF,JLEV)=PDVER(JROF,JLEV)+ZDVER
  
      ENDDO
    ENDDO

    DO JROF=KSTART,KPROF
      DO JLEV=1,KFLEV
        PXSL(KMAP(JROF,1,JLEV))=PXSL(KMAP(JROF,1,JLEV))+ZSUM(JROF,1,JLEV)
        PXSL(KMAP(JROF,2,JLEV))=PXSL(KMAP(JROF,2,JLEV))+ZSUM(JROF,2,JLEV)
        PXSL(KMAP(JROF,3,JLEV))=PXSL(KMAP(JROF,3,JLEV))+ZSUM(JROF,3,JLEV)
        PXSL(KMAP(JROF,4,JLEV))=PXSL(KMAP(JROF,4,JLEV))+ZSUM(JROF,4,JLEV)
        PXSL(KMAP(JROF,5,JLEV))=PXSL(KMAP(JROF,5,JLEV))+ZSUM(JROF,5,JLEV)
        PXSL(KMAP(JROF,6,JLEV))=PXSL(KMAP(JROF,6,JLEV))+ZSUM(JROF,6,JLEV)
        PXSL(KMAP(JROF,7,JLEV))=PXSL(KMAP(JROF,7,JLEV))+ZSUM(JROF,7,JLEV)
        PXSL(KMAP(JROF,8,JLEV))=PXSL(KMAP(JROF,8,JLEV))+ZSUM(JROF,8,JLEV)
      ENDDO
    ENDDO

  ELSE

    DO JJLEV=1,KSEP 
      DO JLEV=JJLEV,KFLEV,KSEP

        IB=(ILEV-1)*KDIM

!CDIR NODEP
        DO JROF=KSTART,KPROF

!     Computation of coordinates and distances (trajectory).

          ZDLAT5=PDLAT5(JROF,JLEV)
          ZDLO15=PDLO5(JROF,JLEV,1)
          ZDLO25=PDLO5(JROF,JLEV,2)
          ZDVER5=PDVER5(JROF,JLEV)

!     Interpolation (TRAJECTORY).

          ZSUPLO15=PXSL5(KL0(JROF,JLEV,1)+IV1L1) + ZDLO15*&
           & ( PXSL5(KL0(JROF,JLEV,1)+IV1L2)-PXSL5(KL0(JROF,JLEV,1)+IV1L1) )  
          ZSUPLO25=PXSL5(KL0(JROF,JLEV,2)+IV1L1) + ZDLO25*&
           & ( PXSL5(KL0(JROF,JLEV,2)+IV1L2)-PXSL5(KL0(JROF,JLEV,2)+IV1L1) )  
          ZSUP5  =  ZSUPLO15+ ZDLAT5*(ZSUPLO25-ZSUPLO15)
  
          ZINFLO15=PXSL5(KL0(JROF,JLEV,1)+IV2L1) + ZDLO15*&
           & ( PXSL5(KL0(JROF,JLEV,1)+IV2L2)-PXSL5(KL0(JROF,JLEV,1)+IV2L1) )  
          ZINFLO25=PXSL5(KL0(JROF,JLEV,2)+IV2L1) + ZDLO25*&
           & ( PXSL5(KL0(JROF,JLEV,2)+IV2L2)-PXSL5(KL0(JROF,JLEV,2)+IV2L1) )  
          ZINF5  =  ZINFLO15+ ZDLAT5*(ZINFLO25-ZINFLO15)

!     Interpolation (adjoint).

          KINC(IB+1,JROF)=IBASE+KMAP(JROF,1,JLEV)
          KINC(IB+2,JROF)=IBASE+KMAP(JROF,2,JLEV)
          KINC(IB+3,JROF)=IBASE+KMAP(JROF,3,JLEV)
          KINC(IB+4,JROF)=IBASE+KMAP(JROF,4,JLEV)
          KINC(IB+5,JROF)=IBASE+KMAP(JROF,5,JLEV)
          KINC(IB+6,JROF)=IBASE+KMAP(JROF,6,JLEV)
          KINC(IB+7,JROF)=IBASE+KMAP(JROF,7,JLEV)
          KINC(IB+8,JROF)=IBASE+KMAP(JROF,8,JLEV)

          ZSUP=(1.0_JPRB-ZDVER5)* PXF(JROF,JLEV)
          ZINF=ZDVER5*PXF(JROF,JLEV)
          ZDVER=(ZINF5-ZSUP5)*PXF(JROF,JLEV)

          ZINFLO1=(1.0_JPRB-ZDLAT5)*ZINF
          ZINFLO2=ZDLAT5*ZINF
          ZDLAT=(ZINFLO25-ZINFLO15)*ZINF

          PZINC(IB+3,JROF)=PSIGN(JROF,3,JLEV)*((1.0_JPRB-ZDLO15)*ZINFLO1)
          PZINC(IB+4,JROF)=PSIGN(JROF,4,JLEV)*(ZDLO15*ZINFLO1)
          ZDLO1=(PXSL5(KL0(JROF,JLEV,1)+IV2L2)-PXSL5(KL0(JROF,JLEV,1)+IV2L1))&
           & *ZINFLO1  
          PZINC(IB+7,JROF)=PSIGN(JROF,7,JLEV)*((1.0_JPRB-ZDLO25)*ZINFLO2)
          PZINC(IB+8,JROF)=PSIGN(JROF,8,JLEV)*(ZDLO25*ZINFLO2)
          ZDLO2=(PXSL5(KL0(JROF,JLEV,2)+IV2L2)-PXSL5(KL0(JROF,JLEV,2)+IV2L1))&
           & *ZINFLO2  
  
          ZSUPLO1=(1.0_JPRB-ZDLAT5)*ZSUP
          ZSUPLO2=ZDLAT5*ZSUP
          ZDLAT=ZDLAT+(ZSUPLO25-ZSUPLO15)*ZSUP
  
          PZINC(IB+1,JROF)=PSIGN(JROF,1,JLEV)*((1.0_JPRB-ZDLO15)*ZSUPLO1)
          PZINC(IB+2,JROF)=PSIGN(JROF,2,JLEV)*(ZDLO15*ZSUPLO1)
          ZDLO1=ZDLO1 + &
           & (PXSL5(KL0(JROF,JLEV,1)+IV1L2)-PXSL5(KL0(JROF,JLEV,1)+IV1L1))&
           & *ZSUPLO1  
          PZINC(IB+5,JROF)=PSIGN(JROF,5,JLEV)*((1.0_JPRB-ZDLO25)*ZSUPLO2)
          PZINC(IB+6,JROF)=PSIGN(JROF,6,JLEV)*(ZDLO25*ZSUPLO2)
          ZDLO2=ZDLO2 + &
           & (PXSL5(KL0(JROF,JLEV,2)+IV1L2)-PXSL5(KL0(JROF,JLEV,2)+IV1L1))&
           & *ZSUPLO2  
  
          PDLAT(JROF,JLEV)=PDLAT(JROF,JLEV)+ZDLAT
          PDLO(JROF,JLEV,1)=PDLO(JROF,JLEV,1)+ZDLO1
          PDLO(JROF,JLEV,2)=PDLO(JROF,JLEV,2)+ZDLO2
          PDVER(JROF,JLEV)=PDVER(JROF,JLEV)+ZDVER
  
        ENDDO
        ILEV=ILEV+1
      ENDDO
    ENDDO

  ENDIF
  
ELSE         !(non-reproducible)

  IF (.NOT.LDVECADIN) THEN

    DO JLEV=1,KFLEV

      DO JROF=KSTART,KPROF
  
!     Computation of coordinates and distances (trajectory).

        ZDLAT5=PDLAT5(JROF,JLEV)
        ZDLO15=PDLO5(JROF,JLEV,1)
        ZDLO25=PDLO5(JROF,JLEV,2)
        ZDVER5=PDVER5(JROF,JLEV)
  
!     Interpolation (TRAJECTORY).

        ZSUPLO15=PXSL5(KL0(JROF,JLEV,1)+IV1L1) + ZDLO15*&
         & ( PXSL5(KL0(JROF,JLEV,1)+IV1L2)-PXSL5(KL0(JROF,JLEV,1)+IV1L1) )  
        ZSUPLO25=PXSL5(KL0(JROF,JLEV,2)+IV1L1) + ZDLO25*&
         & ( PXSL5(KL0(JROF,JLEV,2)+IV1L2)-PXSL5(KL0(JROF,JLEV,2)+IV1L1) )  
        ZSUP5  =  ZSUPLO15+ ZDLAT5*(ZSUPLO25-ZSUPLO15)

        ZINFLO15=PXSL5(KL0(JROF,JLEV,1)+IV2L1) + ZDLO15*&
         & ( PXSL5(KL0(JROF,JLEV,1)+IV2L2)-PXSL5(KL0(JROF,JLEV,1)+IV2L1) )  
        ZINFLO25=PXSL5(KL0(JROF,JLEV,2)+IV2L1) + ZDLO25*&
         & ( PXSL5(KL0(JROF,JLEV,2)+IV2L2)-PXSL5(KL0(JROF,JLEV,2)+IV2L1) )  
        ZINF5  =  ZINFLO15+ ZDLAT5*(ZINFLO25-ZINFLO15)
  
!     Interpolation (adjoint).
  
        ZSUP=(1.0_JPRB-ZDVER5)* PXF(JROF,JLEV)
        ZINF=ZDVER5*PXF(JROF,JLEV)
        ZDVER=(ZINF5-ZSUP5)*PXF(JROF,JLEV)
  
        ZINFLO1=(1.0_JPRB-ZDLAT5)*ZINF
        ZINFLO2=ZDLAT5*ZINF
        ZDLAT=(ZINFLO25-ZINFLO15)*ZINF
  
        PXSL(KL0(JROF,JLEV,1)+IV2L1)=PXSL(KL0(JROF,JLEV,1)+IV2L1)&
         & +(1.0_JPRB-ZDLO15)*ZINFLO1  
        PXSL(KL0(JROF,JLEV,1)+IV2L2)=PXSL(KL0(JROF,JLEV,1)+IV2L2)&
         & +ZDLO15*ZINFLO1  
        ZDLO1=(PXSL5(KL0(JROF,JLEV,1)+IV2L2)-PXSL5(KL0(JROF,JLEV,1)+IV2L1))&
         & *ZINFLO1  
        PXSL(KL0(JROF,JLEV,2)+IV2L1)=PXSL(KL0(JROF,JLEV,2)+IV2L1)&
         & +(1.0_JPRB-ZDLO25)*ZINFLO2  
        PXSL(KL0(JROF,JLEV,2)+IV2L2)=PXSL(KL0(JROF,JLEV,2)+IV2L2)&
         & +ZDLO25*ZINFLO2  
        ZDLO2=(PXSL5(KL0(JROF,JLEV,2)+IV2L2)-PXSL5(KL0(JROF,JLEV,2)+IV2L1))&
         & *ZINFLO2  
  
        ZSUPLO1=(1.0_JPRB-ZDLAT5)*ZSUP
        ZSUPLO2=ZDLAT5*ZSUP
        ZDLAT=ZDLAT+(ZSUPLO25-ZSUPLO15)*ZSUP
  
        PXSL(KL0(JROF,JLEV,1)+IV1L1)=PXSL(KL0(JROF,JLEV,1)+IV1L1)&
         & +(1.0_JPRB-ZDLO15)*ZSUPLO1  
        PXSL(KL0(JROF,JLEV,1)+IV1L2)=PXSL(KL0(JROF,JLEV,1)+IV1L2)&
         & +ZDLO15*ZSUPLO1  
        ZDLO1=ZDLO1 + &
         & (PXSL5(KL0(JROF,JLEV,1)+IV1L2)-PXSL5(KL0(JROF,JLEV,1)+IV1L1))&
         & *ZSUPLO1  
        PXSL(KL0(JROF,JLEV,2)+IV1L1)=PXSL(KL0(JROF,JLEV,2)+IV1L1)&
         & +(1.0_JPRB-ZDLO25)*ZSUPLO2  
        PXSL(KL0(JROF,JLEV,2)+IV1L2)=PXSL(KL0(JROF,JLEV,2)+IV1L2)&
         & +ZDLO25*ZSUPLO2  
        ZDLO2=ZDLO2 + &
         & (PXSL5(KL0(JROF,JLEV,2)+IV1L2)-PXSL5(KL0(JROF,JLEV,2)+IV1L1))&
         & *ZSUPLO2  
  
        PDLAT(JROF,JLEV)=PDLAT(JROF,JLEV)+ZDLAT
        PDLO(JROF,JLEV,1)=PDLO(JROF,JLEV,1)+ZDLO1
        PDLO(JROF,JLEV,2)=PDLO(JROF,JLEV,2)+ZDLO2
        PDVER(JROF,JLEV)=PDVER(JROF,JLEV)+ZDVER
  
      ENDDO
    ENDDO

  ELSE

    DO JJLEV=1,KSEP 
      DO JLEV=JJLEV,KFLEV,KSEP

        IB=(ILEV-1)*KDIM

!CDIR NODEP
        DO JROF=KSTART,KPROF
  
!     Computation of coordinates and distances (trajectory).

          ZDLAT5=PDLAT5(JROF,JLEV)
          ZDLO15=PDLO5(JROF,JLEV,1)
          ZDLO25=PDLO5(JROF,JLEV,2)
          ZDVER5=PDVER5(JROF,JLEV)
        
!     Interpolation (TRAJECTORY).

          ZSUPLO15=PXSL5(KL0(JROF,JLEV,1)+IV1L1) + ZDLO15*&
           & ( PXSL5(KL0(JROF,JLEV,1)+IV1L2)-PXSL5(KL0(JROF,JLEV,1)+IV1L1) )  
          ZSUPLO25=PXSL5(KL0(JROF,JLEV,2)+IV1L1) + ZDLO25*&
           & ( PXSL5(KL0(JROF,JLEV,2)+IV1L2)-PXSL5(KL0(JROF,JLEV,2)+IV1L1) )  
          ZSUP5  =  ZSUPLO15+ ZDLAT5*(ZSUPLO25-ZSUPLO15)

          ZINFLO15=PXSL5(KL0(JROF,JLEV,1)+IV2L1) + ZDLO15*&
           & ( PXSL5(KL0(JROF,JLEV,1)+IV2L2)-PXSL5(KL0(JROF,JLEV,1)+IV2L1) )  
          ZINFLO25=PXSL5(KL0(JROF,JLEV,2)+IV2L1) + ZDLO25*&
           & ( PXSL5(KL0(JROF,JLEV,2)+IV2L2)-PXSL5(KL0(JROF,JLEV,2)+IV2L1) )  
          ZINF5  =  ZINFLO15+ ZDLAT5*(ZINFLO25-ZINFLO15)
          
!     Interpolation (adjoint).

          KINC(IB+1,JROF)=IBASE+KL0(JROF,JLEV,1)+IV1L1
          KINC(IB+2,JROF)=IBASE+KL0(JROF,JLEV,1)+IV1L2
          KINC(IB+3,JROF)=IBASE+KL0(JROF,JLEV,1)+IV2L1
          KINC(IB+4,JROF)=IBASE+KL0(JROF,JLEV,1)+IV2L2
          KINC(IB+5,JROF)=IBASE+KL0(JROF,JLEV,2)+IV1L1
          KINC(IB+6,JROF)=IBASE+KL0(JROF,JLEV,2)+IV1L2
          KINC(IB+7,JROF)=IBASE+KL0(JROF,JLEV,2)+IV2L1
          KINC(IB+8,JROF)=IBASE+KL0(JROF,JLEV,2)+IV2L2
  
          ZSUP=(1.0_JPRB-ZDVER5)* PXF(JROF,JLEV)
          ZINF=ZDVER5*PXF(JROF,JLEV)
          ZDVER=(ZINF5-ZSUP5)*PXF(JROF,JLEV)
  
          ZINFLO1=(1.0_JPRB-ZDLAT5)*ZINF
          ZINFLO2=ZDLAT5*ZINF
          ZDLAT=(ZINFLO25-ZINFLO15)*ZINF
  
          PZINC(IB+3,JROF)=(1.0_JPRB-ZDLO15)*ZINFLO1
          PZINC(IB+4,JROF)=ZDLO15*ZINFLO1
          ZDLO1=(PXSL5(KL0(JROF,JLEV,1)+IV2L2)-PXSL5(KL0(JROF,JLEV,1)+IV2L1))&
           & *ZINFLO1  
          PZINC(IB+7,JROF)=(1.0_JPRB-ZDLO25)*ZINFLO2
          PZINC(IB+8,JROF)=ZDLO25*ZINFLO2
          ZDLO2=(PXSL5(KL0(JROF,JLEV,2)+IV2L2)-PXSL5(KL0(JROF,JLEV,2)+IV2L1))&
           & *ZINFLO2  
  
          ZSUPLO1=(1.0_JPRB-ZDLAT5)*ZSUP
          ZSUPLO2=ZDLAT5*ZSUP
          ZDLAT=ZDLAT+(ZSUPLO25-ZSUPLO15)*ZSUP
  
          PZINC(IB+1,JROF)=(1.0_JPRB-ZDLO15)*ZSUPLO1
          PZINC(IB+2,JROF)=ZDLO15*ZSUPLO1
          ZDLO1=ZDLO1 + &
           & (PXSL5(KL0(JROF,JLEV,1)+IV1L2)-PXSL5(KL0(JROF,JLEV,1)+IV1L1))&
           & *ZSUPLO1  
          PZINC(IB+5,JROF)=(1.0_JPRB-ZDLO25)*ZSUPLO2
          PZINC(IB+6,JROF)=ZDLO25*ZSUPLO2
          ZDLO2=ZDLO2 + &
           & (PXSL5(KL0(JROF,JLEV,2)+IV1L2)-PXSL5(KL0(JROF,JLEV,2)+IV1L1))&
           & *ZSUPLO2  
  
          PDLAT(JROF,JLEV)=PDLAT(JROF,JLEV)+ZDLAT
          PDLO(JROF,JLEV,1)=PDLO(JROF,JLEV,1)+ZDLO1
          PDLO(JROF,JLEV,2)=PDLO(JROF,JLEV,2)+ZDLO2
          PDVER(JROF,JLEV)=PDVER(JROF,JLEV)+ZDVER
  
        ENDDO
        ILEV=ILEV+1
      ENDDO
    ENDDO

  ENDIF

ENDIF

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

IF (LHOOK) CALL DR_HOOK('LAITLITLAD',1,ZHOOK_HANDLE)
END SUBROUTINE LAITLITLAD
