SUBROUTINE SUPHYDIAG

  USE PARKIND1, ONLY: JPIM, JPRB
  USE YOMHOOK, ONLY: LHOOK, DR_HOOK
  USE PHY_DIAG_MOD, ONLY: NEW_DIAG_SET, NEW_DIAGNOSTIC
  USE YOEPHY, ONLY: LDYNVAR 
  USE YOEPHYDIAG, ONLY: D_UTENDNOGW, D_UTENDOGW, D_VTENDNOGW, D_VTENDOGW, &
        & D_TNTMP, D_TNTRS, D_TNTRL, D_TNTRSCS, &
        & D_TNTRLCS, D_TNTC, D_TNTSCP, D_TNTNOGW, &
        & D_TNTOGW, D_TNTVD
  USE YOM_GRIB_CODES, ONLY: NGRB_UTENDNOGW, NGRB_UTENDOGW, NGRB_VTENDNOGW, NGRB_VTENDOGW, &
        & NGRB_TNTMP, NGRB_TNTRS, NGRB_TNTRL, NGRB_TNTRSCS, &
        & NGRB_TNTRLCS, NGRB_TNTC, NGRB_TNTSCP, NGRB_TNTNOGW, &
        & NGRB_TNTOGW, NGRB_TNTVD

  IMPLICIT NONE

  INTEGER(KIND=JPIM) :: ISET
  REAL(KIND=JPRB) :: ZHOOK_HANDLE

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

  IF (LDYNVAR) THEN
     CALL NEW_DIAG_SET('DynVar', ISET)
     !--zonal wind tendency due to non-orographic gravity waves
     CALL NEW_DIAGNOSTIC(ISET, 'Utendnogw', 3, NGRB_UTENDNOGW, .TRUE., .FALSE.,  &
                       & D_UTENDNOGW)

     !--zonal wind tendency due to orographic gravity waves
     CALL NEW_DIAGNOSTIC(ISET, 'Utendogw', 3, NGRB_UTENDOGW, .TRUE., .FALSE.,  &
                       & D_UTENDOGW)

     !--medirional wind tendency due to non-orographic gravity waves
     CALL NEW_DIAGNOSTIC(ISET, 'Vtendnogw', 3, NGRB_VTENDNOGW, .TRUE., .FALSE.,  &
                       & D_VTENDNOGW)

     !--medirional wind tendency due to orographic gravity waves
     CALL NEW_DIAGNOSTIC(ISET, 'Vtendogw', 3, NGRB_VTENDOGW, .TRUE., .FALSE.,  &
                       & D_VTENDOGW)

     !--total temperature tendency
     CALL NEW_DIAGNOSTIC(ISET, 'tntmp', 3, NGRB_TNTMP, .TRUE., .FALSE.,  &
                       & D_TNTMP)

     !--temperature tendency due to SW radiation
     CALL NEW_DIAGNOSTIC(ISET, 'tntrs', 3, NGRB_TNTRS, .TRUE., .FALSE.,  &
                       & D_TNTRS)

     !--temperature tendency due to LW radiation
     CALL NEW_DIAGNOSTIC(ISET, 'tntrl', 3, NGRB_TNTRL, .TRUE., .FALSE.,  &
                       & D_TNTRL)

     !--temperature tendency due to clear-sky SW radiation
     CALL NEW_DIAGNOSTIC(ISET, 'tntrscs', 3, NGRB_TNTRSCS, .TRUE., .FALSE.,  &
                       & D_TNTRSCS)

     !--temperature tendency due to clear-sky LW radiation
     CALL NEW_DIAGNOSTIC(ISET, 'tntrlcs', 3, NGRB_TNTRLCS, .TRUE., .FALSE.,  &
                       & D_TNTRLCS)

     !--temperature tendency due to convection
     CALL NEW_DIAGNOSTIC(ISET, 'tntc', 3, NGRB_TNTC, .TRUE., .FALSE.,  &
                       & D_TNTC)

     !--temperature tendency due to large-scale precipitation
     CALL NEW_DIAGNOSTIC(ISET, 'tntscp', 3, NGRB_TNTSCP, .TRUE., .FALSE.,  &
                       & D_TNTSCP)
 
     !--temperature tendency due to non-orographic gravity waves
     CALL NEW_DIAGNOSTIC(ISET, 'tntnogw', 3, NGRB_TNTNOGW, .TRUE., .FALSE.,  &
                       & D_TNTNOGW)

     !--temperature tendency due to orographic gravity waves
     CALL NEW_DIAGNOSTIC(ISET, 'tntogw', 3, NGRB_TNTOGW, .TRUE., .FALSE.,  &
                       & D_TNTOGW)
     
     !--not in DynVar spec, appears to be internal to the implementation (?)
     !--temperature tendency due to vertical diffusion
     CALL NEW_DIAGNOSTIC(ISET, 'tntvd', 3, NGRB_TNTVD, .TRUE., .FALSE.,  &
                       & D_TNTVD)
  END IF

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

