SUBROUTINE PPEDDHEC (PDHNOM,PDDHCV,PDDHCS,CDNAMX,KDATEF)
!-----------------------------------------------------------------------
!**** PPEDDH * IMPRESSION DE BILANS EN MOYENNE VERTICALE POUR UN DOMAINE
!              DIAGNOSTICS PAR DOMAINES HORIZONTAUX
!-----------------------------------------------------------------------
!     BUT
!     ---
!     EDITION SUR LISTING DES BILANS EN MOYENNE VERTICALE
!     DU DOMAINE IDENTIFIE PAR PDHNOM

!     ARGUMENTS D'ENTREE
!     ------------------
!      PDHNOM(11) : IDENTIFICATION DU DOMAINE
!                  PDHNOM(11) EST LE TYPE DE DOMAINE
!      PDDHCV(0:NFLEVG,NDHCV+NDHVV) : PROFILS VERTICAUX
!                  LA STRUCTURE DU TABLEAU EST RESUMEE DANS
!                  PPSYDH, SINON VOIR YOMTDDH ET CPDYDDH/CPPHDDH
!      PDDHCS(NDHCV+NDHVV) : SOL
!      CDNAMX*4 : NOM DE L EXPERIENCE
!      KDATEF(11) : TABLEAU DE DATE DECOMPOSEE

!     ARGUMENTS DE SORTIE
!     -------------------
!     LISTING, UNITE NULOUT

!     ORIGINAL
!     --------
!     2000-06-29, C. Jakob, started as copy of PPEDDH
!     MODIFICATIONS
!     --------
!     2006-09-07, S.Serrar, DDH prints for GHG and SF6
!     JJMorcrette 20061002 DDH for aerosol physics

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

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

USE YOMDIM   , ONLY : NFLEVG
USE YOMLUN   , ONLY : NULOUT
USE YOMRIP   , ONLY : NSSSSS   ,RSTATI
USE YOMCT3   , ONLY : NSTEP
USE YOMDYN   , ONLY : TSTEP
USE YOMCST   , ONLY : RPI      ,ROMEGA   ,RLVTT    ,RLSTT    ,RLMLT
USE YOMLDDH  , ONLY : LHDHKS   ,LHDMCI   ,LHDENT
USE YOMMDDH  , ONLY : NDHCS    ,NDHCV    ,NDHCVSU  ,NDHCSSU  ,&
 & NDHVV    ,NDHFVD   ,NDHVS    ,NDHVFS   ,NDHVHK   ,&
 & NDHVMC   ,NDHAVD   ,NDHAVP   ,NDHAHKD  ,NDHBHKD  ,&
 & NDHAHKP  ,NDHBHKP  ,NDHAMCD  ,NDHBMCD  ,NDHBMCP  ,&
 & NDHVTLS  ,NDHFTLS  ,NDHVTSS  ,NDHFTSS  ,NDHVTTS  ,&
 & NDHFTTS  ,NDHVTIS  ,NDHFTIS  ,NDHVSSS  ,NDHFSSS  ,&
 & NDHVIIS  ,NDHFIIS  ,NDHVWLS  ,NDHFWLS  ,NDHFFS,&
 & NDHFSD   ,NDHFSP   ,NFSVAR_AERO ,NFSFLX_AERO  
USE YOMTDDH  , ONLY : PDDHFSVI
USE YOMSDDH  , ONLY : NHDQLNVA ,NHDPASVA ,LHDQLN   ,LHDADD   ,LHDPAS
USE YOMDPHY  , ONLY : NCSI     ,NCSNEC   ,NTILES
USE SURFACE_FIELDS_MIX  , ONLY : YSP_SBD
USE YOM_YGFL, ONLY : NGHG, YGHG, NTRAC, YTRAC, YAERO, NGRG, YGRG,LGRGSFC, NACTAERO

IMPLICIT NONE

!     ------------------------------------------------------------------
REAL(KIND=JPRB)   ,INTENT(IN)    :: PDHNOM(11) 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PDDHCV(0:NFLEVG,NDHCVSU+NDHVV) 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PDDHCS(NDHCSSU+NDHVS) 
CHARACTER         ,INTENT(IN)    :: CDNAMX*4 
INTEGER(KIND=JPIM),INTENT(IN)    :: KDATEF(11) 
CHARACTER :: CLDOM*20, CL24C*24, CL10C*10, CLOUT*10
REAL(KIND=JPRB) :: ZDHIV (NDHCV+NDHVV)

INTEGER(KIND=JPIM) :: IDHCS, IDHCS_2,IDHCV, ISAERO, ISEN, ISHK, ISMC, ITYPE, JCV, JJPASS, JLEV
INTEGER(KIND=JPIM) :: JVAR, JFLX, JTILE

!     --- NEW SURFACE FIELDS 

REAL(KIND=JPRB)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S, &
 & ZKKFDS, ZLAT0, ZLFTT, ZLON0, ZLSTT, ZLVTT, &
 & ZMAR0, ZMAR1, ZMARDH, ZMARFD, ZMARFD0, ZMARFDS, &
 & ZMARFP, ZMARFP0, ZMARFPS, ZMNORM, ZNORM, &
 & ZNORMEQ, ZNT0, ZNT1, ZNT0_2, ZNT1_2, ZOM0, ZOM1, ZOUT, ZPASS0, &
 & ZPASS1, ZQL0, ZQL1, ZQLDH, ZQLFD, &
 & ZQLFNG, ZQLFT, ZQLFTC, ZQN0, ZQN1, ZQNDH, &
 & ZQNFD, ZQNFNG, ZQNFT, ZQNFTC, ZQNORM, ZQTCCL, &
 & ZQTCCN, ZQTCSL, ZQTCSN, ZQTPCL, ZQTPCL0, &
 & ZQTPCLE, ZQTPCLF, ZQTPCLS, ZQTPCN, ZQTPCN0, &
 & ZQTPCNE, ZQTPCNF, ZQTPCNS, ZQTPSL, ZQTPSL0, &
 & ZQTPSLE, ZQTPSLF, ZQTPSLS, ZQTPSN, ZQTPSN0, &
 & ZQTPSNE, ZQTPSNF, ZQTPSNS, ZQV0, ZQV1, ZQVCFON, &
 & ZQVDH, ZQVFD, ZQVFD0, ZQVFDS, ZQVFNG, ZQVFNG0, &
 & ZQVFNGS, ZQVFT, ZQVFT0, ZQVFTC, ZQVFTC0, &
 & ZQVFTCS, ZQVFTS, ZQVSFON, &
 & ZSSS, ZUSSSS, ZLFRAC, &
 & ZIFRAC, ZSCALEL, ZSCALEI , ZNTS 
REAL(KIND=JPRB) :: ZPHY1, ZPHY2, ZPHY3, ZPHY4, ZPHY5, ZPHY6, ZPHYT, ZTAUT 
REAL(KIND=JPRB) :: ZHOOK_HANDLE

IF (LHOOK) CALL DR_HOOK('PPEDDHEC',0,ZHOOK_HANDLE)
CALL GSTATS(1913,0)
WRITE (NULOUT,*) ' '

!     ------------------------------------------------------------------
!**   0.- INITIALISATIONS DE SECURITE.
!         AFIN DE CONTOURNER LE MESSAGE DE WARNING PRODUIT PAR
!         LE LOGICIEL DE CONTROLE DES INITIALISATIONS DE VARIABLES
!         EN CAS DE VARIABLES INITIALISEES A L'INTERIEUR DE
!         TESTS IF-ENDIF, ON PORTE UNE VALEUR QUELCONQUE
!         DANS LESDITES VARIABLES.

ZLAT0=0.0_JPRB
ZLON0=0.0_JPRB

!     ------------------------------------------------------------------
!**   1.- IDENTIFICATION DE LA SORTIE

ITYPE=NINT(PDHNOM(11))
WRITE (NULOUT,*) ' DDH * DDH * DDH * DDH * DDH * DDH * DDH '
WRITE (NULOUT,*) ' '
WRITE (NULOUT,*) '      ---------------------------- DDH'
ZSSS=REAL(NSTEP,JPRB)*TSTEP
ZHEURE=ZSSS/3600._JPRB
ZUSSSS=1.0_JPRB/ZSSS
IF(ZHEURE > 72._JPRB) THEN
  ZOUT=.001_JPRB*NINT(ZHEURE/24._JPRB*1000._JPRB)
  CLOUT=' DAYS.'
ELSE
  ZOUT=.001_JPRB*NINT(ZHEURE*1000._JPRB)
  IF(ZOUT >= 2.0_JPRB) THEN
    CLOUT=' HOURS.'
  ELSE
    CLOUT=' HOUR.'
  ENDIF
ENDIF
WRITE (NULOUT,*) '       VERTICALLY INTEGRATED BUDGET   ',&
 & ' EXPERIMENT ',CDNAMX,&
 & ' INITIAL DATE ',KDATEF(3),'/',KDATEF(2),'/',KDATEF(1),&
 & ' ELAPSED TIME : ',ZOUT,CLOUT  
WRITE (NULOUT,*) '      ---------------------------- DDH'
WRITE (NULOUT,*) ' '
IF ( ITYPE == 5 ) THEN
  WRITE (NULOUT,*) ' DDH * AREA    GLOBAL '
  WRITE (NULOUT,*) '               ------ '
  WRITE (CLDOM,'(A20)') 'GLOBAL '
ENDIF
IF ( ITYPE == 6 ) THEN
  WRITE (NULOUT,*) ' DDH * LATITUDE BAND     '
  WRITE (NULOUT,*) ' BAND  ',PDHNOM(2),' TO  ',PDHNOM(3),&
   & ' SINUS(LATITUDE GEO)=',PDHNOM(4)  
  WRITE (NULOUT,*) ' '
  WRITE (CLDOM,'(A8,F4.0,8X)') 'LATITUDE ',PDHNOM(2)
ENDIF
IF ( ITYPE == 1.OR. ITYPE == 4 ) THEN
  WRITE (NULOUT,*) ' DDH * POINT '
  WRITE (NULOUT,*) '      -------'
  WRITE (NULOUT,*) ' PLANE',PDHNOM(1),' AREA    ',PDHNOM(2),&
   & ' INDICES JLON=',PDHNOM(5),' JGL=',PDHNOM(6)  
  WRITE (NULOUT,*) ' LONGITUDE GEO=',PDHNOM(3),&
   & ' SINUS(LATITUDE GEO)=',PDHNOM(4)  
  WRITE (NULOUT,*) ' '
  WRITE (CLDOM,'(A7,F5.0,A1,F5.0,A1,1X)')&
   & 'POINT (',PDHNOM(5),',',PDHNOM(6),')'  
ENDIF
IF ( ITYPE == 2.OR. ITYPE == 3 ) THEN
  WRITE (NULOUT,*) ' DDH * LIMITED AREA   '
  WRITE (NULOUT,*) '      ----------------'
  WRITE (NULOUT,*) ' PLANE',PDHNOM(1),' AREA    ',PDHNOM(2)
  WRITE (NULOUT,5012) PDHNOM(3), PDHNOM(4), PDHNOM(5),&
   & PDHNOM(6), PDHNOM(7), PDHNOM(8), PDHNOM(9), PDHNOM(10)  
  WRITE (NULOUT,*) ' '
  WRITE (CLDOM,'(A8,F3.0,A1,F5.0,A1,2X)')&
   & 'LIMITE (',PDHNOM(1),',',PDHNOM(2),')'  
ENDIF
WRITE (NULOUT,*) ' DDH * BUDGET AT NSTEP=',NSTEP,&
 & ' I.E. ',ZSSS,' S ',' I.E. ',&
 & ZOUT,CLOUT  
WRITE (NULOUT,*) ' '
ISHK=0
ISMC=0
ISEN=0

!     ------------------------------------------------------------------
!**   2.- CALCUL DES MOYENNES VERTICALES INDIFFERENCIEES
!        OPERATION QUI A UN SENS SUR LES VARIABLES ET TENDANCES
!      MAIS NON SUR LES FLUX !

DO JCV=1, NDHCV+NDHVV
  ZDHIV(JCV)=0.0_JPRB
ENDDO
DO JLEV=0, NFLEVG
  DO JCV=1, NDHCV+NDHVV
    ZDHIV(JCV)=ZDHIV(JCV) + PDDHCV(JLEV,JCV)
  ENDDO
ENDDO

!     ------------------------------------------------------------------
!**   3.- IMPRESSION DU BILAN MASSES, ENERGIES, SOL

IDHCV=0

IF ( LHDHKS ) THEN
  ISHK=1
!    ----------------------
!*    BILAN DE MASSE D'AIR
!    ----------------------
  IDHCV=0
  ZMAR0=ZDHIV(IDHCV+1)

  IDHCV=NDHVV
  ZMARDH=ZDHIV(IDHCV+1)

  IDHCV=NDHVV + NDHAVD
  ZMARFD0=PDDHCV(0,IDHCV+1)
  ZMARFDS=PDDHCV(NFLEVG,IDHCV+1)
  ZMARFD=ZMARFD0 - ZMARFDS

  IDHCV=NDHVV + NDHFVD
  ZMARFP0=PDDHCV(0,IDHCV+1)
  ZMARFPS=PDDHCV(NFLEVG,IDHCV+1)
  ZMARFP=ZMARFP0 - ZMARFPS

  IDHCV=NDHCV

  ZMAR1=ZDHIV(IDHCV+1)
!     BILAN
  ZBMAR=ZMAR1 - ZMAR0 - ZMARDH - ZMARFD - ZMARFP

  ZMNORM=1.E+06_JPRB

!    -------------------------------
!*    BILAN DE MASSE DE VAPEUR D'EAU
!    -------------------------------
  IDHCV=0
  ZQV0=ZDHIV(IDHCV+2)

  IDHCV=NDHVV
  ZQVDH=ZDHIV(IDHCV+2)

  IDHCV=NDHVV + NDHAVD
  ZQVFD0=PDDHCV(0,IDHCV+2)
  ZQVFDS=PDDHCV(NFLEVG,IDHCV+2)
  ZQVFD=ZQVFD0 - ZQVFDS

  IDHCV=NDHVV + NDHFVD
  ZQVFT0=PDDHCV(0,IDHCV+2)
  ZQVFTS=PDDHCV(NFLEVG,IDHCV+2)
  ZQVFT=ZQVFT0 - ZQVFTS
  ZQVFTC0=PDDHCV(0,IDHCV+3)
  ZQVFTCS=PDDHCV(NFLEVG,IDHCV+3)
  ZQVFTC=ZQVFTC0 - ZQVFTCS
  ZQTPSL0=PDDHCV(0,IDHCV+4)
  ZQTPSLS=PDDHCV(NFLEVG,IDHCV+4)
  ZQTPSL=ZQTPSL0 - ZQTPSLS
  ZQTPSN0=PDDHCV(0,IDHCV+5)
  ZQTPSNS=PDDHCV(NFLEVG,IDHCV+5)
  ZQTPSN=ZQTPSN0 - ZQTPSNS
  ZQTPCL0=PDDHCV(0,IDHCV+6)
  ZQTPCLS=PDDHCV(NFLEVG,IDHCV+6)
  ZQTPCL=ZQTPCL0 - ZQTPCLS
  ZQTPCN0=PDDHCV(0,IDHCV+7)
  ZQTPCNS=PDDHCV(NFLEVG,IDHCV+7)
  ZQTPCN=ZQTPCN0 - ZQTPCNS
  ZQVFNG0=PDDHCV(0,IDHCV+8)
  ZQVFNGS=PDDHCV(NFLEVG,IDHCV+8)
  ZQVFNG=ZQVFNG0 - ZQVFNGS

  IDHCV=NDHCV
  ZQV1=ZDHIV(IDHCV+2)
!     BILAN
  ZBQV=ZQV1 - ZQV0 - ZQVDH - ZQVFD - ZQVFT -&
   & ZQVFTC - ZQTPSL - ZQTPSN - ZQTPCL - ZQTPCN - ZQVFNG  

!    --------------------------------
!*    BILAN D'EAU LIQUIDE ET NEIGEUSE
!    --------------------------------

  IF(LHDQLN) THEN

    IDHCV=0
    ZQL0=ZDHIV(IDHCV+9)
    ZQN0=ZDHIV(IDHCV+10)

    IDHCV=NDHCV
    ZQL1=ZDHIV(IDHCV+9)
    ZQN1=ZDHIV(IDHCV+10)

    IDHCV=NDHVV
    ZQLDH=ZDHIV(IDHCV+14)
    ZQNDH=ZDHIV(IDHCV+15)

    IDHCV=NDHVV + NDHAVD
    ZQLFD=PDDHCV(0,IDHCV+11)-PDDHCV(NFLEVG,IDHCV+11)
    ZQNFD=PDDHCV(0,IDHCV+12)-PDDHCV(NFLEVG,IDHCV+12)

    IDHCV=NDHVV + NDHFVD
    ZQLFT=PDDHCV(0,IDHCV+27)-PDDHCV(NFLEVG,IDHCV+27)
    ZQNFT=PDDHCV(0,IDHCV+28)-PDDHCV(NFLEVG,IDHCV+28)
    ZQLFTC=PDDHCV(0,IDHCV+29)-PDDHCV(NFLEVG,IDHCV+29)
    ZQNFTC=PDDHCV(0,IDHCV+30)-PDDHCV(NFLEVG,IDHCV+30)
    ZQLFNG=PDDHCV(0,IDHCV+31)-PDDHCV(NFLEVG,IDHCV+31)
    ZQNFNG=PDDHCV(0,IDHCV+32)-PDDHCV(NFLEVG,IDHCV+32)
    ZQTCCL=PDDHCV(0,IDHCV+33)-PDDHCV(NFLEVG,IDHCV+33)
    ZQTCCN=PDDHCV(0,IDHCV+34)-PDDHCV(NFLEVG,IDHCV+34)
    ZQTCSL=PDDHCV(0,IDHCV+35)-PDDHCV(NFLEVG,IDHCV+35)
    ZQTCSN=PDDHCV(0,IDHCV+36)-PDDHCV(NFLEVG,IDHCV+36)
  ELSE
    ZQL0=0.0_JPRB
    ZQN0=0.0_JPRB
    ZQL1=0.0_JPRB
    ZQN1=0.0_JPRB
    ZQLDH=0.0_JPRB
    ZQNDH=0.0_JPRB
    ZQLFD=0.0_JPRB
    ZQNFD=0.0_JPRB
    ZQLFT=0.0_JPRB
    ZQNFT=0.0_JPRB
    ZQLFTC=0.0_JPRB
    ZQLFTC=0.0_JPRB
    ZQNFTC=0.0_JPRB
    ZQLFNG=0.0_JPRB
    ZQNFNG=0.0_JPRB
    ZQTCCL=ZQTPCL
    ZQTCCN=ZQTPCN
    ZQTCSL=ZQTPSL
    ZQTCSN=ZQTPSN
  ENDIF

!     BILAN
  ZBQL=ZQL1-ZQL0-ZQLDH-ZQLFD-ZQLFT-ZQLFTC-ZQTPCL-ZQTPSL+ZQTCCL+ZQTCSL
  ZBQN=ZQN1-ZQN0-ZQNDH-ZQNFD-ZQNFT-ZQNFTC-ZQTPCN-ZQTPSN+ZQTCCN+ZQTCSN

!    -------------------------------
!*    BILAN D'ENERGIE CINETIQUE
!    -------------------------------
  IDHCV=0
  ZKK0=ZDHIV(IDHCV+5)

  IDHCV=NDHVV
  ZKKDH=ZDHIV(IDHCV+7)
  ZKKCOV=ZDHIV(IDHCV+8)

  IDHCV=NDHVV + NDHAVD
  ZKKFD0=PDDHCV(0,IDHCV+7)
  ZKKFDS=PDDHCV(NFLEVG,IDHCV+7)
  ZKKFD=ZKKFD0 - ZKKFDS
  ZKKFDM0=PDDHCV(0,IDHCV+8)
  ZKKFDMS=PDDHCV(NFLEVG,IDHCV+8)
  ZKKFDM=ZKKFDM0 - ZKKFDMS

  IDHCV=NDHVV + NDHFVD + NDHAVP
  ZKKDIT=ZDHIV(IDHCV+1)
  ZKKDIC=ZDHIV(IDHCV+2)
  ZKKDID=ZDHIV(IDHCV+3)

  IDHCV=NDHCV
  ZKK1=ZDHIV(IDHCV+5)
!     BILAN
  ZBKK=ZKK1 - ZKK0  - ZKKDH - ZKKCOV - ZKKFD - ZKKFDM -&
   & ZKKDIT - ZKKDIC - ZKKDID  

!    ------------------------------------
!*    BILAN D'ENERGIE INTERNE/POTENTIELLE
!    ------------------------------------
  IDHCV=0
  ZCT0=ZDHIV(IDHCV+6)
  ZEP0=ZDHIV(IDHCV+7)

  IDHCV=NDHVV
  ZCTDH=ZDHIV(IDHCV+9)
  ZCTCOV=ZDHIV(IDHCV+10)
  ZCTCOP=ZDHIV(IDHCV+11)
  ZEPDH=ZDHIV(IDHCV+12)

  IDHCV=NDHVV + NDHAVD
  ZCTFD0=PDDHCV(0,IDHCV+9)
  ZCTFDS=PDDHCV(NFLEVG,IDHCV+9)
  ZCTFD=ZCTFD0 - ZCTFDS
  ZEPFD0=PDDHCV(0,IDHCV+10)
  ZEPFDS=PDDHCV(NFLEVG,IDHCV+10)
  ZEPFD=ZEPFD0 - ZEPFDS

  IDHCV=NDHVV + NDHFVD
  ZCTFT0=PDDHCV(0,IDHCV+15)
  ZCTFTS=PDDHCV(NFLEVG,IDHCV+15)
  ZCTFT=ZCTFT0 - ZCTFTS
  ZCTFTC0=PDDHCV(0,IDHCV+16)
  ZCTFTCS=PDDHCV(NFLEVG,IDHCV+16)
  ZCTFTC=ZCTFTC0 - ZCTFTCS
  ZCTRAS0=PDDHCV(0,IDHCV+17)
  ZCTRASS=PDDHCV(NF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TPCL - ZCTPCN - ZCTPSL - ZCTPSN &
   & - ZCTCCL - ZCTCCN - ZCTCSL - ZCTCSN &
   & - ZCTCOP - ZCTDISS  

!     BILAN DE LA CONVERSION INTERNE
  ZCOVCT=-ZCTCOV -ZCTCOP +ZEPDH +ZEPFD
  ZBCOV=ZKKCOV - ZCOVCT

!    ---------------------------------------
!*    BILANS ADDITIONNELS DE PRECIPITATIONS
!    ---------------------------------------

  IF(LHDADD) THEN
    IDHCV=NDHVV + NDHFVD + NDHAVP
!     STRATIFORME  LIQUIDE  FORMATION
    ZQTPSLF=ZDHIV(IDHCV+4 )
    ZCTPSLF=ZDHIV(IDHCV+5 )
!     STRATIFORME  LIQUIDE  EVAPORATION
    ZQTPSLE=ZDHIV(IDHCV+6 )
    ZCTPSLE=ZDHIV(IDHCV+7 )
!     STRATIFORME  SOLIDE   FORMATION
    ZQTPSNF=ZDHIV(IDHCV+8 )
    ZCTPSNF=ZDHIV(IDHCV+9 )
!     STRATIFORME  SOLIDE   EVAPORATION
    ZQTPSNE=ZDHIV(IDHCV+10)
    ZCTPSNE=ZDHIV(IDHCV+11)
!     STRATIFORME  FONTE
    ZQVSFON=ZDHIV(IDHCV+12)
    ZCTSFON=ZDHIV(IDHCV+13)
!     CONVECTIF    LIQUIDE  FORMATION
    ZQTPCLF=ZDHIV(IDHCV+14)
    ZCTPCLF=ZDHIV(IDHCV+15)
!     CONVECTIF    LIQUIDE  EVAPORATION
    ZQTPCLE=ZDHIV(IDHCV+16)
    ZCTPCLE=ZDHIV(IDHCV+17)
!     CONVECTIF    SOLIDE   FORMATION
    ZQTPCNF=ZDHIV(IDHCV+18)
    ZCTPCNF=ZDHIV(IDHCV+19)
!     CONVECTIF    SOLIDE   EVAPORATION
    ZQTPCNE=ZDHIV(IDHCV+20)
    ZCTPCNE=ZDHIV(IDHCV+21)
!     CONVECTIF    FONTE
    ZQVCFON=ZDHIV(IDHCV+22)
    ZCTCFON=ZDHIV(IDHCV+23)
  ELSE
    ZQTPSLF=0.0_JPRB
    ZCTPSLF=0.0_JPRB
    ZQTPSLE=0.0_JPRB
    ZCTPSLE=0.0_JPRB
    ZQTPSNF=0.0_JPRB
    ZCTPSNF=0.0_JPRB
    ZQTPSNE=0.0_JPRB
    ZCTPSNE=0.0_JPRB
    ZQVSFON=0.0_JPRB
    ZCTSFON=0.0_JPRB
    ZQTPCLF=0.0_JPRB
    ZCTPCLF=0.0_JPRB
    ZQTPCLE=0.0_JPRB
    ZCTPCLE=0.0_JPRB
    ZQTPCNF=0.0_JPRB
    ZCTPCNF=0.0_JPRB
    ZQTPCNE=0.0_JPRB
    ZCTPCNE=0.0_JPRB
    ZQVCFON=0.0_JPRB
    ZCTCFON=0.0_JPRB
  ENDIF

!     AVERTISSEMENT SUR ABSENCE DE GRADIENT DE VENT

  WRITE (NULOUT,*) ' DDH *** WARNING  , HORIZONTAL',&
   & ' TRANSPORT OF KINETIC ENERGY DOES NOT INCLUDE'  
  WRITE (NULOUT,*) '              ADVECTION ** ',&
   & ' THE TERM IS SET TO ZERO IN THE BUDGET   '  

!    --------------
!*    Surface 
!    --------------

! Get land and sea ice fraction from free-style variable 
! array

! set pointer

  IDHCS = NDHVS

! get fractions - important: the indeces are hardcoded
! as they are used when filling the free-style variable
! array in POSTPHY - make sure the indeces are the same 
! as they are there 

  ZLFRAC=PDDHCS(IDHCS+10)
  ZIFRAC=PDDHCS(IDHCS+11)

! determine scaling factors

  ZSCALEL=0.0_JPRB
  ZSCALEI=0.0_JPRB
  IF ( ZLFRAC < 1.E-07_JPRB ) THEN
    WRITE (NULOUT,*) ' DDH --- The area is over sea '
  ENDIF
  IF ( ZLFRAC >= 1.E-07_JPRB ) THEN
    ZSCALEL=1.0_JPRB/ZLFRAC
    IF ( ITYPE == 5 ) ZSCALEL=1.0_JPRB
    WRITE (NULOUT,'("  DDH --- Land fraction: ",F13.10,&
     &" Land fraction scaling factor used : ",F13.10)')ZLFRAC,ZSCALEL
    WRITE (NULOUT,*) ' '
  ENDIF
  IF ( ZIFRAC >= 1.E-07_JPRB ) THEN
    ZSCALEI=1.0_JPRB/ZIFRAC
    IF ( ITYPE == 5 ) ZSCALEI=1.0_JPRB
  ENDIF

! now recover budget structure as present in
! POSTPHY from big DDH-array and scale with land/
! sea-ice fraction

! INITAL VALUES OF VARIABLES

! Set pointer

  IDHCS=0

! Tiles

  DO JVAR=1,NDHVTLS
    DO JTILE=1,NTILES
      IDHCS=IDHCS+1
      ZDHTLS0(JTILE,JVAR)=PDDHCS(IDHCS)
    ENDDO
  ENDDO

  IDHCS=NDHVTLS*NTILES
  
! Snow energy budget

  DO JVAR=1,NDHVTSS
    DO JLEV=1,NCSNEC
      IDHCS=IDHCS+1
      ZDHTSS0(JLEV,JVAR)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO

  IDHCS=NDHVTLS*NTILES+NDHVTSS*NCSNEC

! Soil energy budget

  DO JVAR=1,NDHVTTS
    DO JLEV=1,YSP_SBD%NLEVS
      IDHCS=IDHCS+1
      ZDHTTS0(JLEV,JVAR)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO

  IDHCS=NDHVTLS*NTILES+NDHVTSS*NCSNEC+NDHVTTS*YSP_SBD%NLEVS

! Sea-ice energy budget

  DO JVAR=1,NDHVTIS
    DO JLEV=1,NCSI
      IDHCS=IDHCS+1
      ZDHTIS0(JLEV,JVAR)=PDDHCS(IDHCS)*ZSCALEI
    ENDDO
  ENDDO

  IDHCS=NDHVTLS*NTILES+NDHVTSS*NCSNEC+NDHVTTS*YSP_SBD%NLEVS+&
   & NDHVTIS*NCSI  

! Snow water budget

  DO JVAR=1,NDHVSSS
    DO JLEV=1,NCSNEC
      IDHCS=IDHCS+1
      ZDHSSS0(JLEV,JVAR)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO

  IDHCS=NDHVTLS*NTILES+NDHVTSS*NCSNEC+NDHVTTS*YSP_SBD%NLEVS+&
   & NDHVTIS*NCSI+NDHVSSS*NCSNEC  

! Interception layer water budget

  DO JVAR=1,NDHVIIS
    IDHCS=IDHCS+1
    ZDHIIS0(JVAR)=PDDHCS(IDHCS)*ZSCALEL
  ENDDO

  IDHCS=NDHVTLS*NTILES+NDHVTSS*NCSNEC+NDHVTTS*YSP_SBD%NLEVS+&
   & NDHVTIS*NCSI+NDHVSSS*NCSNEC+NDHVIIS  

! Soil water budget

  DO JVAR=1,NDHVWLS
    DO JLEV=1,YSP_SBD%NLEVS
      IDHCS=IDHCS+1
      ZDHWLS0(JLEV,JVAR)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO

! CURRENT VALUES OF VARIABLES

! Set pointer

  IDHCS = NDHCS

! Tiles

  DO JVAR=1,NDHVTLS
    DO JTILE=1,NTILES
      IDHCS=IDHCS+1
      ZDHTLS(JTILE,JVAR)=PDDHCS(IDHCS)
    ENDDO
  ENDDO
  
  IDHCS=NDHCS+NDHVTLS*NTILES

! Snow energy budget

  DO JVAR=1,NDHVTSS
    DO JLEV=1,NCSNEC
      IDHCS=IDHCS+1
      ZDHTSS(JLEV,JVAR)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO

  IDHCS=NDHCS+NDHVTLS*NTILES+NDHVTSS*NCSNEC

! Soil energy budget

  DO JVAR=1,NDHVTTS
    DO JLEV=1,YSP_SBD%NLEVS
      IDHCS=IDHCS+1
      ZDHTTS(JLEV,JVAR)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO

  IDHCS=NDHCS+NDHVTLS*NTILES+NDHVTSS*NCSNEC+NDHVTTS*YSP_SBD%NLEVS

! Sea-ice energy budget

  DO JVAR=1,NDHVTIS
    DO JLEV=1,NCSI
      IDHCS=IDHCS+1
      ZDHTIS(JLEV,JVAR)=PDDHCS(IDHCS)*ZSCALEI
    ENDDO
  ENDDO

  IDHCS=NDHCS+NDHVTLS*NTILES+NDHVTSS*NCSNEC+NDHVTTS*YSP_SBD%NLEVS+&
   & NDHVTIS*NCSI  

! Snow water budget

  DO JVAR=1,NDHVSSS
    DO JLEV=1,NCSNEC
      IDHCS=IDHCS+1
      ZDHSSS(JLEV,JVAR)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO
  
  IDHCS=NDHCS+NDHVTLS*NTILES+NDHVTSS*NCSNEC+NDHVTTS*YSP_SBD%NLEVS+&
   & NDHVTIS*NCSI+NDHVSSS*NCSNEC  

! Interception layer water budget

  DO JVAR=1,NDHVIIS
    IDHCS=IDHCS+1
    ZDHIIS(JVAR)=PDDHCS(IDHCS)*ZSCALEL
  ENDDO

  IDHCS=NDHCS+NDHVTLS*NTILES+NDHVTSS*NCSNEC+NDHVTTS*YSP_SBD%NLEVS+&
   & NDHVTIS*NCSI+NDHVSSS*NCSNEC+NDHVIIS  

! Soil water budget

  DO JVAR=1,NDHVWLS
    DO JLEV=1,YSP_SBD%NLEVS
      IDHCS=IDHCS+1
      ZDHWLS(JLEV,JVAR)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO

! Free-style variables

  IF (NDHVFS /= 0) THEN

! Set pointer

    IDHCS = NDHVS

    DO JVAR=1,NDHVFS
      IDHCS=IDHCS+1
      ZDHFSS(JVAR)=PDDHCS(IDHCS)
    ENDDO
    
  ENDIF

! FLUXES

! Set pointer

  IDHCS = NDHVS + NDHVFS

! Tiles

  DO JFLX=NDHVTLS+1,NDHVTLS+NDHFTLS
    DO JTILE=1,NTILES
      IDHCS=IDHCS+1
      ZDHTLS(JTILE,JFLX)=PDDHCS(IDHCS)
    ENDDO
  ENDDO

  IDHCS=NDHVS+NDHVFS+NDHFTLS*NTILES

! Snow energy budget

  DO JFLX=NDHVTSS+1,NDHVTSS+NDHFTSS
    DO JLEV=1,NCSNEC
      IDHCS=IDHCS+1
      ZDHTSS(JLEV,JFLX)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO

  IDHCS=NDHVS+NDHVFS+NDHFTLS*NTILES+NDHFTSS*NCSNEC

  ! Soil energy budget

  DO JFLX=NDHVTTS+1,NDHVTTS+NDHFTTS
    DO JLEV=1,YSP_SBD%NLEVS
      IDHCS=IDHCS+1
      ZDHTTS(JLEV,JFLX)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO

  IDHCS=NDHVS+NDHVFS+NDHFTLS*NTILES+NDHFTSS*NCSNEC+NDHFTTS*YSP_SBD%NLEVS

! Sea-ice energy budget

  DO JFLX=NDHVTIS+1,NDHVTIS+NDHFTIS
    DO JLEV=1,NCSI
      IDHCS=IDHCS+1
      ZDHTIS(JLEV,JFLX)=PDDHCS(IDHCS)*ZSCALEI
    ENDDO
  ENDDO

  IDHCS=NDHVS+NDHVFS+NDHFTLS*NTILES+NDHFTSS*NCSNEC+NDHFTTS*YSP_SBD%NLEVS+&
   & NDHFTIS*NCSI  

! Snow water budget

  DO JFLX=NDHVSSS+1,NDHVSSS+NDHFSSS
    DO JLEV=1,NCSNEC
      IDHCS=IDHCS+1
      ZDHSSS(JLEV,JFLX)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO

  IDHCS=NDHVS+NDHVFS+NDHFTLS*NTILES+NDHFTSS*NCSNEC+NDHFTTS*YSP_SBD%NLEVS+&
   & NDHFTIS*NCSI+NDHFSSS*NCSNEC  

! Interception layer water budget

  DO JFLX=NDHVIIS+1,NDHVIIS+NDHFIIS
    IDHCS=IDHCS+1
    ZDHIIS(JFLX)=PDDHCS(IDHCS)*ZSCALEL
  ENDDO

  IDHCS=NDHVS+NDHVFS+NDHFTLS*NTILES+NDHFTSS*NCSNEC+NDHFTTS*YSP_SBD%NLEVS+&
   & NDHFTIS*NCSI+NDHFSSS*NCSNEC+NDHFIIS  

! Soil water budget

  DO JFLX=NDHVWLS+1,NDHVWLS+NDHFWLS
    DO JLEV=1,YSP_SBD%NLEVS
      IDHCS=IDHCS+1
      ZDHWLS(JLEV,JFLX)=PDDHCS(IDHCS)*ZSCALEL
    ENDDO
  ENDDO

! Free-style fluxes
  IF (NDHFFS /= 0) THEN

! Set pointer

    IDHCS = NDHVS + NDHVFS + NDHFSD + NDHFSP

    DO JFLX=NDHVFS+1,NDHVFS+NDHFFS
      IDHCS=IDHCS+1
      ZDHFSS(JFLX)=PDDHCS(IDHCS)
    ENDDO
    
  ENDIF 

!     NORMALISATION DES DONNEES EN KG/M**2
  ZQNORM=1.E+06_JPRB
  ZERO=0.0_JPRB
!     CHALEURS LATENTES NORMALISEES
  ZLSTT=RLSTT/ZQNORM
  ZLVTT=RLVTT/ZQNORM
  ZLFTT=RLMLT/ZQNORM

  WRITE (NULOUT,*) ' DDH *** WARNING ',&
   & ' LINES STARTING WITH  -- OF WHICH -- DO NOT   '  
  WRITE (NULOUT,*) ' ENTER THE BUDGETS: THEY ARE',&
   & ' A DECOMPOSITION OF THE PRECEDING VALUES'  
  WRITE (NULOUT,*) ' '

!*    TABLEAU-BILAN DE REFERENCE.

  WRITE (NULOUT,*) ' '
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5032)
  WRITE (NULOUT,5033) CLDOM
  WRITE (NULOUT,5032)
  WRITE (NULOUT,5034) ZHEURE, ZLFRAC*100._JPRB
  WRITE (NULOUT,5035)
  WRITE (NULOUT,5037) '            ','            ',&
   & '           ','            ','            ','           ',&
   & '           ','           ','           '  
  WRITE (CL10C,'(''SUB='',F6.4)') ZLSTT
  WRITE (NULOUT,5036)&
   & '             '&
   & ,CL10C&
   & ,'  ENTHALPY  '&
   & ,'  KINETIC   '&
   & ,'  MASS OF   '&
   & ,'  ENERGY    '&
   & ,'  ENERGY    '&
   & ,'  ENERGY    '&
   & ,'    SNOW     '&
   & ,'   WATER   '&
   & ,'   WATER   '  
  WRITE (CL10C,'(''VAP='',F6.4)') ZLVTT
  WRITE (NULOUT,5036)&
   & 'LATENT HEAT  '&
   & ,CL10C&
   & ,'            '&
   & ,'  ENERGY    '&
   & ,'   WATER    '&
   & ,'   SNOW     '&
   & ,' TOP LAYER  '&
   & ,'DEEP LAYERS '&
   & ,'             '&
   & ,'INT.+TOP L.'&
   & ,'DEEP LAYERS'  
  WRITE (CL10C,'(''FUS='',F6.4)') ZLFTT
  WRITE (NULOUT,5036)&
   & '             '&
   & ,CL10C&
   & ,'            '&
   & ,'            '&
   & ,' (10**(-6) '&
   & ,'            '&
   & ,'            '&
   & ,'            '&
   & ,' (10**(-6)   '&
   & ,' (10**(-6) '&
   & ,' (10**(-6) '  
  WRITE (NULOUT,5037)&
   & '  (J/M**2)  '&
   & ,'  (J/M**2)  '&
   & ,'  KG/M**2)  '&
   & ,'  (J/M**2)  '&
   & ,'  (J/M**2)  '&
   & ,'  (J/M**2)  '&
   & ,'  KG/M**2)   '&
   & ,'  KG/M**2) '&
   & ,'  KG/M**2) '  
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5062)&
   & '   Initial Values       '&
   & ,ZCT0   &
   & ,ZKK0   &
   & ,ZQNORM*ZQV0   &
   & ,ZDHTSS0(1,3)&
   & ,ZDHTTS0(1,3)&
   & ,ZDHTTS0(2,3)+ZDHTTS0(3,3)+ZDHTTS0(4,3)&
   & ,ZQNORM*ZDHSSS0(1,1)&
   & ,ZQNORM*(ZDHIIS0(1)+ZDHWLS0(1,1))&
   & ,ZQNORM*(ZDHWLS0(2,1)+ZDHWLS0(3,1)+ZDHWLS0(4,1))  
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5062)&
   & '   Current Values       '&
   & ,ZCT1    &
   & ,ZKK1    &
   & ,ZQNORM*ZQV1   &
   & ,ZDHTSS(1,3)&
   & ,ZDHTTS(1,3)&
   & ,ZDHTTS(2,3)+ZDHTTS(3,3)+ZDHTTS(4,3)&
   & ,ZQNORM*ZDHSSS(1,1)&
   & ,ZQNORM*(ZDHIIS(1)+ZDHWLS(1,1))&
   & ,ZQNORM*(ZDHWLS(2,1)+ZDHWLS(3,1)+ZDHWLS(4,1))  
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5037)&
   & '            '&
   & ,'            '&
   & ,' (10**(-6)  '&
   & ,'            '&
   & ,'            '&
   & ,'            '&
   & ,' (10**(-6)  '&
   & ,' (10**(-6) '&
   & ,' (10**(-6) '  
  WRITE (NULOUT,5037)&
   & '  (W/M**2)  '&
   & ,'  (W/M**2)  '&
   & ,' KG/M**2/S) '&
   & ,'  (W/M**2)  '&
   & ,'  (W/M**2)  '&
   & ,'  (W/M**2)  '&
   & ,' KG/M**2/S) '&
   & ,' KG/M**2/S)'&
   & ,' KG/M**2/S)'  
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5038) &
   & '   Mean Flux            '&
   & ,(ZCT1-ZCT0)*ZUSSSS &
   & ,(ZKK1-ZKK0)*ZUSSSS &
   & ,ZQNORM*(ZQV1-ZQV0)*ZUSSSS &
   & ,(ZDHTSS(1,7)+ZDHTSS(1,8)+ZDHTSS(1,9)+ZDHTSS(1,10)+ZDHTSS(1,11) &
   & +ZDHTSS(1,12)-ZDHTSS(1,13)+ZDHTSS(1,14))*ZUSSSS &
   & ,(ZDHTTS(1,5)+ZDHTTS(1,6)+ZDHTTS(1,7)+ZDHTTS(1,8)+ZDHTTS(1,9) &
   & +ZDHTTS(1,10)-ZDHTTS(1,11)+ZDHTTS(1,12)+ZDHTTS(1,13))*ZUSSSS &
   & ,(ZDHTTS(1,11)+ZDHTTS(2,12)+ZDHTTS(3,12)+ZDHTTS(4,12))*ZUSSSS &
   & ,(ZDHSSS(1,2)+ZDHSSS(1,3)+ZDHSSS(1,4)+ZDHSSS(1,5)) &
   & *ZQNORM*ZUSSSS &
   & ,(ZDHIIS(2)+ZDHIIS(3)+ZDHIIS(4))*ZQNORM*ZUSSSS &
   & +(ZDHWLS(1,3)+ZDHWLS(1,4)+ZDHWLS(1,5)+ZDHWLS(1,6)+ZDHWLS(1,7) &
   & -ZDHWLS(1,8))*ZQNORM*ZUSSSS &
   & ,(ZDHWLS(2,6)+ZDHWLS(3,6)+ZDHWLS(4,6)+ZDHWLS(2,7)+ZDHWLS(3,7) &
   & +ZDHWLS(4,7)+ZDHWLS(1,8))*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3,1)+ZDHWLS(4,1)-ZDHWLS0(2,1)-ZDHWLS0(3,1) &
   & -ZDHWLS0(4,1))*ZQNORM*ZUSSSS &
   & -(ZDHWLS(2,6)+ZDHWLS(3,6)+ZDHWLS(4,6)+ZDHWLS(2,7)+ZDHWLS(3,7) &
   & +ZDHWLS(4,7)+ZDHWLS(1,8))*ZQNORM*ZUSSSS  
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5042)&
   & '    I TOA Shortwave     '&
   & ,ZCTRAS0*ZUSSSS  
  WRITE (NULOUT,5042)&
   & ' RAD- TOA Longwave      '&
   & ,ZCTRAT0*ZUSSSS  
  WRITE (NULOUT,5050) &
   & '    I Surface Shortwave '&
   & ,-ZCTRASS*ZUSSSS &
   & ,(ZDHTSS(1,7)+ZDHTSS(1,8))*ZUSSSS &
   & ,(ZDHTTS(1,5)+ZDHTTS(1,6))*ZUSSSS   
  WRITE (NULOUT,5050)&
   & '    I Surface Longwave  '&
   & ,-ZCTRATS*ZUSSSS &
   & ,(ZDHTSS(1,9)+ZDHTSS(1,10))*ZUSSSS &
   & ,(ZDHTTS(1,7)+ZDHTTS(1,8))*ZUSSSS  
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5040)&
   & '    I Dissipation       '&
   & ,-ZKKDIT*ZUSSSS &
   & ,ZKKDIT*ZUSSSS  
  WRITE (NULOUT,5050)&
   & ' TUR- Sensible heat     '&
   & ,ZCTFT*ZUSSSS &
   & ,ZDHTSS(1,11)*ZUSSSS &
   & ,ZDHTTS(1,9)*ZUSSSS   
  WRITE (NULOUT,5052)&
   & '    I Latent heat       '&
   & ,ZQNORM*ZQVFT*ZUSSSS &
   & ,ZDHTSS(1,12)*ZUSSSS &
   & ,ZDHTTS(1,10)*ZUSSSS &
   & ,ZDHSSS(1,4)*ZQNORM*ZUSSSS &
   & ,(ZDHIIS(4)+ZDHWLS(1,7))*ZQNORM*ZUSSSS &
   & ,(ZDHWLS(2,7)+ZDHWLS(3,7)+ZDHWLS(4,7))*ZQNORM*ZUSSSS   
  WRITE (NULOUT,5041)&
   & '    I of which neg. q is'&
   & ,ZQVFNG*ZQNORM*ZUSSSS  
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5043)&
   & '     I Transport        '&
   & ,ZCTFTC*ZUSSSS  &
   & ,ZQNORM*ZQVFTC*ZUSSSS  
  WRITE (NULOUT,5040)&
   & '     I Dissipation      '&
   & ,-ZKKDIC*ZUSSSS &
   & ,ZKKDIC*ZUSSSS  
  WRITE (NULOUT,5053)&
   & ' CONV- Rain             '&
   & ,ZCTPCL*ZUSSSS &
   & ,ZQTPCL*ZQNORM*ZUSSSS &
   & ,(ZDHIIS(3)+ZDHWLS(1,4))*ZQNORM*ZUSSSS  
  WRITE (NULOUT,5054)&
   & '     I Snow             '&
   & ,ZCTPCN*ZUSSSS &
   & ,ZQTPCN*ZQNORM*ZUSSSS &
   & ,ZDHSSS(1,3)*ZQNORM*ZUSSSS  
  IF(LHDADD) THEN
    WRITE (NULOUT,5060)&
     & '     I  of which        '  
    WRITE (NULOUT,5043)&
     & '     I  Formation rain  '&
     & ,ZCTPCLF*ZUSSSS &
     & ,ZQTPCLF*ZQNORM*ZUSSSS  
    WRITE (NULOUT,5043)&
     & '     I  Evaporation rain'&
     & ,ZCTPCLE*ZUSSSS &
     & ,ZQTPCLE*ZQNORM*ZUSSSS  
    WRITE (NULOUT,5043)&
     & '     I  Formation snow  '&
     & ,ZCTPCNF*ZUSSSS &
     & ,ZQTPCNF*ZQNORM*ZUSSSS  
    WRITE (NULOUT,5043)&
     & '     I  Sublimation snow'&
     & ,ZCTPCNE*ZUSSSS &
     & ,ZQTPCNE*ZQNORM*ZUSSSS  
    WRITE (NULOUT,5043)&
     & '     I  Melting         '&
     & ,ZCTCFON*ZUSSSS &
     & ,ZQVCFON*ZQNORM*ZUSSSS  
  ENDIF
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5053)&
   & ' STR.I Rain             '&
   & ,ZCTPSL*ZUSSSS &
   & ,ZQTPSL*ZQNORM*ZUSSSS &
   & ,(ZDHIIS(2)+ZDHWLS(1,3))*ZQNORM*ZUSSSS  
  WRITE (NULOUT,5054)&
   & ' PRE.I Snow             '&
   & ,ZCTPSN*ZUSSSS &
   & ,ZQTPSN*ZQNORM*ZUSSSS &
   & ,ZDHSSS(1,2)*ZQNORM*ZUSSSS  
  IF(LHDADD) THEN
    WRITE (NULOUT,5060)&
     & '     I  of which        '  
    WRITE (NULOUT,5043)&
     & '     I  Formation rain  '&
     & ,ZCTPSLF*ZUSSSS &
     & ,ZQTPSLF*ZQNORM*ZUSSSS  
    WRITE (NULOUT,5043)&
     & '     I  Evaporation rain'&
     & ,ZCTPSLE*ZUSSSS &
     & ,ZQTPSLE*ZQNORM*ZUSSSS  
    WRITE (NULOUT,5043)&
     & '     I  Formation snow  '&
     & ,ZCTPSNF*ZUSSSS &
     & ,ZQTPSNF*ZQNORM*ZUSSSS  
    WRITE (NULOUT,5043)&
     & '     I  Sublimation snow'&
     & ,ZCTPSNE*ZUSSSS &
     & ,ZQTPSNE*ZQNORM*ZUSSSS  
    WRITE (NULOUT,5043)&
     & '     I  Melting         '&
     & ,ZCTSFON*ZUSSSS &
     & ,ZQVSFON*ZQNORM*ZUSSSS  
  ENDIF
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5040)&
   & ' Orographic drag        '&
   & ,-ZKKDID*ZUSSSS &
   & ,ZKKDID*ZUSSSS  
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5045)&
   & '    I Soil exchanges    '&
   & ,-ZDHTSS(1,13)*ZUSSSS &
   & ,(ZDHTTS(1,13)-ZDHTTS(1,11))*ZUSSSS &
   & ,ZDHTTS(1,11)*ZUSSSS &
   & ,-ZDHWLS(1,8)*ZQNORM*ZUSSSS &
   & ,ZDHWLS(1,8)*ZQNORM*ZUSSSS  
  WRITE (NULOUT,5046)&
   & 'SOIL- Phase changes     '&
   & ,ZDHTSS(1,14)*ZUSSSS &
   & ,ZDHTTS(1,12)*ZUSSSS &
   & ,(ZDHTTS(2,12)+ZDHTTS(3,12)+ZDHTTS(4,12))*ZUSSSS &
   & ,ZDHSSS(1,5)*ZQNORM*ZUSSSS&
   & ,ZDHWLS(1,5)*ZQNORM*ZUSSSS  
  WRITE (NULOUT,5047)&
   & '    I Runoff            '&
   & ,ZDHWLS(1,6)*ZQNORM*ZUSSSS &
   & ,(ZDHWLS(2,6)+ZDHWLS(3,6)+ZDHWLS(4,6))*ZQNORM*ZUSSSS  
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5044)&
   & ' Adiabatic  I Pr.F. Work'&
   & ,ZKKCOV*ZUSSSS  
  WRITE (NULOUT,5042)&
   & ' Conversion - Internal  '&
   & ,(ZCTCOV+ZCTCOP)*ZUSSSS  
  WRITE (NULOUT,5060)&
   & '       ---- and ---     '  
  WRITE (CL24C,'(1X,A10,1X,F11.5,1X)')&
   & 'H Flux PE='&
   & ,-ZEPDH*ZUSSSS  
  WRITE (NULOUT,5060) CL24C
  WRITE (CL24C,'(1X,A10,1X,F11.5,1X)')&
   & 'V Flux PE='&
   & ,-ZEPFD*ZUSSSS  
  WRITE (NULOUT,5060) CL24C
  WRITE (CL24C,'(4X,E15.8,5X)') ZBCOV*ZUSSSS
  WRITE (NULOUT,5060)&
   & '  (Balance: )           '  
  WRITE (NULOUT,5060) CL24C
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5039)&
   & ' Dyn. Hor. transport    '&
   & ,ZCTDH*ZUSSSS &
   & ,ZKKDH*ZUSSSS &
   & ,ZQVDH*ZQNORM*ZUSSSS  
  WRITE (NULOUT,5030)
  WRITE (NULOUT,5039)&
   & ' Dyn. Vert. transport   '&
   & ,ZCTFD*ZUSSSS &
   & ,ZKKFD*ZUSSSS &
   & ,ZQVFD*ZQNORM*ZUSSSS  
  WRITE (NULOUT,5039)&
   & ' Preciptitation         '&
   & ,ZERO*ZUSSSS &
   & ,ZKKFDM*ZUSSSS &
   & ,ZERO*ZQNORM*ZUSSSS  
  WRITE (NULOUT,5030)

!*    TABLEAU-BILAN ATMOSPHERE.

  WRITE(NULOUT,6000)
  WRITE(NULOUT,6010)
  WRITE(NULOUT,'(A,F11.3,3A,25X,A)')&
   & 'I TIME =',ZHEURE,'H '&
   & ,'DDH * Atmospheric Balance, Area    ',CLDOM,'I'  
  WRITE(NULOUT,6010)
  WRITE(NULOUT,6030)
  WRITE(NULOUT,'(20A)')&
   & 'I                       '&
   & ,'II','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              ',' I'  
  WRITE(NULOUT,'(A,F6.4,11A)')&
   & 'I             SUB=',ZLSTT &
   & ,'II','   ENTHALPY   '&
   & ,'I','   KINETIC    '&
   & ,'I','    WATER     '&
   & ,'I','    LIQUID    '&
   & ,'I','     ICE      ',' I'  
  WRITE(NULOUT,'(A,F6.4,11A)')&
   & 'I CHALEUR LAT VAP=',ZLVTT &
   & ,'II','              '&
   & ,'I','    ENERGY    '&
   & ,'I','    VAPOUR    '&
   & ,'I','    WATER     '&
   & ,'I','              ',' I'  
  WRITE(NULOUT,'(A,F6.4,11A)')&
   & 'I             FUS=',ZLFTT &
   & ,'II','              '&
   & ,'I','              '&
   & ,'I','  (10**(-6)   '&
   & ,'I','  (10**(-6)   '&
   & ,'I','  (10**(-6)   ',' I'  
  WRITE(NULOUT,'(20A)')&
   & 'I                       '&
   & ,'II','  (J/M**2)    '&
   & ,'I','  (J/M**2)    '&
   & ,'I','   KG/M**2)   '&
   & ,'I','   KG/M**2)   '&
   & ,'I','   KG/M**2)   ',' I'  
  WRITE(NULOUT,6000)
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,5(2A,F11.0,A),A)')&
   & 'I   Inital Values       '&
   & ,'II','  ',ZCT0,' '&
   & ,'I','  ',ZKK0,' '&
   & ,'I','  ',ZQV0*ZQNORM,' '&
   & ,'I','  ',ZQL0*ZQNORM,' '&
   & ,'I','  ',ZQN0*ZQNORM,' ',' I'  
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,5(2A,F11.0,A),A)')&
   & 'I   Current Values      '&
   & ,'II','  ',ZCT1,' '&
   & ,'I','  ',ZKK1,' '&
   & ,'I','  ',ZQV1*ZQNORM,' '&
   & ,'I','  ',ZQL1*ZQNORM,' '&
   & ,'I','  ',ZQN1*ZQNORM,' ',' I'  
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(20A)')&
   & 'I                       '&
   & ,'II','              '&
   & ,'I','              '&
   & ,'I','  (10**(-6)   '&
   & ,'I','  (10**(-6)   '&
   & ,'I','  (10**(-6)   '&
   & ,' I'  
  WRITE(NULOUT,'(20A)')&
   & 'I                       '&
   & ,'II','   (W/M**2)   '&
   & ,'I','   (W/M**2)   '&
   & ,'I','  KG/M**2/S)  '&
   & ,'I','  KG/M**2/S)  '&
   & ,'I','  KG/M**2/S)  '&
   & ,' I'  
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,5(2A,F11.5,A),A)')&
   & 'I   Mean Flux           '&
   & ,'II','  ',(ZCT1-ZCT0)*ZUSSSS,' '&
   & ,'I','  ',(ZKK1-ZKK0)*ZUSSSS,' '&
   & ,'I','  ',ZQNORM*(ZQV1-ZQV0)*ZUSSSS,' '&
   & ,'I','  ',ZQNORM*(ZQL1-ZQL0)*ZUSSSS,' '&
   & ,'I','  ',ZQNORM*(ZQN1-ZQN0)*ZUSSSS,' '&
   & ,' I'  
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,5(2A,F11.5,A),A)')&
   & 'I   Residual terms      '&
   & ,'II','  ',ZBCT*ZUSSSS,' '&
   & ,'I','  ',ZBKK*ZUSSSS,' '&
   & ,'I','  ',ZQNORM*ZBQV*ZUSSSS,' '&
   & ,'I','  ',ZQNORM*ZBQL*ZUSSSS,' '&
   & ,'I','  ',ZQNORM*ZBQN*ZUSSSS,' '&
   & ,' I'  
  WRITE(NULOUT,6000)
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,(2A,F11.5,A),4(2A),A)')&
   & 'I    I TOA Shortwave    '&
   & ,'II','  ',ZCTRAS0*ZUSSSS,' '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,' I'  
  WRITE(NULOUT,'(A,(2A,F11.5,A),4(2A),A)')&
   & 'I RAD- TOA Longwave     '&
   & ,'II','  ',ZCTRAT0*ZUSSSS,' '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,' I'  
  WRITE(NULOUT,'(A,(2A,F11.5,A),4(2A),A)')&
   & 'I    I Surface shortwave'&
   & ,'II','  ',-ZCTRASS*ZUSSSS,' '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,' I'  
  WRITE(NULOUT,'(A,(2A,F11.5,A),4(2A),A)')&
   & 'I    I Surface longwave '&
   & ,'II','  ',-ZCTRATS*ZUSSSS,' '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,' I'  
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,2(2A,F11.5,A),3(2A),A)')&
   & 'I     I Dissipation     '&
   & ,'II','  ',-ZKKDIT*ZUSSSS,' '&
   & ,'I','  ',ZKKDIT*ZUSSSS,' '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,' I'  
  WRITE(NULOUT,'(A,(2A,F11.5,A),4(2A),A)')&
   & 'I  TUR- Sensible heat   '&
   & ,'II','  ',ZCTFT*ZUSSSS,' '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,'I','              '&
   & ,' I'  
  WRITE(NULOUT,'(5A,(2A,F11.5,A),2(2A),A)')&
   & 'I     I Latent heat     '&
   & ,'II','              '&
   & ,'I','              '&
   & ,'I','  ',ZQNORM*ZQVFT*ZUSSSS,' '&
   & ,'I','              '&
   & ,'I','              '&
   & ,' I'  
  WRITE(NULOUT,'(5A,3(2A,F11.5,A),A)')&
   & 'I     Iof which neg q is'&
   & ,'II','              '&
   & ,'I','              '&
   & ,'I','  ',ZQNORM*ZQVFNG*ZUSSSS,' '&
   & ,'I','  ',ZQNORM*ZQLFNG*ZUSSSS,' '&
   & ,'I','  ',ZQNORM*ZQNFNG*ZUSSSS,' '&
   & ,' I'  
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,(A,F11.5,A),A,3(A,F11.5,A),A)')&
   & 'I     I Transport       '&
   & ,'II  ',ZCTFTC*ZUSSSS,' '&
   & ,'I              '&
   & ,'I  ',ZQNORM*ZQVFTC*ZUSSSS,' '&
   & ,'I  ',ZQNORM*ZQLFTC*ZUSSSS,' '&
   & ,'I  ',ZQNORM*ZQNFTC*ZUSSSS,' '&
   & ,' I'  
  WRITE(NULOUT,'(A,2(A,F11.5,A),4A)')&
   & 'I     I Dissipation     '&
   & ,'II  ',-ZKKDIC*ZUSSSS,' '&
   & ,'I  ',ZKKDIC*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,'(A,(2A,F11.5,A),2A,2(2A,F11.5,A),2A,A)')&
   & 'I CONV- Cond. Water     '&
   & ,'II','  ',ZCTPCL*ZUSSSS,' '&
   & ,'I','              '&
   & ,'I','  ',ZQNORM*ZQTCCL*ZUSSSS,' '&
   & ,'I','  ',-ZQNORM*ZQTCCL*ZUSSSS,' '&
   & ,'I','              '&
   & ,' I'  
  WRITE(NULOUT,'(4A,(A,F11.5,A),2A)')&
   & 'I     I Rain            '&
   & ,'II              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I  ',ZQNORM*ZQTPCL*ZUSSSS,' '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,'(A,3((A,F11.5,A),A))')&
   & 'I     I Cond. Ice       '&
   & ,'II  ',ZCTPCN*ZUSSSS,' '&
   & ,'I              '&
   & ,'I  ',ZQNORM*ZQTCCN*ZUSSSS,' '&
   & ,'I              '&
   & ,'I  ',-ZQNORM*ZQTCCN*ZUSSSS,' '&
   & ,' I'  
  WRITE(NULOUT,'(5A,(A,F11.5,A),A)')&
   & 'I     I Snow            '&
   & ,'II              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I  ',ZQNORM*ZQTPCN*ZUSSSS,' '&
   & ,' I'  
  WRITE(NULOUT,'(A,(A,F11.5,A),5A)')&
   & 'I     I Sens. heat rain '&
   & ,'II  ',ZCTCCL*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,'(A,(A,F11.5,A),5A)')&
   & 'I     I Sens. heat snow '&
   & ,'II  ',ZCTCCN*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  IF(LHDADD) THEN
    WRITE(NULOUT,'(20A)')&
     & 'I     I  of which       '&
     & ,'II','              '&
     & ,'I','              '&
     & ,'I','              '&
     & ,'I','              '&
     & ,'I','              '&
     & ,' I'  
    WRITE(NULOUT,'(A,(A,F11.5,A),A,(A,F11.5,A),3A)')&
     & 'I     I Formation rain  '&
     & ,'II  ',ZCTPCLF*ZUSSSS,' '&
     & ,'I              '&
     & ,'I  ',ZQNORM*ZQTPCLF*ZUSSSS,' '&
     & ,'I              '&
     & ,'I              '&
     & ,' I'  
    WRITE(NULOUT,'(A,(A,F11.5,A),A,(A,F11.5,A),3A)')&
     & 'I     I Evaporation rain'&
     & ,'II  ',ZCTPCLE*ZUSSSS,' '&
     & ,'I              '&
     & ,'I  ',ZQNORM*ZQTPCLE*ZUSSSS,' '&
     & ,'I              '&
     & ,'I              '&
     & ,' I'  
    WRITE(NULOUT,'(A,(A,F11.5,A),A,(A,F11.5,A),3A)')&
     & 'I     I Formation Snow  '&
     & ,'II  ',ZCTPCNF*ZUSSSS,' '&
     & ,'I              '&
     & ,'I  ',ZQNORM*ZQTPCNF*ZUSSSS,' '&
     & ,'I              '&
     & ,'I              '&
     & ,' I'  
    WRITE(NULOUT,'(A,(A,F11.5,A),A,(A,F11.5,A),3A)')&
     & 'I     I Sublimation snow'&
     & ,'II  ',ZCTPCNE*ZUSSSS,' '&
     & ,'I              '&
     & ,'I  ',ZQNORM*ZQTPCNE*ZUSSSS,' '&
     & ,'I              '&
     & ,'I              '&
     & ,' I'  
    WRITE(NULOUT,'(A,(A,F11.5,A),A,(A,F11.5,A),3A)')&
     & 'I     I Melting         '&
     & ,'II  ',ZCTCFON*ZUSSSS,' '&
     & ,'I              '&
     & ,'I  ',ZQNORM*ZQVCFON*ZUSSSS,' '&
     & ,'I              '&
     & ,'I              '&
     & ,' I'  
  ENDIF
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,(2A,F11.5,A),2A,2(2A,F11.5,A),2A,A)')&
   & 'I     I Cond. Water     '&
   & ,'II','  ',ZCTPSL*ZUSSSS,' '&
   & ,'I','              '&
   & ,'I','  ',ZQNORM*ZQTCSL*ZUSSSS,' '&
   & ,'I','  ',-ZQNORM*ZQTCSL*ZUSSSS,' '&
   & ,'I','              '&
   & ,' I'  
  WRITE(NULOUT,'(4A,(A,F11.5,A),2A)')&
   & 'I STRA- Rain            '&
   & ,'II              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I  ',ZQNORM*ZQTPSL*ZUSSSS,' '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,'(A,3((A,F11.5,A),A))')&
   & 'I     I Cond. Ice       '&
   & ,'II  ',ZCTPSN*ZUSSSS,' '&
   & ,'I              '&
   & ,'I  ',ZQNORM*ZQTCSN*ZUSSSS,' '&
   & ,'I              '&
   & ,'I  ',-ZQNORM*ZQTCSN*ZUSSSS,' '&
   & ,' I'  
  WRITE(NULOUT,'(5A,(A,F11.5,A),A)')&
   & 'I     I Snow            '&
   & ,'II              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I  ',ZQNORM*ZQTPSN*ZUSSSS,' '&
   & ,' I'  
  WRITE(NULOUT,'(A,(A,F11.5,A),5A)')&
   & 'I     I Sens. heat rain '&
   & ,'II  ',ZCTCSL*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,'(A,(A,F11.5,A),5A)')&
   & 'I     I Sens. heat snow '&
   & ,'II  ',ZCTCSN*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  IF(LHDADD) THEN
    WRITE(NULOUT,'(20A)')&
     & 'I     I  of which       '&
     & ,'II','              '&
     & ,'I','              '&
     & ,'I','              '&
     & ,'I','              '&
     & ,'I','              '&
     & ,' I'  
    WRITE(NULOUT,'(A,(A,F11.5,A),A,(A,F11.5,A),3A)')&
     & 'I     I Formation Rain  '&
     & ,'II  ',ZCTPSLF*ZUSSSS,' '&
     & ,'I              '&
     & ,'I  ',ZQNORM*ZQTPSLF*ZUSSSS,' '&
     & ,'I              '&
     & ,'I              '&
     & ,' I'  
    WRITE(NULOUT,'(A,(A,F11.5,A),A,(A,F11.5,A),3A)')&
     & 'I     I Evaporation Rain'&
     & ,'II  ',ZCTPSLE*ZUSSSS,' '&
     & ,'I              '&
     & ,'I  ',ZQNORM*ZQTPSLE*ZUSSSS,' '&
     & ,'I              '&
     & ,'I              '&
     & ,' I'  
    WRITE(NULOUT,'(A,(A,F11.5,A),A,(A,F11.5,A),3A)')&
     & 'I     I Formation Snow  '&
     & ,'II  ',ZCTPSNF*ZUSSSS,' '&
     & ,'I              '&
     & ,'I  ',ZQNORM*ZQTPSNF*ZUSSSS,' '&
     & ,'I              '&
     & ,'I              '&
     & ,' I'  
    WRITE(NULOUT,'(A,(A,F11.5,A),A,(A,F11.5,A),3A)')&
     & 'I     I Sublimation snow'&
     & ,'II  ',ZCTPSNE*ZUSSSS,' '&
     & ,'I              '&
     & ,'I  ',ZQNORM*ZQTPSNE*ZUSSSS,' '&
     & ,'I              '&
     & ,'I              '&
     & ,' I'  
    WRITE(NULOUT,'(A,(A,F11.5,A),A,(A,F11.5,A),3A)')&
     & 'I     I Melting         '&
     & ,'II  ',ZCTSFON*ZUSSSS,' '&
     & ,'I              '&
     & ,'I  ',ZQNORM*ZQVSFON*ZUSSSS,' '&
     & ,'I              '&
     & ,'I              '&
     & ,' I'  
  ENDIF
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,2(A,F11.5,A),4A)')&
   & 'I PREC- Pot. and kin. E.'&
   & ,'II  ',ZCTCOP*ZUSSSS,' '&
   & ,'I  ',ZKKFDM*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,2(A,F11.5,A),5A)')&
   & 'I   Orographic drag     '&
   & ,'II  ',-ZKKDID*ZUSSSS,' '&
   & ,'I  ',ZKKDID*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,(A,F11.5,A),5A)')&
   & 'I      I Balance        '&
   & ,'II  ',ZBCOV*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,'(7A)')&
   & 'I ADIAB- of which       '&
   & ,'II              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,'(A,(A,F11.5,A),5A)')&
   & 'I      I Hor. Flux of PE'&
   & ,'II  ',-ZEPDH*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,'(A,(A,F11.5,A),5A)')&
   & 'I      I Vert.Flux of PE'&
   & ,'II  ',-ZEPFD*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,'(2A,1(A,F11.5,A),4A)')&
   & 'I      I Work Pres.G.F  '&
   & ,'II              '&
   & ,'I  ',ZKKCOV*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,'(A,(A,F11.5,A),5A)')&
   & 'I      I Conv. Ad.-Int. '&
   & ,'II  ',ZCTCOV*ZUSSSS,' '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,'I              '&
   & ,' I'  
  WRITE(NULOUT,6000)
  WRITE(NULOUT,'(A,5(A,F11.5,A),A)')&
   & 'I DYN- Horizont. Flux   '&
   & ,'II  ',ZCTDH*ZUSSSS,' '&
   & ,'I  ',ZKKDH*ZUSSSS,' '&
   & ,'I  ',ZQNORM*ZQVDH*ZUSSSS,' '&
   & ,'I  ',ZQNORM*ZQLDH*ZUSSSS,' '&
   & ,'I  ',ZQNORM*ZQNDH*ZUSSSS,' '&
   & ,' I'  
  WRITE(NULOUT,'(A,5(A,F11.5,A),A)')&
   & 'I    I Vertical Flux    '&
   & ,'II  ',ZCTFD*ZUSSSS,' '&
   & ,'I  ',ZKKFD*ZUSSSS*ZUSSSS,' '&
   & ,'I  ',ZQNORM*ZQVFD*ZUSSSS,' '&
   & ,'I  ',ZQNORM*ZQLFD*ZUSSSS,' '&
   & ,'I  ',ZQNORM*ZQNFD*ZUSSSS,' '&
   & ,' I'  
  WRITE(NULOUT,6000)

!     - LIGNE DE SEPARATION
  6000 FORMAT ('DDH',98('-'),'I')
!     - LIGNE BLANCHE
  6010 FORMAT ('I',100X,'I')
!     - LIGNE DOMAINE
!     - LIGNE PARTIELLE
  6030 FORMAT ('I',23X,'II',75('-'),'I')

!    -------------------------
!*    TABLEAU-BILAN DE MASSE.
!    -------------------------

  WRITE (NULOUT,*) ' '
  WRITE (NULOUT,5029)
  WRITE (NULOUT,*) ' I   - Mass balance   ',' (10**(-6)  KG/M**2) '
  WRITE (NULOUT,*) ' '
  WRITE (NULOUT,5020) ZMNORM*ZMAR0, ZMNORM*ZMARDH,&
   & ZMNORM*ZMARFD0, ZMNORM*ZMARFDS, ZMNORM*ZMARFP0,&
   & ZMNORM*ZMARFPS, ZMNORM*ZMAR1, ZMNORM*ZBMAR  

!    -------------------------------------------------------
!*    TABLEAU-VARIABLES DIAGNOSTIQUES INITIALES ET FINALES.
!    -------------------------------------------------------

  WRITE(NULOUT,'(A)') ' '
  WRITE(NULOUT,'(A,72(''-''))') 'DDH'
  WRITE(NULOUT,'(A,73X,A)') 'I','I'
  WRITE(NULOUT,'(A,F11.3,3A,1X,A)')&
   & 'I TIME =',ZHEURE,'H '&
   & ,'DDH * Diagnostic Var.,    AREA  ',CLDOM,'I'  
  WRITE(NULOUT,'(A,73X,A)') 'I','I'
  WRITE(NULOUT,'(A,73(''-''),A)') 'I','I'
  WRITE(NULOUT,'(3A)')&
   & 'I   VARIABLE   I      Initial value         I'&
   & ,'        Current value        I'  
  WRITE(NULOUT,'(A,73(''-''),A)') 'I','I'

!     VITESSE VERTICALE EN COORDONNEE PRESSION.

  IDHCV=0
  ZOM0=ZDHIV(IDHCV+10+NHDQLNVA+NHDPASVA)/ZDHIV(IDHCV+1)
  IDHCV=NDHCV
  ZOM1=ZDHIV(IDHCV+10+NHDQLNVA+NHDPASVA)/ZDHIV(IDHCV+1)
  WRITE(NULOUT,'(A,2(E17.10,A))')&
   & 'I  OMEGA (P/S) I     ',ZOM0,'      I      '&
   & ,ZOM1,'      I'  

!     NEBULOSITE TOTALE LOCALE.

  IDHCV=0
  ZNT0=ZDHIV(IDHCV+9+NHDQLNVA+NHDPASVA)/ZDHIV(IDHCV+1)
  IDHCV=NDHCV
  ZNT1=ZDHIV(IDHCV+9+NHDQLNVA+NHDPASVA)/ZDHIV(IDHCV+1)
  WRITE(NULOUT,'(A,2(E17.10,A))')&
   & 'ICloud fractionI     ',ZNT0,'      I      '&
   & ,ZNT1,'      I'  

!     HUMIDITE RELATIVE.

  IDHCV=0
  ZHR0=ZDHIV(IDHCV+8)/ZDHIV(IDHCV+1)
  IDHCV=NDHCV
  ZHR1=ZDHIV(IDHCV+8)/ZDHIV(IDHCV+1)
  WRITE(NULOUT,'(A,2(E17.10,A))')&
   & 'I  Relat. Hum. I     ',ZHR0,'      I      '&
   & ,ZHR1,'      I'  

!     VARIABLES PASSIVES.

  IF(LHDPAS) THEN
    DO JJPASS=1,NHDPASVA
      IDHCV=0
      ZPASS0=ZDHIV(IDHCV+9+NHDQLNVA+JJPASS-1)
      IDHCV=NDHCV
      ZPASS1=ZDHIV(IDHCV+9+NHDQLNVA+JJPASS-1)
      WRITE(NULOUT,'(A,I2.2,A,2(E17.10,A))')&
       & 'I  PASS ',JJPASS,'     I     ',ZPASS0,'      I      '&
       & ,ZPASS1,'      I'  
    ENDDO
  ENDIF
  WRITE(NULOUT,'(A,72(''-''))') 'DDH'
  WRITE(NULOUT,*) ' '

!    -------------------------------------------------------
!*  Diagnostics for tracers
!    -------------------------------------------------------

! Aerosols
  IF(NACTAERO > 0 ) THEN
    WRITE(NULOUT,'(A)') ' '
    WRITE(NULOUT,'(A,137(''-''),A)') 'DDH','I'
    WRITE(NULOUT,'(A,139X,A)') 'I','I'
    WRITE(NULOUT,'(A,F11.3,3A,1X,A)')&
     & 'I TIME =',ZHEURE,'H '&
     & ,'DDH * Prognostic Aerosols               AREA                  ',&
     &CLDOM,'                                    I'
    WRITE(NULOUT,'(A,139X,A)') 'I','I'
    WRITE(NULOUT,'(A,139(''-''),A)') 'I','I'
    WRITE(NULOUT,'(3A)')&
     & 'I        VAR       I      INITIAL MASS (ATM)     I'&
     & ,'      CURRENT MASS (ATM)      I     CURRENT - INITIAL       I'&
     & ,'   INJECTED MASS (SURF)      I'
    WRITE(NULOUT,'(A,139(''-''),A)') 'I','I'

!-- mixing ratios
    IDHCS=NDHVS + NDHVFS + NDHFSD + NDHFSP + NFSFLX_AERO - 1
    DO JVAR=1,NACTAERO
      ISAERO=NFSVAR_AERO -1+JVAR
      ZNT0=PDDHFSVI(ISAERO)
      ZNT1=PDDHCS(NDHVS + ISAERO)
      WRITE(NULOUT,'(A,4(E18.10,A))')&
       &'I  '//TRIM(YAERO(JVAR)%CNAME)//' (kg/m2) I     ',ZNT0,'      I      '&
       & ,ZNT1,'      I     ',ZNT1-ZNT0,'      I     '&
       & ,PDDHCS(IDHCS+1+(JVAR-1)*7),&
       &'      I'

    ENDDO
    WRITE(NULOUT,'(A,139(''-''),A)') 'I','I'

!-- fluxes
    WRITE(NULOUT,'(A)') ' '
    WRITE(NULOUT,'(A,188(''-''),A)') 'DDH','I'
    WRITE(NULOUT,'(2A)')&
     & 'I        VAR       I      SOURCE         I    DRY DEPOSITION   I    SEDIMENTATION   I'&
     &,' WET DEPOSITION L.S. I WET DEPOSIT. CONV. I   NEGATIVE FIXER   I     TOTAL FLUX     I    OPTICAL DEPTH    I'
    WRITE(NULOUT,'(A,188(''-''),A)') 'DDH','I'

    DO JVAR=1,NACTAERO
      ISAERO=IDHCS + (JVAR-1)*7
      ZPHY1=PDDHCS(ISAERO+1)
      ZPHY2=PDDHCS(ISAERO+2)
      ZPHY3=PDDHCS(ISAERO+3)
      ZPHY4=PDDHCS(ISAERO+4)
      ZPHY5=PDDHCS(ISAERO+5)
      ZPHY6=PDDHCS(ISAERO+6)
      ZPHYT=ZPHY1+ZPHY2+ZPHY3+ZPHY4+ZPHY5+ZPHY6
      ZTAUT=PDDHCS(ISAERO+7)
      WRITE(NULOUT,'(A,8(E13.6,A))')&
       &'I  '//TRIM(YAERO(JVAR)%CNAME)//' (kg/m2) I    ',ZPHY1,'    I    '&
       & ,ZPHY2,'    I   ',ZPHY3,'    I    ',ZPHY4,'    I   ',ZPHY5,'    I   ',ZPHY6,'    I   ',ZPHYT,'    I'&
       &'   ',ZTAUT,'    I'
    ENDDO

    WRITE(NULOUT,'(A,190(''-''),A)') 'I','I'


  ENDIF

! Greenhouse gases
  IF(NGHG > 0 ) THEN
   WRITE(NULOUT,'(A)') ' '
    WRITE(NULOUT,'(A,134(''-''))') 'DDH'
    WRITE(NULOUT,'(A,136X,A)') 'I','I'
    WRITE(NULOUT,'(A,F11.3,3A,1X,A)')&
     & 'I TIME =',ZHEURE,'H '&
     & ,'DDH * Diagnostic Var.,                  AREA                  ',&
     &CLDOM,'                                 I'
    WRITE(NULOUT,'(A,136X,A)') 'I','I'
    WRITE(NULOUT,'(A,136(''-''),A)') 'I','I'
    WRITE(NULOUT,'(3A)')&
     & 'I      VAR      I      INITIAL MASS (ATM)     I'&
     & ,'      CURRENT MASS (ATM)      I     CURRENT - INITIAL       I'&
     & ,'   INJECTED MASS (SURF)      I'
    WRITE(NULOUT,'(A,136(''-''),A)') 'I','I'

    IF(NGHG == 1 .AND. YGHG(1)%IGRBCODE==210061) THEN

      IF(ANY(YTRAC(:)%IGRBCODE==210182)) THEN
        ZNT0=PDDHFSVI(NDHVFS-1)
        ZNT1=PDDHCS(NDHVS+NDHVFS-1)
        IDHCS=NDHVS + NDHVFS + NDHFSD + NDHFSP + NDHFFS - 1
      ELSE 
        ZNT0=PDDHFSVI(NDHVFS)
        ZNT1=PDDHCS(NDHVS+NDHVFS)
        IDHCS=NDHVS + NDHVFS + NDHFSD + NDHFSP + NDHFFS
      ENDIF

      WRITE(NULOUT,'(A,4(E18.10,A))')&
       &'I   '//TRIM(YGHG(1)%CNAME)//' (kg/m2) I     ',ZNT0,'      I      '&
       & ,ZNT1,'      I     ',ZNT1-ZNT0,'      I     '&
       & ,PDDHCS(IDHCS)+PDDHCS(IDHCS-1)+PDDHCS(IDHCS-2)+PDDHCS(IDHCS-3),&
       &'      I'
    ELSEIF(NGHG == 1 .AND. YGHG(1)%IGRBCODE==210062) THEN

      IF(ANY(YTRAC(:)%IGRBCODE==210182)) THEN
        ZNT0=PDDHFSVI(NDHVFS-2)
        ZNT1=PDDHCS(NDHVS+NDHVFS-2)
        ZNTS=PDDHCS(NDHVS+NDHVFS-1)
        IDHCS=NDHVS + NDHVFS + NDHFSD + NDHFSP + NDHFFS - 1
      ELSE
        ZNT0=PDDHFSVI(NDHVFS-1)
        ZNT1=PDDHCS(NDHVS+NDHVFS-1)
        ZNTS=PDDHCS(NDHVS+NDHVFS)
        IDHCS=NDHVS + NDHVFS + NDHFSD + NDHFSP + NDHFFS 
      ENDIF

        WRITE(NULOUT,'(A,4(E18.10,A))')&
         &'I   '//TRIM(YGHG(1)%CNAME)//' (kg/m2) I     ',ZNT0,'      I      '&
         & ,ZNT1,'      I     ',ZNT1-ZNT0,'      I     '&
         & ,PDDHCS(IDHCS)+PDDHCS(IDHCS-1)+ZNTS,&
         &'      I'
    ELSEIF(NGHG ==2) THEN
      IF(ANY(YTRAC(:)%IGRBCODE==210182)) THEN
        ZNT0=PDDHFSVI(NDHVFS-NGHG-1)
        ZNT1=PDDHCS(NDHVS+NDHVFS-NGHG-1)
        IDHCS=NDHVS + NDHVFS + NDHFSD + NDHFSP + NDHFFS - NGHG-1

        ZNT0_2=PDDHFSVI(NDHVFS-NGHG)
        ZNT1_2=PDDHCS(NDHVS+NDHVFS-NGHG)
        ZNTS=PDDHCS(NDHVS+NDHVFS-NGHG+1)
        IDHCS_2=NDHVS + NDHVFS + NDHFSD + NDHFSP + NDHFFS - NGHG+1
      ELSE
        ZNT0=PDDHFSVI(NDHVFS-NGHG)
        ZNT1=PDDHCS(NDHVS+NDHVFS-NGHG)
        IDHCS=NDHVS + NDHVFS + NDHFSD + NDHFSP + NDHFFS - NGHG

        ZNT0_2=PDDHFSVI(NDHVFS-NGHG+1)
        ZNT1_2=PDDHCS(NDHVS+NDHVFS-NGHG+1)
        ZNTS=PDDHCS(NDHVS+NDHVFS)
        IDHCS_2=NDHVS + NDHVFS + NDHFSD + NDHFSP + NDHFFS 
      ENDIF

      WRITE(NULOUT,'(A,4(E18.10,A))')&
       &'I   '//TRIM(YGHG(1)%CNAME)//' (kg/m2) I     ',ZNT0,'      I      '&
       & ,ZNT1,'      I     ',ZNT1-ZNT0,'      I     '&
       & ,PDDHCS(IDHCS)+PDDHCS(IDHCS-1)+PDDHCS(IDHCS-2)+PDDHCS(IDHCS-3),&
       &'      I'

      WRITE(NULOUT,'(A,4(E18.10,A))')&
       &'I   '//TRIM(YGHG(2)%CNAME)//' (kg/m2) I     ',ZNT0_2,'      I      '&
       & ,ZNT1_2,'      I     ',ZNT1_2-ZNT0_2,'      I     '&
       & ,PDDHCS(IDHCS_2)+PDDHCS(IDHCS_2-1)+ZNTS,&
       &'      I'

    ENDIF

  ENDIF

  IF(NTRAC > 0 ) THEN
   WRITE(NULOUT,'(A)') ' '
    WRITE(NULOUT,'(A,134(''-''))') 'DDH'
    WRITE(NULOUT,'(A,136X,A)') 'I','I'
    WRITE(NULOUT,'(A,F11.3,3A,1X,A)')&
     & 'I TIME =',ZHEURE,'H '&
     & ,'DDH * Diagnostic Var.,                  AREA                  ',&
     &CLDOM,'                                 I'
    WRITE(NULOUT,'(A,136X,A)') 'I','I'
    WRITE(NULOUT,'(A,136(''-''),A)') 'I','I'
    WRITE(NULOUT,'(3A)')&
     & 'I      VAR      I      INITIAL MASS (ATM)     I'&
     & ,'      CURRENT MASS (ATM)      I     CURRENT - INITIAL       I'&
     & ,'   INJECTED MASS (SURF)      I'
    WRITE(NULOUT,'(A,136(''-''),A)') 'I','I'

  DO JVAR=1,NTRAC
    IDHCS=NDHVS + NDHVFS + NDHFSD + NDHFSP + NDHFFS
    ZNT0=PDDHFSVI(NDHVFS-NTRAC-NGRG+JVAR)
    ZNT1=PDDHCS(NDHVS+NDHVFS-NTRAC-NGRG+JVAR)

    WRITE(NULOUT,'(A,4(E18.10,A))')&
     &'I   '//TRIM(YTRAC(JVAR)%CNAME)//' (kg/m2) I     ',ZNT0,'      I      '&
     & ,ZNT1,'      I     ',ZNT1-ZNT0,'      I     '&
     & ,PDDHCS(IDHCS-NTRAC-NGRG+JVAR),&
     &'      I'
   ENDDO

     WRITE(NULOUT,'(A,136(''-''),A)') 'I','I'
  ENDIF

  IF(NGRG > 0 ) THEN
   WRITE(NULOUT,'(A)') ' '
    WRITE(NULOUT,'(A,134(''-''))') 'DDH'
    WRITE(NULOUT,'(A,136X,A)') 'I','I'
    WRITE(NULOUT,'(A,F11.3,3A,1X,A)')&
     & 'I TIME =',ZHEURE,'H '&
     & ,'DDH * Diagnostic Var.,                  AREA                  ',&
     &CLDOM,'                                 I'
    WRITE(NULOUT,'(A,136X,A)') 'I','I'
    WRITE(NULOUT,'(A,136(''-''),A)') 'I','I'
    WRITE(NULOUT,'(3A)')&
     & 'I      VAR      I      INITIAL MASS (ATM)     I'&
     & ,'      CURRENT MASS (ATM)      I     CURRENT - INITIAL       I'&
     & ,'   INJECTED MASS (SURF)      I'
    WRITE(NULOUT,'(A,136(''-''),A)') 'I','I'
! GRG
    DO JVAR=1,NGRG

        ZNT0=PDDHFSVI(NDHVFS-NGRG+JVAR)
        ZNT1=PDDHCS(NDHVS+NDHVFS-NGRG+JVAR)
        IDHCS=NDHVS + NDHVFS + NDHFSD + NDHFSP + NDHFFS
    IF (LGRGSFC) THEN
      WRITE(NULOUT,'(A,4(E18.10,A))')&
       &'I   '//TRIM(YGRG(JVAR)%CNAME)//' (kg/m2) I     ',ZNT0,'      I      '&
       & ,ZNT1,'      I     ',ZNT1-ZNT0,'      I     '&
       & ,PDDHCS(IDHCS-NGRG+JVAR),&
       &'      I'
    ELSE
      WRITE(NULOUT,'(A,4(E18.10,A))')&
       &'I   '//TRIM(YGRG(JVAR)%CNAME)//' (kg/m2) I     ',ZNT0,'      I      '&
       & ,ZNT1,'      I     ',ZNT1-ZNT0,'      I     '&
       & , -99999.0 ,&
       &'      I'
    ENDIF
     WRITE(NULOUT,'(A,136(''-''),A)') 'I','I'
    ENDDO
 ENDIF
!     FIN BILAN LHDHKS
!     ----------------

ENDIF

!     ------------------------------------------------------------------
!**   4.- IMPRESSION DU BILAN MOMENT CINETIQUE.

IF ( LHDMCI ) THEN
  ISMC=1
!     -----------------------------
!*     BALANCE OF ANGULAR MOMENTUM
!     -----------------------------
  IDHCV=NDHVHK*ISHK

  ZA10=ZDHIV(IDHCV+1)
  ZA20=ZDH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FP - ZA3FT - ZA3FC - ZA3FG  

!     COMPUTE THE ANGLE BETWEEN OF THE ANGULAR MOMENTUM VECTOR AND
!     THE EARTH ROTATION AXIS

  ZNORM=SQRT(ABS(ZA11**2 +ZA21**2 +ZA31**2))
  ZNORMEQ=SQRT(ABS(ZA11**2 +ZA21**2))
  IF (ZNORMEQ*ZNORM /= 0.0_JPRB) THEN
    ZLAT0=ACOS(ZA31/ZNORM)*180._JPRB/RPI
    ZGMTSEC=REAL(MOD(NINT(RSTATI,JPIB)+NSSSSS,86400),JPRB)
    ZLON0=(ACOS(ZA11/ZNORMEQ)-ROMEGA*ZGMTSEC)*180._JPRB/RPI
  ENDIF

!*    PRINT RESULTS

  ZANM=1.E-6_JPRB

  WRITE (NULOUT,5200)
  WRITE (NULOUT,5201) NINT(LOG10(ZANM))
  WRITE (NULOUT,5200)
  WRITE (NULOUT,5202)
  WRITE (NULOUT,5203)
  WRITE (NULOUT,5200)
  WRITE (NULOUT,5204) ZA10*ZANM,ZA1DH*ZANM,ZA1FD*ZANM,ZA1FP*ZANM,&
   & ZA1FT*ZANM,ZA1FC*ZANM,ZA1FG*ZANM,&
   & ZA1FO*ZANM,ZA1AD*ZANM,ZA1NA*ZANM,ZA11*ZANM,&
   & ZBA1*ZANM  
  WRITE (NULOUT,5200)
  WRITE (NULOUT,5205) ZA20*ZANM,ZA2DH*ZANM,ZA2FD*ZANM,ZA2FP*ZANM,&
   & ZA2FT*ZANM,ZA2FC*ZANM,ZA2FG*ZANM,&
   & ZA2FO*ZANM,ZA2AD*ZANM,ZA2NA*ZANM,ZA21*ZANM,&
   & ZBA2*ZANM  
  WRITE (NULOUT,5200)
  WRITE (NULOUT,5206) ZA30*ZANM,ZA3DH*ZANM,ZA3FD*ZANM,ZA3FP*ZANM,&
   & ZA3FT*ZANM,ZA3FC*ZANM,ZA3FG*ZANM,&
   & ZA3FO*ZANM,ZA3AD*ZANM,ZA31*ZANM,ZBA3*ZANM  
  WRITE (NULOUT,5200)
  WRITE (NULOUT,5207)
  IF (ZNORM*ZNORMEQ /= 0.0_JPRB) THEN
    WRITE(NULOUT,5208) ZLAT0,ZLON0
  ELSEIF (ZNORM == 0.0_JPRB) THEN
    WRITE(NULOUT,5209)
  ELSE
    WRITE(NULOUT,5210)
  ENDIF

  WRITE(NULOUT,*) 'DIVERG. : ',ZA1DH,ZA2DH,ZA3DH
!     END OF BALANCE LHDMCI
!     ---------------------

ENDIF

!     ------------------------------------------------------------------
!**   5.- IMPRESSION DU BILAN ENTROPIE.

IF ( LHDENT ) THEN
  ISEN=1
!     --------------------
!*     BALANCE OF ENTROPY
!     --------------------
  IDHCV=NDHVHK*ISHK+NDHVMC*ISMC

  ZEN0=ZDHIV(IDHCV+1)

  IDHCV=NDHVV+NDHAHKD*ISHK+NDHAMCD*ISMC

  ZENDH=ZDHIV(IDHCV+1)
  ZENPCT=ZDHIV(IDHCV+2)

  IDHCV=NDHVV+NDHAVD+NDHBHKD*ISHK+NDHBMCD*ISMC

  ZEND0=PDDHCV(0,IDHCV+1)
  ZENDS=PDDHCV(NFLEVG,IDHCV+1)
  ZENFD=ZEND0 - ZENDS
  ZENP0=PDDHCV(0,IDHCV+2)
  ZENPS=PDDHCV(NFLEVG,IDHCV+2)
  ZENP=ZENP0 - ZENPS

  IDHCV=NDHVV+NDHFVD+NDHAVP+NDHBHKP*ISHK+NDHBMCP*ISMC

  ZENDIT=ZDHIV(IDHCV+1)
  ZENDIC=ZDHIV(IDHCV+2)
  ZENDID=ZDHIV(IDHCV+3)
  ZENDISS=ZENDIT+ZENDIC+ZENDID

  ZENHUM=ZDHIV(IDHCV+4)

  ZENRAD=ZDHIV(IDHCV+5)

  ZENCT=ZDHIV(IDHCV+6)

  IDHCV=NDHCV+NDHVHK*ISHK+NDHVMC*ISMC

  ZEN1=ZDHIV(IDHCV+1)

!     BALANCE

  ZBEN=ZEN1 - ZEN0 - ZENDH - ZENFD - ZENP - ZENDISS -&
   & ZENHUM - ZENRAD - ZENCT - ZENPCT  

!*    PRINT RESULTS

  WRITE (NULOUT,5100)
  WRITE (NULOUT,5101)
  WRITE (NULOUT,5100)
  WRITE (NULOUT,5102)
  WRITE (NULOUT,5103)
  WRITE (NULOUT,5100)
  WRITE (NULOUT,5104) ZEN0,ZENDH,ZENFD,ZENP,ZENDIT,ZENDIC,ZENDID,&
   & ZENHUM,ZENCT,ZENRAD,ZENPCT,ZEN1,ZBEN  
  WRITE (NULOUT,5100)

!     END OF BALANCE LHDENT
!     ---------------------

ENDIF

!     FORMATS.
!     --------

5020 FORMAT (T3,'I INITIAL      I HORIZ. FLUX  I DYN. FLUX    I',&
 & ' DYN. FLUX    I PHYS. FLUX   I PHYS. FLUX   I',&
 & ' CURRENT      I I I RESIDUAL     I',/,T3,&
 & 'I MASS         I              I TOA          I',&
 & ' SURFACE      I TOA          I SURFACE      I',&
 & ' MASS         I I I              I',/,T3,&
 & 106('-'),' I ',16('-'),/,&
 & T3,'-',7(14X,'-'),' I ','-',14X,'-',/,&
 & T3,'-',1X,F12.0,1X,'I',4(1X,F12.0,1X,'.'),&
 & 1X,F12.0,1X,'I',1X,F12.0,1X,'-',' I ','-',1X,F12.0,1X,'-',/,&
 & T3,'-',7(14X,'-'),' I ','-',14X,'-',/,&
 & T3,106('-'),' I ',16('-'))  

!     - LIGNE DE SEPARATION
5029 FORMAT (T1,'DDH',130('-'))
!     - LIGNE DE SEPARATION
5030 FORMAT (T1,'DDH',143('-'))
!     - LOGO
5031 FORMAT (T1,'-',33('-DDH'))
!     - LIGNE BLANCHE
5032 FORMAT (T1,'I',144X,'I')
!     - LIGNE DOMAINE
5033 FORMAT(T1,'I',28X,&
 & 'DDH * Accumulated Energy and Water balance _   Area: ',&
 & A20,43X,'I' )  
!     - LIGNE ESPACE CONCERNE (ZHEURE ET ZLFRAC*100.)
5034 FORMAT (T1,'I',1X,'Time = ',F11.3,'H',4X,&
 & 'II',14X,'Atmosphere',14X,'I I',21X,&
 & 'Land  ( Fraction: ',F6.2,' % )',28X,'I' )  
!     - LIGNE SEPARATION PARTIELLE
5035 FORMAT (T1,'I',24X,120('-'),'I' )
!     - LIGNE IDENTITE DES COLONNES (MOT 13C, MOT 10C, 9 MOTS 12C
!       OU 11C SI EAU
5036 FORMAT (T1,'I',A13,1X,A10,'II',&
 & A12,'I',A12,'II',A11,'I I',&
 & A12,'I',A12,'I',A12,'II',A13,'I',A11,'I',A11,'I')  
!     - LIGNE IDENTITE DES COLONNES SANS PRE-TITRE
5037 FORMAT (T1,'I',24X,'II',&
 & A12,'I',A12,'II',A11,'I I',&
 & A12,'I',A12,'I',A12,'II',A13,'I',A11,'I',A11,'I')  
!     - LIGNE DE CHIFFRES PLEINE (TITRE (24 C), 8 CHIFFRES)
5038 FORMAT (T1,'I',A24,'II',&
 & F11.5,1X,'I',F11.5,1X,'II',F10.5,1X,'I I',&
 & F11.5,1X,'I',F11.5,1X,'I',F11.5,1X,'II',&
 & F12.5,1X,'I',F10.5,1X,'I',F10.5,1X,'I' )  
!     - LIGNE ATMOSPHERE SEULE
5039 FORMAT (T1,'I',A24,'II',&
 & F11.5,1X,'I',F11.5,1X,'II',F10.5,1X,'I I',&
 & 12X,'I',12X,'I',12X,'II',&
 & 13X,'I',11X,'I',11X,'I' )  
!     - LIGNE ENERGETIQUE ATM SEULE
5040 FORMAT (T1,'I',A24,'II',&
 & F11.5,1X,'I',F11.5,1X,'II',11X,'I I',&
 & 12X,'I',12X,'I',12X,'II',&
 & 13X,'I',11X,'I',11X,'I' )  
!     - LIGNE EAU ATM SEULE
5041 FORMAT (T1,'I',A24,'II',&
 & 12X,'I',12X,'II',F10.5,1X,'I I',&
 & 12X,'I',12X,'I',12X,'II',&
 & 13X,'I',11X,'I',11X,'I' )  
!     - LIGNE ENTHALPIE SEULE
5042 FORMAT (T1,'I',A24,'II',&
 & F11.5,1X,'I',12X,'II',11X,'I I',&
 & 12X,'I',12X,'I',12X,'II',&
 & 13X,'I',11X,'I',11X,'I' )  
!     - LIGNE ENTHALPIE ET EAU ATM SEULES
5043 FORMAT (T1,'I',A24,'II',&
 & F11.5,1X,'I',12X,'II',F10.5,1X,'I I',&
 & 12X,'I',12X,'I',12X,'II',&
 & 13X,'I',11X,'I',11X,'I' )  
!     - LIGNE ENERGIE CINETIQUE SEULE
5044 FORMAT (T1,'I',A24,'II',&
 & 12X,'I',F11.5,1X,'II',11X,'I I',&
 & 12X,'I',12X,'I',12X,'II',&
 & 13X,'I',11X,'I',11X,'I' )  
!     - LIGNE SOL SEUL
5045 FORMAT (T1,'I',A24,'II',&
 & 12X,'I',12X,'II',11X,'I I',&
 & F11.5,1X,'I',F11.5,1X,'I',F11.5,1X,'II',&
 & 13X,'I',F10.5,1X,'I',F10.5,1X,'I' )  
!     - ANOTHER LIGNE SOL SEUL
5046 FORMAT (T1,'I',A24,'II',&
 & 12X,'I',12X,'II',11X,'I I',&
 & F11.5,1X,'I',F11.5,1X,'I',F11.5,1X,'II',&
 & F12.5,1X,'I',F10.5,1X,'I',11X,'I' )  
!     - LIGNE BILAN EN EAU DU SOL SEUL
5047 FORMAT (T1,'I',A24,'II',&
 & 12X,'I',12X,'II',11X,'I I',&
 & 12X,'I',12X,'I',12X,'II',&
 & 13X,'I',F10.5,1X,'I',F10.5,1X,'I' )  
!     - LIGNE BILAN ENTHALPIE ET COUCHE SOL SUP SEUL
5050 FORMAT (T1,'I',A24,'II',&
 & F11.5,1X,'I',12X,'II',11X,'I I',&
 & F11.5,1X,'I',F11.5,1X,'I',12X,'II',&
 & 13X,'I',11X,'I',11X,'I' )  
!     - LIGNE EAU ATM, ENERGIE SOL SUP, HAUT NEIGE, EAU SOL SUP
5052 FORMAT (T1,'I',A24,'II',&
 & 12X,'I',12X,'II',F10.5,1X,'I I',&
 & F11.5,1X,'I',F11.5,1X,'I',12X,'II',&
 & F12.5,1X,'I',F10.5,1X,'I',F10.5,1X,'I' )  
!     - LIGNE ENTHALPIE, EAU ATM, EAU SOL SUP
5053 FORMAT (T1,'I',A24,'II',&
 & F11.5,1X,'I',12X,'II',F10.5,1X,'I I',&
 & 12X,'I',12X,'I',12X,'II',&
 & 13X,'I',F10.5,1X,'I',11X,'I' )  
!     - LIGNE ENTHALPIE, EAU ATM, NEIGE SOL
5054 FORMAT (T1,'I',A24,'II',&
 & F11.5,1X,'I',12X,'II',F10.5,1X,'I I',&
 & 12X,'I',12X,'I',12X,'II',&
 & F12.5,1X,'I',11X,'I',11X,'I' )  
!     - LIGNE SANS DONNEES CHIFFREES DIRECTES (TITRE DE LIGNE 24C SEUL)
5060 FORMAT (T1,'I',A24,'II',&
 & 12X,'I',12X,'II',11X,'I I',&
 & 12X,'I',12X,'I',12X,'II',&
 & 13X,'I',11X,'I',11X,'I' )  
5061 FORMAT(A,F5.2,A)
!     - LIGNE DE CHIFFRES PLEINE (TITRE (24 C), 8 CHIFFRES)
5062 FORMAT (T1,'I',A24,'II',&
 & F11.0,1X,'I',F11.0,1X,'II',F10.0,1X,'I I',&
 & F11.0,1X,'I',F11.0,1X,'I',F11.0,1X,'II',&
 & F12.0,1X,'I',F10.0,1X,'I',F10.0,1X,'I' )  
5100 FORMAT (T1,124('-'))
5101 FORMAT (T1,'I',T124,'I'/ T1,'I',&
 & T30,7('*'),' BALANCE OF ENTROPY [ J / (KG K M**2) ] ',&
 & 7('*'),T124,'I'/ T1,'I',T124,'I')  
5102 FORMAT(T1,'I',11X,'II',10X,2('I',8X),'I',20X,2('I',8X),'I',&
 & 9X,'I',8X,'II',11X,'I',9X,'I'/&
 & T1,'I',' INITIAL   ','II',' HORIZ.   ','I',' DYNAM. ',&
 & 'I',' PRECIP.','I','    DISSIPATION      ','I',&
 & ' HUMID. ','I',' ENTHAL.','I',' RADIAT. ','I','PREC.TR.',&
 & 'II',' FINAL     ','I',' RESIDUAL','I')  
5103 FORMAT(T1,'I',' ENTROPY   ','II',' DIVERG.  ','I',' FLUX   ',&
 & 'I',' FLUX   ','I',' TURB ','I',' CONV ','I',' GWD  ','I',&
 & ' DIFFUS.','I',' DIFFUS.','I',' TENDEN. ','I',' ENTHAL.',&
 & 'II',' ENTROPY   ','I',9X,'I'/&
 & T1,'I',11X,'II',10X,2('I',8X),3('I',6X),2('I',8X),'I',&
 & 9X,'I',8X,'II',11X,'I',9X,'I')  
5012 FORMAT ( T3,'COORDONNEES (LONGITUDE GEO,',&
 & 'SINUS(LATITUDE GEO) )=',&
 & 4(1X,'(',F8.4,',',F8.4,')') )  
5104 FORMAT(T1,'I',11X,'II',10X,2('I',8X),3('I',6X),2('I',8X),'I',&
 & 9X,'I',8X,'II',11X,'I',9X,'I'/&
 & T1,'I',F11.0,'II',F10.0,2('I',F8.0),3('I',F6.0),&
 & 2('I',F8.0),'I',F9.0,'I',F8.0,'II',F11.0,'I',F9.0,'I'/&
 & T1,'I',11X,'II',10X,2('I',8X),3('I',6X),2('I',8X),'I',&
 & 9X,'I',8X,'II',11X,'I',9X,'I')  
5200 FORMAT (T1,128('-'))
5201 FORMAT (T1,'I',T128,'I'/ T1,'I',T20,7('*'),&
 & ' BALANCE OF ANGULAR MOMENTUM * 10**',I3,&
 & '  [ KG * M**2 /(S * M**2)] ',&
 & 7('*'),T128,'I'/ T1,'I',T128,'I')  
5202 FORMAT(T1,'I',11X,'II',11X,'II',8X,2('I',8X),'I',23X,'I',8X,&
 & 2('I',8X),'II',11X,'I',9X,'I'/&
 & T1,'I',' COMPONENT ','II',&
 & ' INITIAL   ','II',' HORIZ. ','I',' DYNAM. ',&
 & 'I',' PRECIP.','I','     DISSIPATION        ','I',&
 & ' OROGR. ','I',' ADJUST.','I','NONAXIAL',&
 & 'II',' FINAL     ','I',' RESIDUAL','I')  
5203 FORMAT(T1,'I',11X,'II','ANG.MOMENT.','II',' DIVERG.','I',&
 & ' FLUX   ','I',' FLUX   ','I','  TURB ','I','  CONV ','I',&
 & '  GWD  ','I',' FLUX   ','I',' TENDEN.','I',' MOMENTS',&
 & 'II','ANG.MOMENT.','I',9X,'I'/&
 & T1,'I',11X,'II',11X,'II',8X,2('I',8X),3('I',7X),&
 & 3('I',8X),'II',11X,'I',9X,'I')  
5204 FORMAT(T1,'I',11X,'II',11X,'II',8X,2('I',8X),3('I',7X),&
 & 2('I',8X),'I',8X,'II',11X,'I',9X,'I'/&
 & T1,'I',' EQUATOR.1 ','II',F11.0,'II',F8.0,2('I',F8.0),&
 & 3('I',F7.0),3('I',F8.0),'II',F11.0,&
 & 'I',F9.0,'I'/T1,'I',11X,'II',11X,'II',8X,2('I',8X),&
 & 3('I',7X),3('I',8X),'II',11X,'I',9X,'I')  
5205 FORMAT(T1,'I',11X,'II',11X,'II',8X,2('I',8X),3('I',7X),&
 & 3('I',8X),'II',11X,'I',9X,'I'/&
 & T1,'I',' EQUATOR.2 ','II',F11.0,'II',F8.0,2('I',F8.0),&
 & 3('I',F7.0),3('I',F8.0),'II',F11.0,&
 & 'I',F9.0,'I'/T1,'I',11X,'II',11X,'II',8X,2('I',8X),&
 & 3('I',7X),3('I',8X),'II',11X,'I',9X,'I')  
5206 FORMAT(T1,'I',11X,'II',11X,'II',8X,2('I',8X),3('I',7X),&
 & 3('I',8X),'II',11X,'I',9X,'I'/&
 & T1,'I',' POLAR     ','II',F11.0,'II',F8.0,2('I',F8.0),&
 & 3('I',F7.0),2('I',F8.0),'I',8X,'II',F11.0,&
 & 'I',F9.0,'I'/T1,'I',11X,'II',11X,'II',8X,2('I',8X),&
 & 3('I',7X),3('I',8X),'II',11X,'I',9X,'I')  
5207 FORMAT(/T10,'POSITION OF INTERSECTION OF THE ANGULAR MOMENTUM ',&
 & 'VECTOR WITH THE ROTATING EARTH :')  
5208 FORMAT(T20,'LATITUDE : ',F9.4,' DEGREES'/T20,'LONGITUDE: ',F9.4/)
5209 FORMAT(T10,'! ERROR !!!   THE ANGULAR MOMENTUM IS ZERO'/)
5210 FORMAT(T20,'*** POSITION AT THE NORTH POLE ***'/)
CALL GSTATS(1913,1)
IF (LHOOK) CALL DR_HOOK('PPEDDHEC',1,ZHOOK_HANDLE)
END SUBROUTINE PPEDDHEC
