!     -*- f90 -*-
!     This file is autogenerated with f2py (version:2)
!     It contains Fortran 90 wrappers to fortran functions.

      subroutine f2py_compar_getdims_ijkstart3_all(r,s,f2pysetdata,flag)
      use compar, only: d => ijkstart3_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_ijkstart3_all
      subroutine f2py_compar_getdims_ijkend3_all(r,s,f2pysetdata,flag)
      use compar, only: d => ijkend3_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_ijkend3_all
      subroutine f2py_compar_getdims_istart_all(r,s,f2pysetdata,flag)
      use compar, only: d => istart_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_istart_all
      subroutine f2py_compar_getdims_istart1_all(r,s,f2pysetdata,flag)
      use compar, only: d => istart1_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_istart1_all
      subroutine f2py_compar_getdims_istart2_all(r,s,f2pysetdata,flag)
      use compar, only: d => istart2_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_istart2_all
      subroutine f2py_compar_getdims_istart3_all(r,s,f2pysetdata,flag)
      use compar, only: d => istart3_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_istart3_all
      subroutine f2py_compar_getdims_jstart_all(r,s,f2pysetdata,flag)
      use compar, only: d => jstart_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jstart_all
      subroutine f2py_compar_getdims_jstart1_all(r,s,f2pysetdata,flag)
      use compar, only: d => jstart1_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jstart1_all
      subroutine f2py_compar_getdims_jstart2_all(r,s,f2pysetdata,flag)
      use compar, only: d => jstart2_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jstart2_all
      subroutine f2py_compar_getdims_jstart3_all(r,s,f2pysetdata,flag)
      use compar, only: d => jstart3_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jstart3_all
      subroutine f2py_compar_getdims_kstart_all(r,s,f2pysetdata,flag)
      use compar, only: d => kstart_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_kstart_all
      subroutine f2py_compar_getdims_kstart1_all(r,s,f2pysetdata,flag)
      use compar, only: d => kstart1_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_kstart1_all
      subroutine f2py_compar_getdims_kstart2_all(r,s,f2pysetdata,flag)
      use compar, only: d => kstart2_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_kstart2_all
      subroutine f2py_compar_getdims_kstart3_all(r,s,f2pysetdata,flag)
      use compar, only: d => kstart3_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_kstart3_all
      subroutine f2py_compar_getdims_iend_all(r,s,f2pysetdata,flag)
      use compar, only: d => iend_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_iend_all
      subroutine f2py_compar_getdims_iend1_all(r,s,f2pysetdata,flag)
      use compar, only: d => iend1_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_iend1_all
      subroutine f2py_compar_getdims_iend2_all(r,s,f2pysetdata,flag)
      use compar, only: d => iend2_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_iend2_all
      subroutine f2py_compar_getdims_iend3_all(r,s,f2pysetdata,flag)
      use compar, only: d => iend3_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_iend3_all
      subroutine f2py_compar_getdims_jend_all(r,s,f2pysetdata,flag)
      use compar, only: d => jend_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jend_all
      subroutine f2py_compar_getdims_jend1_all(r,s,f2pysetdata,flag)
      use compar, only: d => jend1_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jend1_all
      subroutine f2py_compar_getdims_jend2_all(r,s,f2pysetdata,flag)
      use compar, only: d => jend2_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jend2_all
      subroutine f2py_compar_getdims_jend3_all(r,s,f2pysetdata,flag)
      use compar, only: d => jend3_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jend3_all
      subroutine f2py_compar_getdims_kend_all(r,s,f2pysetdata,flag)
      use compar, only: d => kend_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_kend_all
      subroutine f2py_compar_getdims_kend1_all(r,s,f2pysetdata,flag)
      use compar, only: d => kend1_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_kend1_all
      subroutine f2py_compar_getdims_kend2_all(r,s,f2pysetdata,flag)
      use compar, only: d => kend2_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_kend2_all
      subroutine f2py_compar_getdims_kend3_all(r,s,f2pysetdata,flag)
      use compar, only: d => kend3_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_kend3_all
      subroutine f2py_compar_getdims_ijksize3_all(r,s,f2pysetdata,flag)
      use compar, only: d => ijksize3_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_ijksize3_all
      subroutine f2py_compar_getdims_displs(r,s,f2pysetdata,flag)
      use compar, only: d => displs

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_displs
      subroutine f2py_compar_getdims_imap(r,s,f2pysetdata,flag)
      use compar, only: d => imap

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_imap
      subroutine f2py_compar_getdims_jmap(r,s,f2pysetdata,flag)
      use compar, only: d => jmap

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jmap
      subroutine f2py_compar_getdims_kmap(r,s,f2pysetdata,flag)
      use compar, only: d => kmap

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_kmap
      subroutine f2py_compar_getdims_imap_c(r,s,f2pysetdata,flag)
      use compar, only: d => imap_c

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_imap_c
      subroutine f2py_compar_getdims_jmap_c(r,s,f2pysetdata,flag)
      use compar, only: d => jmap_c

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jmap_c
      subroutine f2py_compar_getdims_kmap_c(r,s,f2pysetdata,flag)
      use compar, only: d => kmap_c

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_kmap_c
      subroutine f2py_compar_getdims_ijk_array_of(r,s,f2pysetdata,flag)
      use compar, only: d => ijk_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1),s(2),s(3)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_ijk_array_of
      subroutine f2py_compar_getdims_funijk_map_c(r,s,f2pysetdata,flag)
      use compar, only: d => funijk_map_c

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1),s(2),s(3)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_funijk_map_c
      subroutine f2py_compar_getdims_west_array_of(r,s,f2pysetdata,flag)
      use compar, only: d => west_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_west_array_of
      subroutine f2py_compar_getdims_east_array_of(r,s,f2pysetdata,flag)
      use compar, only: d => east_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_east_array_of
      subroutine f2py_compar_getdims_south_array_of(r,s,f2pysetdata,flag&
     &)
      use compar, only: d => south_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_south_array_of
      subroutine f2py_compar_getdims_north_array_of(r,s,f2pysetdata,flag&
     &)
      use compar, only: d => north_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_north_array_of
      subroutine f2py_compar_getdims_bottom_array_of(r,s,f2pysetdata,fla&
     &g)
      use compar, only: d => bottom_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_bottom_array_of
      subroutine f2py_compar_getdims_top_array_of(r,s,f2pysetdata,flag)
      use compar, only: d => top_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_top_array_of
      subroutine f2py_compar_getdims_im_array_of(r,s,f2pysetdata,flag)
      use compar, only: d => im_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_im_array_of
      subroutine f2py_compar_getdims_ip_array_of(r,s,f2pysetdata,flag)
      use compar, only: d => ip_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_ip_array_of
      subroutine f2py_compar_getdims_jm_array_of(r,s,f2pysetdata,flag)
      use compar, only: d => jm_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jm_array_of
      subroutine f2py_compar_getdims_jp_array_of(r,s,f2pysetdata,flag)
      use compar, only: d => jp_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jp_array_of
      subroutine f2py_compar_getdims_km_array_of(r,s,f2pysetdata,flag)
      use compar, only: d => km_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_km_array_of
      subroutine f2py_compar_getdims_kp_array_of(r,s,f2pysetdata,flag)
      use compar, only: d => kp_array_of

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_kp_array_of
      subroutine f2py_compar_getdims_dead_cell_at(r,s,f2pysetdata,flag)
      use compar, only: d => dead_cell_at

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1),s(2),s(3)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_dead_cell_at
      subroutine f2py_compar_getdims_lgc_east(r,s,f2pysetdata,flag)
      use compar, only: d => lgc_east

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_lgc_east
      subroutine f2py_compar_getdims_lgc_west(r,s,f2pysetdata,flag)
      use compar, only: d => lgc_west

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_lgc_west
      subroutine f2py_compar_getdims_lgc_north(r,s,f2pysetdata,flag)
      use compar, only: d => lgc_north

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_lgc_north
      subroutine f2py_compar_getdims_lgc_south(r,s,f2pysetdata,flag)
      use compar, only: d => lgc_south

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_lgc_south
      subroutine f2py_compar_getdims_lgc_top(r,s,f2pysetdata,flag)
      use compar, only: d => lgc_top

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_lgc_top
      subroutine f2py_compar_getdims_lgc_bottom(r,s,f2pysetdata,flag)
      use compar, only: d => lgc_bottom

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_lgc_bottom
      subroutine f2py_compar_getdims_isize_all(r,s,f2pysetdata,flag)
      use compar, only: d => isize_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_isize_all
      subroutine f2py_compar_getdims_jsize_all(r,s,f2pysetdata,flag)
      use compar, only: d => jsize_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_jsize_all
      subroutine f2py_compar_getdims_ksize_all(r,s,f2pysetdata,flag)
      use compar, only: d => ksize_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_ksize_all
      subroutine f2py_compar_getdims_ncpp_uniform(r,s,f2pysetdata,flag)
      use compar, only: d => ncpp_uniform

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_ncpp_uniform
      subroutine f2py_compar_getdims_new_ijksize3_all(r,s,f2pysetdata,fl&
     &ag)
      use compar, only: d => new_ijksize3_all

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_compar_getdims_new_ijksize3_all
      
      subroutine f2pyinitcompar(f2pysetupfunc)
      use compar, only : mype
      use compar, only : numpes
      use compar, only : mpierr
      use compar, only : pe_io
      use compar, only : nodesi
      use compar, only : nodesj
      use compar, only : nodesk
      use compar, only : dlb_nodesi
      use compar, only : dlb_nodesj
      use compar, only : dlb_nodesk
      use compar, only : root
      use compar, only : nlayers_bicgs
      use compar, only : ijkstart3_all
      use compar, only : ijkend3_all
      use compar, only : istart_all
      use compar, only : istart1_all
      use compar, only : istart2_all
      use compar, only : istart3_all
      use compar, only : jstart_all
      use compar, only : jstart1_all
      use compar, only : jstart2_all
      use compar, only : jstart3_all
      use compar, only : kstart_all
      use compar, only : kstart1_all
      use compar, only : kstart2_all
      use compar, only : kstart3_all
      use compar, only : iend_all
      use compar, only : iend1_all
      use compar, only : iend2_all
      use compar, only : iend3_all
      use compar, only : jend_all
      use compar, only : jend1_all
      use compar, only : jend2_all
      use compar, only : jend3_all
      use compar, only : kend_all
      use compar, only : kend1_all
      use compar, only : kend2_all
      use compar, only : kend3_all
      use compar, only : ijksize3_all
      use compar, only : displs
      use compar, only : imap
      use compar, only : jmap
      use compar, only : kmap
      use compar, only : imap_c
      use compar, only : jmap_c
      use compar, only : kmap_c
      use compar, only : ijksize3
      use compar, only : ijkstart3
      use compar, only : ijkend3
      use compar, only : istart3
      use compar, only : iend3
      use compar, only : jstart3
      use compar, only : jend3
      use compar, only : kstart3
      use compar, only : kend3
      use compar, only : istart2
      use compar, only : iend2
      use compar, only : jstart2
      use compar, only : jend2
      use compar, only : kstart2
      use compar, only : kend2
      use compar, only : istart1
      use compar, only : iend1
      use compar, only : jstart1
      use compar, only : jend1
      use compar, only : kstart1
      use compar, only : kend1
      use compar, only : istart
      use compar, only : iend
      use compar, only : jstart
      use compar, only : jend
      use compar, only : kstart
      use compar, only : kend
      use compar, only : fbname
      use compar, only : idbg
      use compar, only : c0
      use compar, only : c1
      use compar, only : c2
      use compar, only : ijk_array_of
      use compar, only : funijk_map_c
      use compar, only : west_array_of
      use compar, only : east_array_of
      use compar, only : south_array_of
      use compar, only : north_array_of
      use compar, only : bottom_array_of
      use compar, only : top_array_of
      use compar, only : im_array_of
      use compar, only : ip_array_of
      use compar, only : jm_array_of
      use compar, only : jp_array_of
      use compar, only : km_array_of
      use compar, only : kp_array_of
      use compar, only : dead_cell_at
      use compar, only : increment_arrays_allocated
      use compar, only : ngc_east
      use compar, only : ngc_west
      use compar, only : ngc_north
      use compar, only : ngc_south
      use compar, only : ngc_top
      use compar, only : ngc_bottom
      use compar, only : lgc_east
      use compar, only : lgc_west
      use compar, only : lgc_north
      use compar, only : lgc_south
      use compar, only : lgc_top
      use compar, only : lgc_bottom
      use compar, only : isize_all
      use compar, only : jsize_all
      use compar, only : ksize_all
      use compar, only : domain_size_adjusted
      use compar, only : ncpp_uniform
      use compar, only : ncpp_uniform_backed_up
      use compar, only : new_ijksize3_all
      use compar, only : short_gridmap_init
      use compar, only : adjust_partition
      external f2pysetupfunc
      external f2py_compar_getdims_ijkstart3_all
      external f2py_compar_getdims_ijkend3_all
      external f2py_compar_getdims_istart_all
      external f2py_compar_getdims_istart1_all
      external f2py_compar_getdims_istart2_all
      external f2py_compar_getdims_istart3_all
      external f2py_compar_getdims_jstart_all
      external f2py_compar_getdims_jstart1_all
      external f2py_compar_getdims_jstart2_all
      external f2py_compar_getdims_jstart3_all
      external f2py_compar_getdims_kstart_all
      external f2py_compar_getdims_kstart1_all
      external f2py_compar_getdims_kstart2_all
      external f2py_compar_getdims_kstart3_all
      external f2py_compar_getdims_iend_all
      external f2py_compar_getdims_iend1_all
      external f2py_compar_getdims_iend2_all
      external f2py_compar_getdims_iend3_all
      external f2py_compar_getdims_jend_all
      external f2py_compar_getdims_jend1_all
      external f2py_compar_getdims_jend2_all
      external f2py_compar_getdims_jend3_all
      external f2py_compar_getdims_kend_all
      external f2py_compar_getdims_kend1_all
      external f2py_compar_getdims_kend2_all
      external f2py_compar_getdims_kend3_all
      external f2py_compar_getdims_ijksize3_all
      external f2py_compar_getdims_displs
      external f2py_compar_getdims_imap
      external f2py_compar_getdims_jmap
      external f2py_compar_getdims_kmap
      external f2py_compar_getdims_imap_c
      external f2py_compar_getdims_jmap_c
      external f2py_compar_getdims_kmap_c
      external f2py_compar_getdims_ijk_array_of
      external f2py_compar_getdims_funijk_map_c
      external f2py_compar_getdims_west_array_of
      external f2py_compar_getdims_east_array_of
      external f2py_compar_getdims_south_array_of
      external f2py_compar_getdims_north_array_of
      external f2py_compar_getdims_bottom_array_of
      external f2py_compar_getdims_top_array_of
      external f2py_compar_getdims_im_array_of
      external f2py_compar_getdims_ip_array_of
      external f2py_compar_getdims_jm_array_of
      external f2py_compar_getdims_jp_array_of
      external f2py_compar_getdims_km_array_of
      external f2py_compar_getdims_kp_array_of
      external f2py_compar_getdims_dead_cell_at
      external f2py_compar_getdims_lgc_east
      external f2py_compar_getdims_lgc_west
      external f2py_compar_getdims_lgc_north
      external f2py_compar_getdims_lgc_south
      external f2py_compar_getdims_lgc_top
      external f2py_compar_getdims_lgc_bottom
      external f2py_compar_getdims_isize_all
      external f2py_compar_getdims_jsize_all
      external f2py_compar_getdims_ksize_all
      external f2py_compar_getdims_ncpp_uniform
      external f2py_compar_getdims_new_ijksize3_all
      call f2pysetupfunc(mype,numpes,mpierr,pe_io,nodesi,nodesj,nodesk,d&
     &lb_nodesi,dlb_nodesj,dlb_nodesk,root,nlayers_bicgs,f2py_compar_get&
     &dims_ijkstart3_all,f2py_compar_getdims_ijkend3_all,f2py_compar_get&
     &dims_istart_all,f2py_compar_getdims_istart1_all,f2py_compar_getdim&
     &s_istart2_all,f2py_compar_getdims_istart3_all,f2py_compar_getdims_&
     &jstart_all,f2py_compar_getdims_jstart1_all,f2py_compar_getdims_jst&
     &art2_all,f2py_compar_getdims_jstart3_all,f2py_compar_getdims_kstar&
     &t_all,f2py_compar_getdims_kstart1_all,f2py_compar_getdims_kstart2_&
     &all,f2py_compar_getdims_kstart3_all,f2py_compar_getdims_iend_all,f&
     &2py_compar_getdims_iend1_all,f2py_compar_getdims_iend2_all,f2py_co&
     &mpar_getdims_iend3_all,f2py_compar_getdims_jend_all,f2py_compar_ge&
     &tdims_jend1_all,f2py_compar_getdims_jend2_all,f2py_compar_getdims_&
     &jend3_all,f2py_compar_getdims_kend_all,f2py_compar_getdims_kend1_a&
     &ll,f2py_compar_getdims_kend2_all,f2py_compar_getdims_kend3_all,f2p&
     &y_compar_getdims_ijksize3_all,f2py_compar_getdims_displs,f2py_comp&
     &ar_getdims_imap,f2py_compar_getdims_jmap,f2py_compar_getdims_kmap,&
     &f2py_compar_getdims_imap_c,f2py_compar_getdims_jmap_c,f2py_compar_&
     &getdims_kmap_c,ijksize3,ijkstart3,ijkend3,istart3,iend3,jstart3,je&
     &nd3,kstart3,kend3,istart2,iend2,jstart2,jend2,kstart2,kend2,istart&
     &1,iend1,jstart1,jend1,kstart1,kend1,istart,iend,jstart,jend,kstart&
     &,kend,fbname,idbg,c0,c1,c2,f2py_compar_getdims_ijk_array_of,f2py_c&
     &ompar_getdims_funijk_map_c,f2py_compar_getdims_west_array_of,f2py_&
     &compar_getdims_east_array_of,f2py_compar_getdims_south_array_of,f2&
     &py_compar_getdims_north_array_of,f2py_compar_getdims_bottom_array_&
     &of,f2py_compar_getdims_top_array_of,f2py_compar_getdims_im_array_o&
     &f,f2py_compar_getdims_ip_array_of,f2py_compar_getdims_jm_array_of,&
     &f2py_compar_getdims_jp_array_of,f2py_compar_getdims_km_array_of,f2&
     &py_compar_getdims_kp_array_of,f2py_compar_getdims_dead_cell_at,inc&
     &rement_arrays_allocated,ngc_east,ngc_west,ngc_north,ngc_south,ngc_&
     &top,ngc_bottom,f2py_compar_getdims_lgc_east,f2py_compar_getdims_lg&
     &c_west,f2py_compar_getdims_lgc_north,f2py_compar_getdims_lgc_south&
     &,f2py_compar_getdims_lgc_top,f2py_compar_getdims_lgc_bottom,f2py_c&
     &ompar_getdims_isize_all,f2py_compar_getdims_jsize_all,f2py_compar_&
     &getdims_ksize_all,domain_size_adjusted,f2py_compar_getdims_ncpp_un&
     &iform,ncpp_uniform_backed_up,f2py_compar_getdims_new_ijksize3_all,&
     &short_gridmap_init,adjust_partition)
      end subroutine f2pyinitcompar

      subroutine f2pywrap_exit_check_exit_flag (check_exit_flagf2pywrap)
      use exit, only : check_exit_flag
      logical check_exit_flagf2pywrap
      check_exit_flagf2pywrap = .not.(.not.check_exit_flag())
      end subroutine f2pywrap_exit_check_exit_flag
      
      subroutine f2pyinitexit(f2pysetupfunc)
      use exit, only : exit_flag
      use exit, only : mfix_exit
      use exit, only : close_file
      interface 
      subroutine f2pywrap_exit_check_exit_flag (check_exit_flagf2pywrap,&
     & check_exit_flag)
      logical check_exit_flag
      logical check_exit_flagf2pywrap
      end subroutine f2pywrap_exit_check_exit_flag
      end interface
      external f2pysetupfunc
      call f2pysetupfunc(exit_flag,mfix_exit,f2pywrap_exit_check_exit_fl&
     &ag,close_file)
      end subroutine f2pyinitexit

      subroutine f2py_iterate_getdims_errorpercent(r,s,f2pysetdata,flag)
      use iterate, only: d => errorpercent

      integer flag
      external f2pysetdata
      logical ns
      integer r,i
      integer(8) s(*)
      ns = .FALSE.
      if (allocated(d)) then
         do i=1,r
            if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then
               ns = .TRUE.
            end if
         end do
         if (ns) then
            deallocate(d)
         end if
      end if
      if ((.not.allocated(d)).and.(s(1).ge.1)) then
       allocate(d(s(1)))
      end if
      if (allocated(d)) then
         do i=1,r
            s(i) = size(d,i)
         end do
      end if
      flag = 1
      call f2pysetdata(d,allocated(d))
      end subroutine f2py_iterate_getdims_errorpercent
      subroutine f2pywrap_iterate_adjustdt (adjustdtf2pywrap, mfix_dat)
      use iterate, only : adjustdt
      character(len=*) mfix_dat
      logical adjustdtf2pywrap
      adjustdtf2pywrap = .not.(.not.adjustdt(mfix_dat))
      end subroutine f2pywrap_iterate_adjustdt
      
      subroutine f2pyinititerate(f2pysetupfunc)
      use iterate, only : mustit
      use iterate, only : nit
      use iterate, only : max_nit
      use iterate, only : converged
      use iterate, only : diverged
      use iterate, only : tleft
      use iterate, only : normg
      use iterate, only : norms
      use iterate, only : setg
      use iterate, only : sets
      use iterate, only : resg
      use iterate, only : ress
      use iterate, only : smass
      use iterate, only : errorpercent
      use iterate, only : lmsg
      use iterate, only : call_solve_pp_g
      use iterate, only : iterate_init
      use iterate, only : do_iteration
      use iterate, only : post_iterate
      use iterate, only : log_diverged
      use iterate, only : log_converged
      use iterate, only : goalseekmassflux
      interface 
      subroutine f2pywrap_iterate_adjustdt (adjustdtf2pywrap, adjustdt, &
     &mfix_dat)
      logical adjustdt
      character(len=*) mfix_dat
      logical adjustdtf2pywrap
      end subroutine f2pywrap_iterate_adjustdt
      end interface
      external f2pysetupfunc
      external f2py_iterate_getdims_errorpercent
      call f2pysetupfunc(mustit,nit,max_nit,converged,diverged,tleft,nor&
     &mg,norms,setg,sets,resg,ress,smass,f2py_iterate_getdims_errorperce&
     &nt,lmsg,call_solve_pp_g,iterate_init,do_iteration,post_iterate,log&
     &_diverged,log_converged,goalseekmassflux,f2pywrap_iterate_adjustdt&
     &)
      end subroutine f2pyinititerate

      
      subroutine f2pyinitmachine(f2pysetupfunc)
      use machine, only : open_n1
      use machine, only : nwords_dp
      use machine, only : nwords_r
      use machine, only : nwords_i
      use machine, only : id_node
      use machine, only : id_month
      use machine, only : id_day
      use machine, only : id_year
      use machine, only : id_hour
      use machine, only : id_minute
      use machine, only : id_second
      use machine, only : get_run_id
      use machine, only : start_log
      use machine, only : end_log
      external f2pysetupfunc
      call f2pysetupfunc(open_n1,nwords_dp,nwords_r,nwords_i,id_node,id_&
     &month,id_day,id_year,id_hour,id_minute,id_second,get_run_id,start_&
     &log,end_log)
      end subroutine f2pyinitmachine

      
      subroutine f2pyinitmain(f2pysetupfunc)
      use main, only : cpu1
      use main, only : cputime_used
      use main, only : walltime_used
      use main, only : version
      use main, only : nit_total
      use main, only : ncheck
      use main, only : dncheck
      use main, only : cmd_line_args
      use main, only : cmd_line_args_count
      use main, only : run_mfix0
      use main, only : initialize
      use main, only : get_data
      use main, only : check_data
      use main, only : finalize
      use main, only : add_command_line_keyword
      use main, only : print_flags
      external f2pysetupfunc
      call f2pysetupfunc(cpu1,cputime_used,walltime_used,version,nit_tot&
     &al,ncheck,dncheck,cmd_line_args,cmd_line_args_count,run_mfix0,init&
     &ialize,get_data,check_data,finalize,add_command_line_keyword,print&
     &_flags)
      end subroutine f2pyinitmain

      
      subroutine f2pyinitparallel_mpi(f2pysetupfunc)
      use parallel_mpi, only : parallel_init
      use parallel_mpi, only : parallel_fin
      use parallel_mpi, only : mpi_check
      external f2pysetupfunc
      call f2pysetupfunc(parallel_init,parallel_fin,mpi_check)
      end subroutine f2pyinitparallel_mpi

      
      subroutine f2pyinitparam(f2pysetupfunc)
      use param, only : dimension_i
      use param, only : dimension_j
      use param, only : dimension_k
      use param, only : dimension_3_alloc
      use param, only : dimension_3
      use param, only : dimension_3l
      use param, only : dimension_3g
      use param, only : dimension_3p
      use param, only : dimension_4
      use param, only : dimension_m
      use param, only : dimension_n_g
      use param, only : dimension_n_s
      use param, only : dimension_scalar
      use param, only : dim_scalar2
      use param, only : east
      use param, only : west
      use param, only : north
      use param, only : south
      use param, only : top
      use param, only : bottom
      use param, only : dimension_rxn
      use param, only : dimension_c
      use param, only : dimension_ic
      use param, only : dimension_bc
      use param, only : dimension_is
      use param, only : dimension_ps
      use param, only : dim_m
      use param, only : dim_n_g
      use param, only : dim_n_s
      use param, only : dim_n
      use param, only : dim_n_all
      use param, only : dim_i
      use param, only : dim_j
      use param, only : dim_k
      use param, only : dimension_usr
      use param, only : dim_scalar
      use param, only : dim_eqs
      use param, only : filler
      external f2pysetupfunc
      call f2pysetupfunc(dimension_i,dimension_j,dimension_k,dimension_3&
     &_alloc,dimension_3,dimension_3l,dimension_3g,dimension_3p,dimensio&
     &n_4,dimension_m,dimension_n_g,dimension_n_s,dimension_scalar,dim_s&
     &calar2,east,west,north,south,top,bottom,dimension_rxn,dimension_c,&
     &dimension_ic,dimension_bc,dimension_is,dimension_ps,dim_m,dim_n_g,&
     &dim_n_s,dim_n,dim_n_all,dim_i,dim_j,dim_k,dimension_usr,dim_scalar&
     &,dim_eqs,filler)
      end subroutine f2pyinitparam

      subroutine f2pywrap_pause_paused_flag_bcast (paused_flag_bcastf2py&
     &wrap)
      use pause, only : paused_flag_bcast
      logical paused_flag_bcastf2pywrap
      paused_flag_bcastf2pywrap = .not.(.not.paused_flag_bcast())
      end subroutine f2pywrap_pause_paused_flag_bcast
      subroutine f2pywrap_pause_check_reinit_flag (check_reinit_flagf2py&
     &wrap)
      use pause, only : check_reinit_flag
      logical check_reinit_flagf2pywrap
      check_reinit_flagf2pywrap = .not.(.not.check_reinit_flag())
      end subroutine f2pywrap_pause_check_reinit_flag
      
      subroutine f2pyinitpause(f2pysetupfunc)
      use pause, only : pause_flag
      use pause, only : reinit_flag
      use pause, only : autostart_flag
      use pause, only : ier
      use pause, only : reinit_data
      use pause, only : wait_while_paused
      use pause, only : set_reinit_data
      use pause, only : do_reinit
      use pause, only : usleep
      interface 
      subroutine f2pywrap_pause_paused_flag_bcast (paused_flag_bcastf2py&
     &wrap, paused_flag_bcast)
      logical paused_flag_bcast
      logical paused_flag_bcastf2pywrap
      end subroutine f2pywrap_pause_paused_flag_bcast 
      subroutine f2pywrap_pause_check_reinit_flag (check_reinit_flagf2py&
     &wrap, check_reinit_flag)
      logical check_reinit_flag
      logical check_reinit_flagf2pywrap
      end subroutine f2pywrap_pause_check_reinit_flag
      end interface
      external f2pysetupfunc
      call f2pysetupfunc(pause_flag,reinit_flag,autostart_flag,ier,reini&
     &t_data,wait_while_paused,f2pywrap_pause_paused_flag_bcast,f2pywrap&
     &_pause_check_reinit_flag,set_reinit_data,do_reinit,usleep)
      end subroutine f2pyinitpause

      subroutine f2pywrap_residual_pub_get_resid_string_count (get_resid&
     &_string_countf2pywrap)
      use residual_pub, only : get_resid_string_count
      integer get_resid_string_countf2pywrap
      get_resid_string_countf2pywrap = get_resid_string_count()
      end subroutine f2pywrap_residual_pub_get_resid_string_count
      subroutine f2pywrap_residual_pub_get_resid_string (get_resid_strin&
     &gf2pywrap, index_bn)
      use residual_pub, only : get_resid_string
      integer index_bn
      character(len=4) get_resid_stringf2pywrap
      get_resid_stringf2pywrap = get_resid_string(index_bn)
      end subroutine f2pywrap_residual_pub_get_resid_string
      subroutine f2pywrap_residual_pub_get_resid_grp_string_count (get_r&
     &esid_grp_string_countf2pywrap)
      use residual_pub, only : get_resid_grp_string_count
      integer get_resid_grp_string_countf2pywrap
      get_resid_grp_string_countf2pywrap = get_resid_grp_string_count()
      end subroutine f2pywrap_residual_pub_get_resid_grp_string_count
      subroutine f2pywrap_residual_pub_get_resid_grp_string (get_resid_g&
     &rp_stringf2pywrap, index_bn)
      use residual_pub, only : get_resid_grp_string
      integer index_bn
      character(len=8) get_resid_grp_stringf2pywrap
      get_resid_grp_stringf2pywrap = get_resid_grp_string(index_bn)
      end subroutine f2pywrap_residual_pub_get_resid_grp_string
      subroutine f2pywrap_residual_pub_get_resid (get_residf2pywrap, ind&
     &ex_bn)
      use residual_pub, only : get_resid
      integer index_bn
      double precision get_residf2pywrap
      get_residf2pywrap = get_resid(index_bn)
      end subroutine f2pywrap_residual_pub_get_resid
      subroutine f2pywrap_residual_pub_get_resid_grp (get_resid_grpf2pyw&
     &rap, index_bn)
      use residual_pub, only : get_resid_grp
      integer index_bn
      double precision get_resid_grpf2pywrap
      get_resid_grpf2pywrap = get_resid_grp(index_bn)
      end subroutine f2pywrap_residual_pub_get_resid_grp
      
      subroutine f2pyinitresidual_pub(f2pysetupfunc)
      use residual_pub, only : group_resid
      interface 
      subroutine f2pywrap_residual_pub_get_resid_string_count (get_resid&
     &_string_countf2pywrap, get_resid_string_count)
      integer get_resid_string_count
      integer get_resid_string_countf2pywrap
      end subroutine f2pywrap_residual_pub_get_resid_string_count 
      subroutine f2pywrap_residual_pub_get_resid_string (get_resid_strin&
     &gf2pywrap, get_resid_string, index_bn)
      integer index_bn
      character(len=4) get_resid_string
      character(len=4) get_resid_stringf2pywrap
      end subroutine f2pywrap_residual_pub_get_resid_string 
      subroutine f2pywrap_residual_pub_get_resid_grp_string_count (get_r&
     &esid_grp_string_countf2pywrap, get_resid_grp_string_count)
      integer get_resid_grp_string_count
      integer get_resid_grp_string_countf2pywrap
      end subroutine f2pywrap_residual_pub_get_resid_grp_string_count 
      subroutine f2pywrap_residual_pub_get_resid_grp_string (get_resid_g&
     &rp_stringf2pywrap, get_resid_grp_string, index_bn)
      integer index_bn
      character(len=8) get_resid_grp_string
      character(len=8) get_resid_grp_stringf2pywrap
      end subroutine f2pywrap_residual_pub_get_resid_grp_string 
      subroutine f2pywrap_residual_pub_get_resid (get_residf2pywrap, get&
     &_resid, index_bn)
      double precision get_resid
      integer index_bn
      double precision get_residf2pywrap
      end subroutine f2pywrap_residual_pub_get_resid 
      subroutine f2pywrap_residual_pub_get_resid_grp (get_resid_grpf2pyw&
     &rap, get_resid_grp, index_bn)
      double precision get_resid_grp
      integer index_bn
      double precision get_resid_grpf2pywrap
      end subroutine f2pywrap_residual_pub_get_resid_grp
      end interface
      external f2pysetupfunc
      call f2pysetupfunc(group_resid,f2pywrap_residual_pub_get_resid_str&
     &ing_count,f2pywrap_residual_pub_get_resid_string,f2pywrap_residual&
     &_pub_get_resid_grp_string_count,f2pywrap_residual_pub_get_resid_gr&
     &p_string,f2pywrap_residual_pub_get_resid,f2pywrap_residual_pub_get&
     &_resid_grp)
      end subroutine f2pyinitresidual_pub

      
      subroutine f2pyinitrun(f2pysetupfunc)
      use run, only : run_name
      use run, only : description
      use run, only : units
      use run, only : run_type
      use run, only : automatic_restart
      use run, only : iter_restart
      use run, only : id_version
      use run, only : time
      use run, only : tstop
      use run, only : dt
      use run, only : odt
      use run, only : steady_state
      use run, only : nstep
      use run, only : nsteprst
      use run, only : discretize
      use run, only : chi_scheme
      use run, only : momentum_x_eq
      use run, only : momentum_y_eq
      use run, only : momentum_z_eq
      use run, only : jackson
      use run, only : ishii
      use run, only : model_b
      use run, only : added_mass
      use run, only : m_am
      use run, only : energy_eq
      use run, only : def_cor
      use run, only : cn_on
      use run, only : granular_energy
      use run, only : species_eq
      use run, only : any_species_eq
      use run, only : call_usr
      use run, only : persistent_mode
      use run, only : call_dqmom
      use run, only : subgrid_wall
      use run, only : filter_size_ratio
      use run, only : cd_function
      use run, only : lam_hys
      use run, only : simonin
      use run, only : ahmadi
      use run, only : friction_model
      use run, only : schaeffer
      use run, only : friction
      use run, only : savage
      use run, only : blending_function
      use run, only : blending_stress
      use run, only : tanh_blend
      use run, only : sigm_blend
      use run, only : jenkins
      use run, only : bc_jj_m
      use run, only : phip_out_jj
      use run, only : phip_out_iter
      use run, only : shear
      use run, only : v_sh
      use run, only : yu_standish
      use run, only : fedors_landel
      use run, only : chk_batchq_end
      use run, only : batch_wallclock
      use run, only : term_buffer
      use run, only : auto_restart
      use run, only : reinitializing
      use run, only : timestep_fail_rate
      use run, only : dt_dir
      use run, only : dt_max
      use run, only : dt_min
      use run, only : dt_fac
      use run, only : dt_prev
      use run, only : use_dt_prev
      use run, only : detect_stall
      use run, only : debug_resid
      use run, only : solve_ros
      use run, only : any_solve_ros
      use run, only : solids_model
      use run, only : discrete_element
      use run, only : des_continuum_coupled
      use run, only : tfm_solids
      use run, only : dem_solids
      use run, only : pic_solids
      use run, only : tfm_count
      use run, only : dem_count
      use run, only : pic_count
      use run, only : ier
      use run, only : tunit
      use run, only : ppo
      use run, only : optflag1
      use run, only : get_tunit
      external f2pysetupfunc
      call f2pysetupfunc(run_name,description,units,run_type,automatic_r&
     &estart,iter_restart,id_version,time,tstop,dt,odt,steady_state,nste&
     &p,nsteprst,discretize,chi_scheme,momentum_x_eq,momentum_y_eq,momen&
     &tum_z_eq,jackson,ishii,model_b,added_mass,m_am,energy_eq,def_cor,c&
     &n_on,granular_energy,species_eq,any_species_eq,call_usr,persistent&
     &_mode,call_dqmom,subgrid_wall,filter_size_ratio,cd_function,lam_hy&
     &s,simonin,ahmadi,friction_model,schaeffer,friction,savage,blending&
     &_function,blending_stress,tanh_blend,sigm_blend,jenkins,bc_jj_m,ph&
     &ip_out_jj,phip_out_iter,shear,v_sh,yu_standish,fedors_landel,chk_b&
     &atchq_end,batch_wallclock,term_buffer,auto_restart,reinitializing,&
     &timestep_fail_rate,dt_dir,dt_max,dt_min,dt_fac,dt_prev,use_dt_prev&
     &,detect_stall,debug_resid,solve_ros,any_solve_ros,solids_model,dis&
     &crete_element,des_continuum_coupled,tfm_solids,dem_solids,pic_soli&
     &ds,tfm_count,dem_count,pic_count,ier,tunit,ppo,optflag1,get_tunit)
      end subroutine f2pyinitrun

      subroutine f2pywrap_time_cpu_wall_time (wall_timef2pywrap)
      use time_cpu, only : wall_time
      double precision wall_timef2pywrap
      wall_timef2pywrap = wall_time()
      end subroutine f2pywrap_time_cpu_wall_time
      
      subroutine f2pyinittime_cpu(f2pysetupfunc)
      use time_cpu, only : cpuos
      use time_cpu, only : cpu_nlog
      use time_cpu, only : time_nlog
      use time_cpu, only : cpu0
      use time_cpu, only : cpu_io
      use time_cpu, only : cpu00
      use time_cpu, only : wall0
      use time_cpu, only : time_start
      use time_cpu, only : wall_start
      use time_cpu, only : wall_pause_start
      use time_cpu, only : wall_paused
      interface 
      subroutine f2pywrap_time_cpu_wall_time (wall_timef2pywrap, wall_ti&
     &me)
      double precision wall_time
      double precision wall_timef2pywrap
      end subroutine f2pywrap_time_cpu_wall_time
      end interface
      external f2pysetupfunc
      call f2pysetupfunc(cpuos,cpu_nlog,time_nlog,cpu0,cpu_io,cpu00,wall&
     &0,time_start,wall_start,wall_pause_start,wall_paused,f2pywrap_time&
     &_cpu_wall_time)
      end subroutine f2pyinittime_cpu


