SUBROUTINE CAPRSURF

!**** *CAPRSURF*  - Routine to print out all the surface fields

!     Purpose.
!     --------
!           To print the surface fields, both climatological constants and
!           model variables.

!**   Interface.
!     ----------
!        *CALL* *CAPRSURF*

!     Author.
!     -------
!        Francoise Taillefer      METEO-FRANCE

!     Modifications.
!     --------------
!        Original : 2007-03-25
!     ----------------------------------------------------------------------

USE PARKIND1  ,ONLY : JPIM     ,JPRB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
USE YOMLUN   , ONLY : NULOUT
USE SURFACE_FIELDS_MIX, ONLY : YSD_VFD, SD_VF, &
 & YSP_SBD, SP_SB, YSP_RRD, SP_RR, YSP_SGD, SP_SG, &
 & YSD_VVD, SD_VV, YSD_VAD, SD_VA, YSD_VCD, SD_VC

IMPLICIT NONE

INTEGER(KIND=JPIM) :: JV

REAL(KIND=JPRB) :: ZHOOK_HANDLE

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

#include "gpnorm2.intfb.h"
#include "gpnorm3.intfb.h"

!     ------------------------------------------------------------------
!*       1.    GRID-POINT NORMS
!              ----------------

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

WRITE(NULOUT,'(A)') ' CAPRSURF: STATISTICS FOR ALL SURFACE FIELDS'
IF (YSP_SBD%NUMFLDS>0) THEN
  DO JV=1,YSP_SBD%NUMFLDS
    WRITE(NULOUT,'(A,I4)') ' SOILB, FIELD ',JV
    CALL GPNORM3(SP_SB,YSP_SBD%NUMFLDS,JV,KLEVS=YSP_SBD%NLEVS,LDLEVELS=.TRUE.)
  ENDDO
ENDIF
IF (YSP_SGD%NUMFLDS>0) THEN
  WRITE(NULOUT,'(A)') ' SNOWG '
  CALL GPNORM2(YSP_SGD%NUMFLDS,1,SP_SG)
ENDIF
IF (YSP_RRD%NUMFLDS>0) THEN
  WRITE(NULOUT,'(A)') ' RESVR '
  CALL GPNORM2(YSP_RRD%NUMFLDS,1,SP_RR)
ENDIF
    
IF (YSD_VFD%NUMFLDS > 0) THEN
  WRITE(NULOUT,'(A)') ' VARSF'
  CALL GPNORM2(YSD_VFD%NUMFLDS,1,SD_VF)
ENDIF
IF (YSD_VVD%NUMFLDS > 0) THEN
  WRITE(NULOUT,'(A)') ' VCLIV'
  CALL GPNORM2(YSD_VVD%NUMFLDS,1,SD_VV)
ENDIF
IF (YSD_VAD%NUMFLDS > 0) THEN
  WRITE(NULOUT,'(A)') ' VCLIA'
  CALL GPNORM2(YSD_VAD%NUMFLDS,1,SD_VA)
ENDIF
IF (YSD_VCD%NUMFLDS > 0) THEN
  WRITE(NULOUT,'(A)') ' VO3ABC'
  CALL GPNORM2(YSD_VCD%NUMFLDS,1,SD_VC)
ENDIF

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