C ---  smeared discrete levels
C     (OS(f) from photoabs)
C     DEL (eV), omega (Ry), h (a.u.)
C---1a.u.=27.2 eV, E(a.u.)=2E(Ry)

      SUBROUTINE LEVEL(M,H,DEL,NN,OMI,OMF,OM0,F)
      INTEGER   M,N,NN,W
       REAL*8   DEL,CO1,CO2,PI,C,A,B,H,
     *     OM1,OM2,DEL1,SIGM1,SIGM2,
     *     OMI(NN),OMF(NN),OM0(M),F(M) 

	PI=3.141 592 653
        C=137.02
        CO1=13.6057
	CO2=8.*PI/C
        DEL1=DEL*CO1
       WRITE(6,5)DEL,DEL1
  5     FORMAT(/'              SMEARED  LEVELS'//
     * ' RESOLUTION=',E15.8,' Ry ',E15.8,' eV')
        W=1
 100    DO 30 I=1,M
       OM1=OM0(I)*CO1
       IF(NN.EQ.0) THEN
       A=OM0(I)-50.*DEL
       B=OM0(I)+50.*DEL
       ELSE
       A=OMI(W)
       B=OMF(W)
       END IF
       N=IDNINT((B-A)/H)+1
       WRITE(6,15)OM0(I),OM1,F(I),N,H,A,B
  15   FORMAT(/' OM0=',E15.8,' Ry', E15.8,' eV'/
     *        ' OSCILLATOR STRENGTH=',E15.8/
     *        ' N=',I3,' H=',E15.8/
     *        ' OM1= ',E15.8,' OM2= ',E15.8/ )
        WRITE(6,10)
  10    FORMAT('         CROSS SECTION  '/
     *         ' i    j','   EphRy          SMLMb') 
          DO 20 J=1,N
       IF(OM0(I).GE.OMI(W))THEN
       SIGM1=CO2*DEL*F(I)/
     * ((A-OM0(I))**2+(DEL/2)**2)
       SIGM2=SIGM1*27.98
       OM2=A*CO1
        WRITE(6,40)I,J,A,SIGM2 
  40    FORMAT(I2,I5,2E15.8)
       END IF
       A=A+H
  20      CONTINUE     
  30   CONTINUE
       IF(W.GE.NN) GOTO 200
       W=W+1
       GOTO 100
 200    RETURN
       END
