      module types
      integer ,  parameter:: I4B=SELECTED_INT_KIND (9) 
      integer ,  parameter:: I2B=SELECTED_INT_KIND (4) 
      integer ,  parameter:: I1B=SELECTED_INT_KIND (2) 
      integer ,  parameter:: SP=KIND (1.0D0) 
      end module


      module hpfprocessors
!HPF$      processors PROC(4)
      end module


      module diff_interface
      interface 
         subroutine diff_x(nx, ny, nz, h, f, df)
         use types
         use hpfprocessors
         integer (I4B):: nx,ny,nz
         real (SP):: h
         real (SP),  dimension(:,:,:),intent(in):: f 
         real (SP),  dimension(:,:,:),intent(out):: df 
!HPF$      distribute * (*,*,block) onto * PROC :: f
!HPF$      align with * f :: df
         end subroutine

         subroutine diff_y(nx, ny, nz, h, f, df)
         use types
         use hpfprocessors
         integer (I4B):: nx,ny,nz
         real (SP):: h
         real (SP),  dimension(:,:,:),intent(in):: f 
         real (SP),  dimension(:,:,:),intent(out):: df 
!HPF$      distribute * (*,*,block) onto * PROC :: f
!HPF$      align with * f :: df
         end subroutine

         subroutine diff_z(nx, ny, nz, h, f, df)
         use types
         use hpfprocessors
         integer (I4B):: nx,ny,nz
         real (SP):: h
         real (SP),  dimension(:,:,:),intent(in):: f 
         real (SP),  dimension(:,:,:),intent(out):: df 
!HPF$      distribute * (*,*,block) onto * PROC :: f
!HPF$      align with * f :: df
         end subroutine

      end interface
      end module


      subroutine evolve_k5(k11m1, k12m1, k13m1, k21m1, k22m1, k23m1, k31&
     &m1, k32m1, k33m1, t11, t12, t13, t21, t22, t23, t31, t32, t33, dt)

      use types
      use hpfprocessors
      real (SP),  dimension(:,:,:),intent(inout):: k11m1,k12m1,k13m1,k21&
     &m1,k22m1,k23m1,k31m1,k32m1,k33m1 
      real (SP),  dimension(:,:,:),intent(inout):: t11,t12,t13,t21,t22,t&
     &23,t31,t32,t33 
      real (SP):: dt
!HPF$      distribute * (*,*,block) onto * PROC :: k11m1
!HPF$      align with * k11m1 :: k12m1,k13m1,k21m1,k22m1,k23m1,k31m1,k32&
!HPF$&m1,k33m1
!HPF$      align with * k11m1 :: t11,t12,t13,t21,t22,t23,t31,t32,t33
      t11 = 2.0d0*dt*t11+k11m1
      t12 = 2.0d0*dt*t12+k12m1
      t13 = 2.0d0*dt*t13+k13m1
      t21 = 2.0d0*dt*t21+k21m1
      t22 = 2.0d0*dt*t22+k22m1
      t23 = 2.0d0*dt*t23+k23m1
      t31 = 2.0d0*dt*t31+k31m1
      t32 = 2.0d0*dt*t32+k32m1
      t33 = 2.0d0*dt*t33+k33m1
      k11m1 = t11
      k12m1 = t12
      k13m1 = t13
      k21m1 = t21
      k22m1 = t22
      k23m1 = t23
      k31m1 = t31
      k32m1 = t32
      k33m1 = t33
      return
      end subroutine

