program main
  use base_ioutil_mod
  use base_struct_mod
  implicit none

  type(axis)                      :: ax_modl,ay_modl,az_modl
  type(axis)                      :: ax_data,ay_data,az_data,ahx_data,ahy_data,ahz_data
  real, dimension(:), allocatable :: mod1, mod2
  real, dimension(:), allocatable :: dat1, dat2

  character(len=256)              :: mod1_, mod2_, dat1_, dat2_

  mod1_ = "mod1"; mod2_ = "mod2"
  dat1_ = "dat1"; dat2_ = "dat2"

  call sep_init(SOURCE)
  call getch_add_string("head=/dev/null")
  call getch_add_string("noheader=y")
  call set_no_putch()
  call sep_begin_prog()


  call hinaxis(mod1_, ax_modl , 1); call hinaxis(mod1_, ay_modl , 2); call hinaxis(mod1_, az_modl , 3)

  call hinaxis(dat1_, ax_data , 1); call hinaxis(dat1_, ay_data , 2); call hinaxis(dat1_, az_data , 3)
  call hinaxis(dat1_, ahx_data, 4); call hinaxis(dat1_, ahy_data, 5); !call hinaxis(dat1_, ahz_data, 6)

  allocate(mod1(ax_modl%n*ay_modl%n*az_modl%n))
  allocate(mod2(ax_modl%n*ay_modl%n*az_modl%n))
  allocate(dat1(ax_data%n*ay_data%n*az_data%n*ahx_data%n*ahy_data%n))
  allocate(dat2(ax_data%n*ay_data%n*az_data%n*ahx_data%n*ahy_data%n))

  call sep_read(mod1, mod1_); call sep_read(mod2, mod2_)
  call sep_read(dat1, dat1_); call sep_read(dat2, dat2_)

  write(0,*)"dot(1)=", sum(mod1*mod2)
  write(0,*)"dot(2)=", sum(dat1*dat2)


end program
