      SUBROUTINE SALERR(sub,text,ierr,fout)
!**** stops because of error in data or in calculations
!>     sub        = name of SUBROUTINE detecting the error
!>     text       = message
!>     ierr       = INTEGER characterizing the error (internal error nber?)
!>     fout       = order nber of output file
!****
      INTEGER,           INTENT(IN) :: ierr,fout
      CHARACTER (LEN=*), INTENT(IN) :: sub,text
!****
      if(fout.gt.0) write(fout,'(/17H SALERR: error nb,I5)') ierr
      call xabort(sub//' : '// text)
      END SUBROUTINE SALERR
