SUBROUTINE STORE_VDFOUT(KJ, KJREF,KSTART,KSTEP,&
           & KIDIA,KFDIA,KLON,KLEV,KLEVS,KTILES,KSTGLO,&
           & PWSA,PTSA, PAZ0M,PAZ0H, &
           & PVDIS,PVDISG, PDISSGW, PFTLHEV, PFTLHSB, PFWSB,PBIR,PVAR, &
           & PUCFL,PVCFL,PTCFL,PDCFL,PQCFL,PZINV,PBLH,KHPBLN, &
           & PU10N,PV10N,PUST, &
           & PFRSOTI,PEVAPSNW,PGUST, PWUAVG,LDNODECP,KPBLTYPE, &
           & PTENT,PTENQ,PTENL,PTENI,PTENA,PTENU,PTENV, &
           & PTLE1, PTL, PT,PQ, &
           & PUSTRTI,PVSTRTI,PAHFSTI,PEVAPTI,PTSKTI, &
           & PDIFTS,PDIFTQ,PDIFTL,PDIFTI,PSTRTU,PSTRTV,PTOFDU,PTOFDV, &
           & PSTRDU,PSTRDV,PKH_VDF)
!     ------------------------------------------------------------------

!**   *STORE_VDFOUT* - FOR PERTURBED RUN OF THE SEKF SURFACE ANALYSIS 

!     P. DE ROSNAY   E.C.M.W.F.    02 FEBRUARY 2009

!     PURPOSE
!     -------

!     STORE VARIABLES OF THE CURRENT KJth perturbed RUN, 
!     IN ORDER TO USE THEM IN VDFMAIN WHEN PERFORMING PERTURBED
!     RUNS FOR THE EKF SURFACE ANALYSIS
!     VARIABLES WILL BE RESTORED AT THE NEXT TIME STEP BY RESTORE_VDFOUT

!     INTERFACE
!     ---------

!     *STORE_VDFOUT* IS CALLED BY *CALLPAR*

!     INPUT PARAMETERS (INTEGER):

!     *KIDIA*        START POINT
!     *KFDIA*        END POINT
!     *KLON*         NUMBER OF GRID POINTS PER PACKET
!     *KLEV*         NUMBER OF LEVELS
!     *KLEVS*        NUMBER OF LEVELS IN SOIL
!     *KLEV*         END OF VERTICAL LOOP AND VERTICAL DIMENSION
!     *KTILES*       NUMBER OF VEGETATION (SURFACE COVER) TYPES
!     *KSTGLO*       GLOBAL OFFSET (USED IN MESSAGE PASSING VERSION)
!! KDHVTLS : Number of variables for individual tiles
!! KDHFTLS : Number of fluxes for individual tiles
!! KDHVTSS : Number of variables for snow energy budget
!! KDHFTSS : Number of fluxes for snow energy budget
!! KDHVTTS : Number of variables for soil energy budget
!! KDHFTTS : Number of fluxes for soil energy budget
!! KDHVTIS : Number of variables for sea ice energy budget
!! KDHFTIS : Number of fluxes for sea ice energy budget


!
! KSTART  : FIRST STEP OF MODEL
! KSTEP   : CURRENT TIME STEP
!
!     INPUT PARAMETERS (REAL):
! PWSA       : MULTI-LAYER SOIL WETNESS
! PTSA       : MULTI-LAYER SOIL TEMPERATURE

! PVDIS      : TURBULENT DISSIPATION
! PVDISG     : GRAVITY WAVE DRAG DISSIPATION
! PFTLHEV    : SURFACE LATENT HEAT FLUX (SNOW FREE FRACTION)
! PFTLHSB    : SURFACE LATENT HEAT FLUX (SNOW COVERED FRACTION)
! PFWSB      : SURFACE WATER VAPOUR FLUX (SUBLIMATION)
! PUCFL      : U-COMPONENT OF WIND AT 10 METERS (DIAGNOSTIC).
! PVCFL      : V-COMPONENT OF WIND AT 10 METERS (DIAGNOSTIC).
! PTCFL      : TEMPERATURE AT 2 METERS (DIAGNOSTIC).
! PDCFL      : DEW POINT TEMPERATURE AT 2 METERS (DIAGNOSTIC).
! PQCFL      : SPECIFIC HUMIDITY AT 2 METERS (DIAGNOSTIC).
! PBLH       : BOUNDARY LAYER HEIGHT
! PU10N      : U-COMPONENT OF NEUTRAL WIND AT 10 METERS (DIAGNOSTIC).
! PV10N      : V-COMPONENT OF NEUTRAL WIND AT 10 METERS (DIAGNOSTIC).
! PUST       : FRICTION VELOCITY (DIAGNOSTIC).
! PTENT      : TENDENCY OF TEMPERATURE.
! PTENQ      : TENDENCY OF HUMIDITY
! PTENU      : TENDENCY OF U-COMP. OF WIND.
! PTENV      : TENDENCY OF V-COMP. OF WIND.
! PTLE1      : OF SKIN TEMPERATURE
! PTL        : SKIN TEMPERATURE
! PUSTRTI    : E-W (INSTANTANEOUS) SURFACE STRESS FOR EACH TILE
! PVSTRTI    : N-S (INSTANTANEOUS) SURFACE STRESS FOR EACH TILE
! PAHFSTI    : (INSTANTANEOUS) SURFACE SENSIBLE HEAT FLUX FOR EACH TILE
! PEVAPTI       : (INSTANTANEOUS) EVAPORATION FOR EACH TILE
! PTSKTI     : SKIN TEMPERATURE FOR EACH TILE
! PDIFTS     : TURBULENT FLUX OF ENTHALPY (OR DRY STATIC ENERGY).
! PDIFTQ     : TURBULENT FLUX (INC. Q NEGATIVE) OF SPECIFIC HUMIDITY.
! PDIFTL     : TURBULENT FLUX (INC. Q NEGATIVE) OF LIQUID WATER.
! PDIFTI     : TURBULENT FLUX (INC. Q NEGATIVE) OF SOLID WATER.
! PSTRTU     : TURBULENT FLUX OF MOMENTUM "U".
! PSTRTV     : TURBULENT FLUX OF MOMENTUM "V".
! PSTRDU     : GRAVITY WAVE DRAG FLUX "U".
! PSTRDV     : GRAVITY WAVE DRAG FLUX "V".
! pKH_VDF    : TURBULENT DIFFUSION COEFFICIENT FOR HEAT


! OUTPUT PARAMETERS ARE STORED IN YOMSEKF FOR THE NEXT TIME STEP, IN THE SKF_* VARIABLES


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

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


USE YOMSEKF  , ONLY : SKF_ZWSA,SKF_ZTSA, SKF_ZAZ0M,SKF_ZAZ0H, &
!   & SKF_PVDIS,SKF_PVDISG, SKF_ZDISSGW, SKF_PFTLHEV, SKF_PFTLHSB,&
!   & SKF_PFWSB,SKF_ZBIR,SKF_ZVAR, &
!   & SKF_PUCFL,SKF_PVCFL,&
    & SKF_PTCFL,SKF_PDCFL,&
!   & SKF_PQCFL,SKF_ZZINV,SKF_PBLH,ISKF_IHPBLN, &
!   & SKF_PU10N,SKF_PV10N,SKF_PUST,&
   & SKF_ZFRSOTI,&
  & SKF_ZEVAPSNW,&
!   & SKF_ZGUST,&
!   & SKF_ZWUAVG,LSKF_LLNODECP,ISKF_IPBLTYPE, &
   & SKF_PTENT,SKF_PTENQ,SKF_ZTENL,SKF_ZTENI,&
   & SKF_ZTENA,SKF_PTENU,SKF_PTENV, SKF_PTLE1, SKF_PTL,&
   & SKF_PTENT_CUM,SKF_PTENQ_CUM, &
   & SKF_PUSTRTI,SKF_PVSTRTI,SKF_PAHFSTI,SKF_PEVAPTI,SKF_PTSKTI, &
!   & SKF_PDIFTS,SKF_PDIFTQ,SKF_PDIFTL,SKF_PDIFTI,SKF_PSTRTU,&
!   & SKF_PSTRTV,&
   & SKF_PTOFDU,SKF_PTOFDV
!   & SKF_PSTRDU,SKF_PSTRDV,SKF_zkh_vdf



IMPLICIT NONE

! INPUT PARAMETERS 
INTEGER(KIND=JPIM),INTENT(IN)    :: KSTART
INTEGER(KIND=JPIM),INTENT(IN)    :: KSTEP
INTEGER(KIND=JPIM),INTENT(IN)    :: KJ
INTEGER(KIND=JPIM),INTENT(IN)    :: KJREF
INTEGER(KIND=JPIM),INTENT(IN)    :: KIDIA 
INTEGER(KIND=JPIM),INTENT(IN)    :: KFDIA 
INTEGER(KIND=JPIM),INTENT(IN)    :: KLON 
INTEGER(KIND=JPIM),INTENT(IN)    :: KLEV 
INTEGER(KIND=JPIM),INTENT(IN)    :: KLEVS
INTEGER(KIND=JPIM),INTENT(IN)    :: KTILES
INTEGER(KIND=JPIM),INTENT(IN)    :: KSTGLO


! INPUT VARIABLES (TO STORE)

REAL(KIND=JPRB)   ,INTENT(IN)    :: PWSA(KLON,KLEVS)
REAL(KIND=JPRB)   ,INTENT(IN)    :: PTSA(KLON,KLEVS)

INTEGER(KIND=JPIM),INTENT(IN)    :: KHPBLN(KLON),KPBLTYPE(KLON)
LOGICAL,INTENT(IN)               :: LDNODECP(KLON)

REAL(KIND=JPRB)   ,INTENT(IN)   :: PAZ0M (KLON),PAZ0H(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PVDIS(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PVDISG(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PDISSGW(KLON,KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PFTLHEV(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PFTLHSB(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PFWSB(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PBIR(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PVAR(KLON,KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PUCFL(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PVCFL(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTCFL(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PDCFL(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PQCFL(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PZINV(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PBLH(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PU10N(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PV10N(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PUST(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PFRSOTI(KLON,KTILES)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PEVAPSNW(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PGUST(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PWUAVG(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTENT(KLON,KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTENQ(KLON,KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTENA(KLON,KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTENI(KLON,KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTENL(KLON,KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTENU(KLON,KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTENV(KLON,KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTLE1(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTL(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PT(KLON,KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PQ(KLON,KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PUSTRTI(KLON,KTILES)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PVSTRTI(KLON,KTILES)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PAHFSTI(KLON,KTILES)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PEVAPTI(KLON,KTILES)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTSKTI(KLON,KTILES)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PDIFTS(KLON,0:KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PDIFTQ(KLON,0:KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PDIFTL(KLON,0:KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PDIFTI(KLON,0:KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PSTRTU(KLON,0:KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PSTRTV(KLON,0:KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTOFDU(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PTOFDV(KLON)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PSTRDU(KLON,0:KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PSTRDV(KLON,0:KLEV)
REAL(KIND=JPRB)   ,INTENT(IN)   :: PKH_VDF(KLON,KLEV)   


! LOCAL VARIABLE 

REAL(KIND=JPRB) :: ZHOOK_HANDLE
INTEGER(KIND=JPIM)  :: JL, IBLK

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


! STORE VARIABLES of the KJth run
! KJ=1 : Coupled / non perturbed
! KJ=2 : Offline / perturbe SM layer1
! KJ=3 : Offline / perturbe SM layer2
! KJ=4 : Offline / perturbe SM layer3
! KJ=5 : Offline / non perturbed

! STORE VARIABLES of the Reference KJREF


IBLK=(KSTGLO-1)/KLON + 1

! vdfmain's out variables and in/out perturbed variables
! in: PWSA,PTSA, PTL
! out: PTCFL, PDCFL
! inout: PTLE1

 
! Store after Kstep or for perturbed loops
! ie store in all case except for (KSTART.and.kj=1)
IBLK=(KSTGLO-1)/KLON + 1
!IF(IBLK.eq.52) THEN
!write(nulout,*) 'STORE_VDF: Pt 53-52 enter',KJ
!write(nulout,*) 'PWSA ', PWSA(53,:),PTCFL(53),PDCFL(53)
!write(nulout,*) 'SKF_WSA ', SKF_ZWSA(53,IBLK,:,KJ),SKF_PTCFL(53,IBLK,KJ),SKF_PDCFL(53,IBLK,KJ)
!write(nulout,*) 'SKF_TSA ', SKF_ZTSA(53,IBLK,:,KJ),SKF_PTL(53,IBLK,KJ)
!ENDIF

  DO JL=KIDIA,KFDIA
! in perturbed
    SKF_ZWSA(JL,IBLK,1:KLEVS,KJ) = PWSA(JL,1:KLEVS) 
    SKF_ZTSA(JL,IBLK,1:KLEVS,KJ) = PTSA(JL,1:KLEVS) 
!    SKF_PT(JL,IBLK,1:KLEV,KJ) = PT(JL,1:KLEV) 
!    SKF_PQ(JL,IBLK,1:KLEV,KJ) = PQ(JL,1:KLEV) 
! out perturbed
IF(KJ > 1) THEN
    SKF_PTCFL(JL,IBLK,KJ) = PTCFL(JL) 
    SKF_PDCFL(JL,IBLK,KJ) = PDCFL(JL) 


!out no need to save
!    SKF_PVDIS(JL,IBLK,KJREF) = PVDIS(JL)  
!    SKF_PVDISG(JL,IBLK,KJREF) = PVDISG(JL)  
!    SKF_PFTLHEV(JL,IBLK,KJREF) = PFTLHEV(JL)    
!    SKF_PFTLHSB(JL,IBLK,KJREF) = PFTLHSB(JL)    
!    SKF_PFWSB(JL,IBLK,KJREF) = PFWSB(JL) 
!    SKF_ZVAR(JL,IBLK,1:KLEV,KJREF) = PVAR(JL,1:KLEV) 
!    SKF_PUCFL(JL,IBLK,KJREF) = PUCFL(JL) 
!    SKF_PVCFL(JL,IBLK,KJREF) = PVCFL(JL) 
!    SKF_PQCFL(JL,IBLK,KJREF) = PQCFL(JL) 
!    SKF_ZZINV(JL,IBLK,KJREF) = PZINV(JL) 
!    SKF_PBLH(JL,IBLK,KJREF) = PBLH(JL) 
!    SKF_PU10N(JL,IBLK,KJREF) = PU10N(JL) 
!    SKF_PV10N(JL,IBLK,KJREF) = PV10N(JL) 
!    SKF_PUST(JL,IBLK,KJREF) = PUST(JL) 
!    SKF_ZGUST(JL,IBLK,KJREF) = PGUST(JL) 
!    SKF_ZWUAVG(JL,IBLK,KJREF) = PWUAVG(JL) 
!    SKF_PDIFTS(JL,IBLK,0:KLEV,KJREF) = PDIFTS(JL,0:KLEV) 
!    SKF_PDIFTQ(JL,IBLK,0:KLEV,KJREF) = PDIFTQ(JL,0:KLEV) 
!    SKF_PDIFTL(JL,IBLK,0:KLEV,KJREF) = PDIFTL(JL,0:KLEV) 
!    SKF_PDIFTI(JL,IBLK,0:KLEV,KJREF) = PDIFTI(JL,0:KLEV) 
!    SKF_PSTRTU(JL,IBLK,0:KLEV,KJREF) = PSTRTU(JL,0:KLEV) 
!    SKF_PSTRTV(JL,IBLK,0:KLEV,KJREF) = PSTRTV(JL,0:KLEV) 
!    SKF_PSTRDU(JL,IBLK,0:KLEV,KJREF) = PSTRDU(JL,0:KLEV) 
!    SKF_PSTRDV(JL,IBLK,0:KLEV,KJREF) = PSTRDV(JL,0:KLEV) 
!    SKF_ZKH_VDF(JL,IBLK,1:KLEV,KJREF) = PKH_VDF(JL,1:KLEV) 
! out useful for surftstp
    SKF_ZEVAPSNW(JL,IBLK,KJ) = PEVAPSNW(JL) 
ENDIF
ENDDO
!IBLK=(KSTGLO-1)/KLON + 1
!IF(IBLK.eq.52) THEN
!write(nulout,*) 'STORE_VDF: Pt 53-52 output',KJ
!write(nulout,*) 'PWSA ', PWSA(53,:),PTCFL(53),PDCFL(53)
!write(nulout,*) 'SKF_WSA ', SKF_ZWSA(53,IBLK,:,KJ),SKF_PTCFL(53,IBLK,KJ),SKF_PTL(53,IBLK,KJ)
!write(nulout,*) 'SKF_TSA ', SKF_ZTSA(53,IBLK,:,KJ),SKF_PTL(53,IBLK,KJ)
!ENDIF

! callpar local's variables not kept from one step to another
IF(KJ > 1) THEN
  DO JL=KIDIA,KFDIA
!    ISKF_IHPBLN(JL,IBLK,KJREF) = KHPBLN(JL) 
!    ISKF_IPBLTYPE(JL,IBLK,KJREF) =   KPBLTYPE(JL) 
!    LSKF_LLNODECP(JL,IBLK,KJREF) =  LDNODECP(JL) 
!    SKF_ZDISSGW(JL,IBLK,1:KLEV,KJREF) = PDISSGW(JL,1:KLEV)
!    SKF_ZBIR(JL,IBLK,KJREF) = PBIR(JL) 
ENDDO
ENDIF


! vdfmain's inout variables for which we keep the unperturbed value (KJREF)
! Allways store inout variables
DO JL=KIDIA,KFDIA
  SKF_ZAZ0M(JL,IBLK,KJ) = PAZ0M(JL)  
  SKF_ZAZ0H(JL,IBLK,KJ) = PAZ0H(JL)  
  SKF_ZTENA(JL,IBLK,1:KLEV,KJ) = PTENA(JL,1:KLEV) 
  SKF_ZTENI(JL,IBLK,1:KLEV,KJ) = PTENI(JL,1:KLEV) 
  SKF_ZTENL(JL,IBLK,1:KLEV,KJ) = PTENL(JL,1:KLEV) 
  SKF_PTENU(JL,IBLK,1:KLEV,KJ) = PTENU(JL,1:KLEV) 
  SKF_PTENV(JL,IBLK,1:KLEV,KJ) = PTENV(JL,1:KLEV) 
  SKF_PTOFDU(JL,IBLK,KJ) = PTOFDU(JL) 
  SKF_PTOFDV(JL,IBLK,KJ) = PTOFDV(JL) 
  SKF_PTLE1(JL,IBLK,KJ) = PTLE1(JL) 

! inout perturbed - some are useful for surftstp
  SKF_PTSKTI(JL,IBLK,1:KTILES,KJ) = PTSKTI(JL,1:KTILES) 
  SKF_PTL(JL,IBLK,KJ) = PTL(JL) 

!  IF(KJ > 1) THEN

    SKF_PTENT(JL,IBLK,1:KLEV,KJ) = PTENT(JL,1:KLEV)
    SKF_PTENQ(JL,IBLK,1:KLEV,KJ) = PTENQ(JL,1:KLEV)

    IF(KSTEP == KSTART) Then
      SKF_PTENT_CUM(JL,IBLK,1:KLEV,KJ) = PTENT(JL,1:KLEV) 
      SKF_PTENQ_CUM(JL,IBLK,1:KLEV,KJ) = PTENQ(JL,1:KLEV) 
    ELSE 
      SKF_PTENT_CUM(JL,IBLK,1:KLEV,KJ) = SKF_PTENT_CUM(JL,IBLK,1:KLEV,KJ)+ PTENT(JL,1:KLEV) 
      SKF_PTENQ_CUM(JL,IBLK,1:KLEV,KJ) = SKF_PTENQ_CUM(JL,IBLK,1:KLEV,KJ)+ PTENQ(JL,1:KLEV) 
    ENDIF

!  ELSE
!
!    SKF_PTENT(JL,IBLK,1:KLEV,KJ) = PTENT(JL,1:KLEV) 
!    SKF_PTENQ(JL,IBLK,1:KLEV,KJ) = PTENQ(JL,1:KLEV) 
!
!    IF(KSTEP == KSTART) Then
!      SKF_PTENT_CUM(JL,IBLK,1:KLEV,KJ) = PTENT(JL,1:KLEV) 
!      SKF_PTENQ_CUM(JL,IBLK,1:KLEV,KJ) = PTENQ(JL,1:KLEV) 
!    ELSE
!      SKF_PTENT_CUM(JL,IBLK,1:KLEV,KJ) = SKF_PTENT_CUM(JL,IBLK,1:KLEV,KJ)+ PTENT(JL,1:KLEV) 
!      SKF_PTENQ_CUM(JL,IBLK,1:KLEV,KJ) = SKF_PTENQ_CUM(JL,IBLK,1:KLEV,KJ)+ PTENQ(JL,1:KLEV) 
!    ENDIF
!
!  ENDIF

  SKF_PEVAPTI(JL,IBLK,1:KTILES,KJ) = PEVAPTI(JL,1:KTILES) 
  SKF_PUSTRTI(JL,IBLK,1:KTILES,KJ) = PUSTRTI(JL,1:KTILES) 
  SKF_PVSTRTI(JL,IBLK,1:KTILES,KJ) = PVSTRTI(JL,1:KTILES) 
  SKF_PAHFSTI(JL,IBLK,1:KTILES,KJ) = PAHFSTI(JL,1:KTILES) 
  SKF_ZFRSOTI(JL,IBLK,1:KTILES,KJ) = PFRSOTI(JL,1:KTILES) 
ENDDO




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