function [nzm,nxm,nt,tmin,dx,p2,p1,p0,seismo,cns,nsp,xxx,yyy,dt,alpha,cm,ca]=param(nx,nz,c,fr)
nzm=nz-1;nxm=nx-1;
vmin=min(min(c/2)); vmax=max(max(c));
tmin=1/(fr*2);dx=vmin*tmin/12;dt=.56*dx/vmax; np=round(2/(fr*dt));
nt=round( 1.6*dx*max([nx nz])*2/(vmin*dt)+np );if nt > 4000;nt=4000;end;
p2=zeros(nx,nz);p1=p2;p0=p1;seismo=zeros(nx,nt);alpha=dt/dx; cns=4*alpha*alpha*c.*c;
ca=c.^2;
cm=(c/2).^2;
%
% Define number of sources and their locations
%
nsp=1;xxx(1)=round(nx/2);yyy(1)=round(nz/4);     
