program dotspl
use OW_type
use base_spline_mod2

implicit none

    type(axis)               		          :: axk, ayk, azk
    type (axis)				:: xm, z
    type (mod_grid) 			:: img
    integer				:: i,j,k,stat
    real,allocatable			:: data1(:),data2(:)
    real,allocatable			:: modl1(:),modl2(:)
    real, dimension (2)		 	:: dot

    img%xm%n=1001;img%xm%d=25.;img%xm%o=0.
    img%z%n=501;img%z%d=12.5;img%z%o=0.
    axk%n=26;axk%d=1000;axk%o=0.
    azk%n=256;azk%d=25;azk%o=0.
    allocate(data1(axk%n*azk%n),data2(axk%n*azk%n))
    allocate(modl1(img%xm%n*img%z%n),modl2(img%xm%n*img%z%n))
    call random_number(modl1)
    call random_number(data2)
    modl1=modl1/1000;data2=data2/1000
    modl2=0.;data1=0.;dot=0.
write(0,*) "01"
    stat = base_spln2d_init(img%xm,img%z,axk,azk)
write(0,*) "02"
    stat = base_spln2d_oper (.false.,.false.,modl1,data1)
write(0,*) "03"
    stat = base_spln2d_oper (.true., .false.,modl2,data2)
write(0,*) "04"
    dot(2)=dot_product(modl1,modl2)
    dot(1)=dot_product(data1,data2)
    write (0,*) dot

  end program
!-=====================================================================
