module OW_parms_rho
use sep
use OW_type
implicit none
character*5                                                 :: method,op
type (axis) ,public, save				:: xm, z, ah, rho
type (mod_grid)	 ,public, save			:: img
integer	 ,public, save				:: node,nxw,niter,n2dim
real	 ,public, save				:: eps,exponent
logical	 ,public, save				:: geodip
contains
subroutine owrhopar()
 call from_param("op",op,"opt")
 if (op(1:3)=="mod") then
    call from_history("n1",img%z%n);call from_history("d1",img%z%d);call from_history("o1",img%z%o)
    call from_history("n2",img%rho%n);call from_history("d2",img%rho%d);call from_history("o2",img%rho%o)
    call from_history("n3",img%xm%n);call from_history("d3",img%xm%d);call from_history("o3",img%xm%o)  
    call from_history("n4",img%ym%n);call from_history("d4",img%ym%d);call from_history("o4",img%ym%o)  
    n2dim=img%rho%n
    call from_param("oh",img%ah%o,-45.);call from_param("dh",img%ah%d,.5);call from_param("nh",img%ah%n,181)
    call to_history("n1",img%z%n,"out");call to_history("d1",img%z%d,"out");call to_history("o1",img%z%o,"out")
    call to_history("n2",img%ah%n,"out");call to_history("d2",img%ah%d,"out");call to_history("o2",img%ah%o,"out")
    call to_history("n3",img%xm%n,"out");call to_history("d3",img%xm%d,"out");call to_history("o3",img%xm%o,"out")  
    call to_history("n4",img%ym%n,"out");call to_history("d4",img%ym%d,"out");call to_history("o4",img%ym%o,"out")  
 else if (op(1:3)=="opt") then
    call from_history("n1",img%z%n);call from_history("d1",img%z%d);call from_history("o1",img%z%o)
    call from_history("n2",img%ah%n);call from_history("d2",img%ah%d);call from_history("o2",img%ah%o)
    call from_history("n3",img%xm%n);call from_history("d3",img%xm%d);call from_history("o3",img%xm%o)  
    call from_history("n4",img%ym%n);call from_history("d4",img%ym%d);call from_history("o4",img%ym%o)  
    n2dim=img%ah%n
    call from_param("orho",img%rho%o,.6);call from_param("drho",img%rho%d,.004);call from_param("nrho",img%rho%n,201)
    call from_param("niter",niter,10)
    call from_param("eps",eps,1.)
    call from_param("node",node,9999)
    call from_param("nxw",nxw,31)
    call from_param("geodip",geodip,.false.)
    call from_param("method",method)
    call from_param("exponent",exponent,1.)
    call to_history("n1",img%z%n,"out");call to_history("d1",img%z%d,"out");call to_history("o1",img%z%o,"out")
    call to_history("n2",img%rho%n,"out");call to_history("d2",img%rho%d,"out");call to_history("o2",img%rho%o,"out")
    call to_history("n3",img%xm%n,"out");call to_history("d3",img%xm%d,"out");call to_history("o3",img%xm%o,"out")  
    call to_history("n4",img%ym%n,"out");call to_history("d4",img%ym%d,"out");call to_history("o4",img%ym%o,"out")  
 end if
end subroutine
end module
