      SUBROUTINE DIODE2(V, NV, TSTART, TSTOP, DT, D, EQUIL, KMAX
     1   , XPOLY, KINIT, ERROR, ERRPAR, ERPUTS, HANDLE)
      INTEGER NV
      EXTERNAL D, ERROR, HANDLE
      INTEGER KMAX, KINIT
      REAL ERRPAR(2)
      LOGICAL EQUIL, XPOLY, ERPUTS
      DOUBLE PRECISION V(NV), TSTART, TSTOP, DT
      EXTERNAL DIODED, DIODEN
      INTEGER KEEJAC, MINIT, MAXIT
      DOUBLE PRECISION THETA
C THE THIRD LEVEL OF DIODES.
C CHECK THE INPUT FOR ERRORS.
      IF (.NOT. EQUIL) GOTO 1
         THETA = 1
         GOTO  2
   1     THETA = 0.5D0
   2  KEEJAC = 0
      MINIT = 10
      MAXIT = 15
      CALL DIODE3(V, NV, TSTART, TSTOP, DT, D, THETA, KEEJAC, MINIT,
     1   MAXIT, KMAX, XPOLY, KINIT, ERROR, ERRPAR, ERPUTS, DIODEN,
     2   DIODED, HANDLE)
      RETURN
      END
