      SUBROUTINE loadcommon(  NX1, NY1, NZ1,
     &     lenx1, leny1, lenz1,
     &     Det_t, nits, dt1,
     &     derivative_type1, field_type1,
     &     racc, dbob1, b01,
     &     integer_input, double_input,
     &     num_integers, num_doubles )

      integer NX1, NY1, NZ1, nits
      double precision lenx1, leny1, lenz1
      double precision Det_t, dt1
      integer derivative_type1, field_type1
      double precision racc, dbob1, b01
      double precision double_input(*)
      integer integer_input(*)
      integer num_integers, num_doubles

c     defintion of all common blocks for use within
c     fortran subroutines

      integer NX, NY, NZ
      double precision lenx,leny,lenz
      common /box/ lenx, leny, lenz, NX, NY, NZ

      double precision eps
      common /eps/ eps

      double precision  b0, dbob
      common /bfield/  b0, dbob

      integer  field_type, derivative_type
      common /setup/  field_type, derivative_type

      double precision delx,dely,delz
      common /grids/ delx,dely,delz

      double precision dtau
      common /gridt/ dtau
c
      logical debug
      common /debug/ debug
      
      double precision timet1, timet2, currentdeltat 
      double precision guessdeltat, totalnits, dt

      common /times/ timet1, timet2, currentdeltat, 
     & guessdeltat, totalnits, dt


      integer intinput(100)
      common /intinput/ intinput

      double precision dbleinput(100)
      common /dbleinput/ dbleinput
      
      integer ikind
      common /ikind/ ikind

      integer i

      ikind = 0

      NX = NX1
      NY = NY1
      NZ = NZ1
      dbob = dbob1
      b0 = b01
      lenx = dble(lenx1)
      leny = dble(leny1)
      lenz = dble(lenz1)
      field_type = field_type1
      derivative_type = derivative_type1
      eps = racc

      delx = lenx / dble(NX)
      dely = leny / dble(NY)
      delz = lenz / dble(NZ)

      totalnits = nits

      dt = dt1
      guessdeltat = dt1

      dtau = dble(nits) * Det_t
      
      do i = 1, num_integers
         intinput(i) = integer_input(i)
      end do

      do i = 1, num_doubles
         dbleinput(i) = double_input(i)
      end do

c      write(*,*) 'done load'
      end
