      program main
      include "parame.h"
      implicit real*8 (a-h,o-y)
      dimension t(n),wk(n,5)

      common /bio/np,mp
      common /bio1/rkout_on,rkout_off,
     &       rkout_min,rkmin,ec50,tau_a,tau_b      
      common /bio2/tstep,sig_height,sig_time

      external deriv
      
      in_num = 41 
      open(in_num,file='input_data',status='old')
1500  format(1000x)
      read(in_num,1500)
      read(in_num,*) ind_time_ode
      read(in_num,1500)
      read(in_num,*) ht, ht_print, t_max
      read(in_num,1500) 
      read(in_num,*) rkout_on,rkout_off, rkout_min,rkmin
      read(in_num,1500)
      read(in_num,*) np,mp,ec50,tau_a,tau_b      
      read(in_num,1500)
      read(in_num,*) tstep,sig_height,sig_time
      close(in_num)
      istart = 0


      nmax = t_max/ht + 1

      n_print = ht_print/ht
      
      time = 0

      print*, t_max,ht,ht_print,rkout_on,tau_a,tau_b

      print*, nmax, n_print, tstep, np, mp, ec50

      t(1) =0
      t(2) = 1
      t(3) = 1
      

      do i = 0, nmax


         if (mod(i,n_print).eq.0)  then
            print*, time,ind_time_ode
            write(1,*) time, t(1),t(2), t(3)
         endif 

         if (ind_time_ode.eq.1) then
            call am1(n,ht,time,t,deriv,wk,istart)
         endif
         if (ind_time_ode.eq.2) then
            call rk1(n,ht,time,t,deriv,wk,istart)
         endif


      enddo

      stop
      end
