116 REAL,
INTENT(IN) :: s1,s2,theta,depth
118 REAL :: k1,k2,co,cok1,cok2,k3,c1,c2,c3,c4
119 REAL :: c1b,s3,sk2,g2,g
126 k3=sqrt(k1**2+k2**2+2*k1*k2*co)
128 sk2=g*k3*tanh(k3*depth)
130 c1=-(k1*k2*co)/(s1*s2)
137 c4=s3*(k1*k2*co-((s1*s2)**2)/g2)+0.5*(s1*k2**2+s2*k1**2-s1*s2*(s2**3+s1**3)/g2)
146 SUBROUTINE w3addig(E,DEPTH,WN,CG,IACTION)
224 REAL,
INTENT(INOUT) :: E(NSPEC)
225 REAL,
INTENT(IN) :: DEPTH
226 REAL,
INTENT(IN) :: WN(NK)
227 REAL,
INTENT(IN) :: CG(NK)
228 INTEGER,
INTENT(IN) :: IACTION
237 INTEGER :: NKIG,iloc,NSPECIG
238 INTEGER :: i,iIG,IFR,IK,ith,ith1,ith2,itime,I2, ISP1, ISP2, ISP3
239 INTEGER ,
DIMENSION(:,:),
ALLOCATABLE :: ifr2c
241 REAL :: d,deltaf,dfIG,CG2
242 REAL :: WN1,K1,K2,Dkx,Dky,Eadd,thetaIG,memo
244 REAL ,
DIMENSION(:),
ALLOCATABLE :: df,fIG,II,Efmall
245 REAL ,
DIMENSION(:,:),
ALLOCATABLE :: wfr1,Efth
246 REAL ,
DIMENSION(:),
ALLOCATABLE :: EfthIG
247 REAL ,
DIMENSION(:,:,:,:),
ALLOCATABLE :: DD
248 REAL ,
DIMENSION(NSPEC) :: ESPEC
249 CHARACTER(120) ::path,filename,filename2
256 ALLOCATE(dd(nkig,nk,
nth,
nth))
257 ALLOCATE(wfr1(nkig,nk))
258 ALLOCATE(ifr2c(nkig,nk))
259 ALLOCATE(efthig(nspecig))
264 IF (iaction.EQ.0)
THEN
270 espec(isp1)=e(isp1)*
sig(ik)*
tpi / cg(ik)
284 (abs(
th(ith1)-
th(ith2))+
pi),depth))**2
291 wfr1(iig,ifr)=dble(
dsip(ifr))*
dth
298 if (
sig(iig) < 0.5*
dsip(ifr))
THEN
301 iloc=minloc(abs((
sig(1:nk)-
dsip(1:nk))-(
sig(iig)+
sig(ifr))), 1)
321 k2=wn(ifr2c(iig,ifr))
327 isp1 = ith1 + (ifr2c(iig,ifr)-1)*
nth
328 isp2 = ith2 + (ifr-1)*
nth
330 eadd=dd(iig,ifr,ith1,ith2)*wfr1(iig,ifr) &
331 *espec(isp1)*espec(isp2)
332 dkx=k2*cos(dble(
dth*ith2))- k1*cos(dble(
dth*ith1))
333 dky=k2*sin(dble(
dth*ith2))- k1*sin(dble(
dth*ith1))
335 thetaig=atan2(dky,dkx)
337 if (thetaig.LT.0) thetaig=2*
pi+thetaig
341 i=minloc(abs(thetaig-
th), 1)-1
343 isp3 = i + (iig-1)*
nth
345 efthig(isp3)= efthig(isp3)+eadd;
354 espec(1:nspecig)=efthig(:)
356 IF (iaction.EQ.0)
THEN
364 e(isp1)=espec(isp1)*cg(ik)/(
sig(ik)*
tpi)