module OW_spline_parms

use sep
use OW_type

implicit none

type (axis) ,public, save				:: xm, ym, z, shx, shy, kz, khx, khy
type (mod_grid)	 ,public, save			:: img
type(axis), public, save               		          :: axk, ayk, azk
real, public, save                               		:: axkd, aykd, azkd, axko, ayko, azko, epss
integer, public, save                            		:: axkn, aykn, azkn, niters,node

contains

subroutine owparam()

     call from_param("eps", epss, 1.); 
     call from_param("niter", niters, 1); 
     call from_param("node", node, 99999); 
     call from_param("oxk", axko, 0.); call from_param("dxk", axkd, 1.); call from_param("nxk", axkn, 99999 )
     call from_param("oyk", ayko, 0.); call from_param("dyk", aykd, 1.); call from_param("nyk", aykn, 99999 )
     call from_param("ozk", azko, 0.); call from_param("dzk", azkd, 1.); call from_param("nzk", azkn, 99999 )
     axk%n=axkn
     ayk%n=aykn
     azk%n=azkn
     axk%d=axkd
     ayk%d=aykd
     azk%d=azkd
     axk%o=axko
     ayk%o=ayko
     azk%o=azko

     write(0,*) axkn,aykn,azkn
     write(0,*) axkd,aykd,azkd
     write(0,*) axko,ayko,azko

call from_aux("gradi","n1",img%xm%n);call from_aux("gradi","d1",img%xm%d);call from_aux("gradi","o1",img%xm%o)
call from_aux("gradi","n2",img%ym%n);call from_aux("gradi","d2",img%ym%d);call from_aux("gradi","o2",img%ym%o)
call from_aux("gradi","n3",img%z%n );call from_aux("gradi","d3",img%z%d) ;call from_aux("gradi","o3",img%z%o)
write(0,*) "AFTER AUX"
call to_history("n1",img%xm%n,"grado");call to_history("d1",img%xm%d,"grado");call to_history("o1",img%xm%o,"grado")  
call to_history("n2",img%ym%n,"grado");call to_history("d2",img%ym%d,"grado");call to_history("o2",img%ym%o,"grado")  
call to_history("n3",img%z%n,"grado");call to_history("d3",img%z%d,"grado");call to_history("o3",img%z%o,"grado")
call to_history("esize",4,"grado")
write(0,*) "AFTER TO_HIST"

 end subroutine

end module
