; twodw.pro ; Based on TWODW.FR ; ; Revisions: ; 2001 Nov 5 - rgf - IDL version ; ;***file twodw.fr ;**dick french ;***latest revision 5/29/81 ; ;---this fortran 5 routine is used in program golc. it computes the ; integrand used for determination of the bending angle for ; two-dimensional waves using geometric optics. see rgf mit#3 p.128+. ; note that this program can be easily generalized to handle any ; two-dimensional refractivity profile. ; ; function twodw,ha,i,j,dxhat,hhat,eps,wlpsh, $ psi,rhat,shphw,beta,del,idiag twopi=!dpi*2.d0 zkhat=twopi*wlpsh zlhat=twopi/shphw xj=double(j)*dxhat rdif=ha+xj*xj/(2.d0*rhat) - double(i-1)/hhat earg=zkhat*rdif+psi darg=zlhat*xj+beta ce=cos(earg) se=sin(earg) cd=cos(darg) sd=sin(darg) ex=exp(-rdif) znu=ex*(1.d0 + eps*se + del*cd) dndr=-znu + ex*eps*zkhat*ce dndx=-ex*del*zlhat*sd twodw=dndr-xj*dndx if(idiag eq 0)then return,twodw print, "j=",j," znu=",znu print, "zkhat=",zkhat," zlhat=",zlhat print, "earg=",earg," darg=",darg print, "ce=",ce," se=",se print, "cd=",cd," sd=",sd print, "ex=",ex," del=",del print, "dndr=",dndr," dndx=",dndx print, "xj=",xj," rdif=",rdif print, "twodw=",twodw print return,twodw end