module simann_general
use sep
implicit none
logical,public,save             :: max,cbound
real,public,save                :: eps,rt,sla1,svm1,lb1,ub1,t,d1,d2,o1,o2,os1,os2,os3,os4,ds1,ds2,ds3,ds4
integer,public,save             :: iseed1, iseed2, ns,nt,maxevl,iprint,n1,n2,ns1,ns2,ns3,ns4,ntot

contains

!================================================
subroutine parameters()


 call from_param("cbound",cbound,.true.)
 if (cbound) then
   call from_param("lb",lb1,.8)
   call from_param("ub",ub1, 1.2)
 end if
 call from_param("max",max,.false.)
 call from_param("eps",eps,1.0e-6)
 call from_param("rt",rt,.1)
 call from_param("sla",sla1,2.)
 call from_param("svm",svm1,1.)
 call from_param("iseed1",iseed1,1)
 call from_param("iseed2",iseed2,2)
 call from_param("ns",ns,20) !20
 call from_param("nt",nt,5)
 call from_param("maxevl",maxevl,1000000)
 call from_param("iprint",iprint,1)
 call from_param("t",t,95.0) !5.0)
 call from_aux("rho0","n1",n1);call from_aux("rho0","d1",d1);call from_aux("rho0","o1",o1);
 call from_aux("rho0","n2",n2);call from_aux("rho0","d2",d2);call from_aux("rho0","o2",o2);
 ntot=n1*n2
 call from_aux("scan","n1",ns1);call from_aux("scan","d1",ds1);call from_aux("scan","o1",os1);
 call from_aux("scan","n2",ns2);call from_aux("scan","d2",ds2);call from_aux("scan","o2",os2);
 call from_aux("scan","n3",ns3);call from_aux("scan","d3",ds3);call from_aux("scan","o3",os3);
 call from_aux("scan","n4",ns4);call from_aux("scan","d4",ds4);call from_aux("scan","o4",os4);
 if (ns1.ne.n1) call seperr("1st dimension of scan and rho0 does not conform")
 if (ns3.ne.n2) call seperr("3rd dimension of scan and 2nd rho0 do not conform")

end subroutine
!================================================
end module
