MODULE CHKNTE_SUB
CONTAINS
SUBROUTINE CHKNTE ( FAIL, ERRMSG )
!
! VERSION
!   21APR26 AD Original.
!
! DESCRIPTION
!   Check energy assigned to all required vibrational levels
!   Called by DRVCHK if NTE flag enabled.
!
! VARIABLE KINDS
    USE KIND_DAT
!
! GLOBAL DATA
    USE NTECOM_DAT ! Non-LTE data
!
  IMPLICIT NONE
!
! ARGUMENTS
    LOGICAL,       INTENT(OUT) :: FAIL   ! Set TRUE if a fatal error is detected
    CHARACTER(80), INTENT(OUT) :: ERRMSG ! Error message written if FAIL is TRUE
!
! LOCAL VARIABLES
    INTEGER(I4) :: INTE ! Index in NTE 
!
! EXECUTABLE CODE -------------------------------------------------------------
!
  DO INTE = 1, NNTE 
    IF ( NTE(INTE)%ENG .EQ. 0.0 ) THEN
      FAIL = .TRUE.
      ERRMSG = 'CHKNTE: No Energy assigned to ' // TRIM(NTE(INTE)%COD)
      RETURN
    END IF
  END DO
!
  FAIL = .FALSE.
!
END SUBROUTINE CHKNTE
END MODULE CHKNTE_SUB
