SUBROUTINE GEMS_DEALLOC( PCEN, PTENC,PTENC_SKF, PCFLX, PSCAV, PGRGTEND )

!**   INTERFACE.
!     ----------
!          *GEMS_DEALLOC* IS CALLED FROM *CALLPAR*.

! INPUTS:
!  -------

! INPUTS/OUTPUTS:
!---------------

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

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


!     Author
!    --------
!         2008-10-15, R. Engelen 

!     Modifications :
!    ----------------
!         2009-0307, P. de Rosnay offline jacobians for SEKF surface analysis
!         2009-1004, P. Bechtold adding scavenging coefficients

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

USE PARKIND1  ,ONLY : JPRB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
USE YOM_YGFL , ONLY : NGRG_CPLO4

IMPLICIT NONE

! In the declaration below the INTENT attribute has been removed to comply
! strict f95 standards. The attribute INTENT(INOUT) should be put back after all
! compiler (especially NEC) support this extension. - R. El Khatib 04-Jun-2009
REAL(KIND=JPRB), POINTER :: PCEN(:,:,:),PTENC(:,:,:),PCFLX(:,:) & 
     &     , PGRGTEND(:,:,:), PSCAV(:), PTENC_SKF(:,:,:)

REAL(KIND=JPRB) :: ZHOOK_HANDLE

!-----------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('GEMS_DEALLOC',0,ZHOOK_HANDLE)

DEALLOCATE( PCFLX,PTENC,PTENC_SKF,PCEN,PSCAV)
IF (NGRG_CPLO4 > 0 ) THEN
  DEALLOCATE(PGRGTEND)
ENDIF
!-----------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('GEMS_DEALLOC',1,ZHOOK_HANDLE)
END SUBROUTINE GEMS_DEALLOC
