subroutine penrgyp(p,wp,wpp) c c ... volume integral of p(x,y)**2 c implicit none include 'itg.par' include 'itg.cmn' c include 'post.cmn' c real p(lz,mz,nz),wp,wpp(mz,nz) c Local Vars: real coef integer l,m,n c c ... note dr(l)=2.0*dx c ... normalize by delta=pi*y0 in the x-direction c wp=0.0 coef=0.25/(pi*y0) c do 10 n=1,nd do 10 m=1,md wpp(m,n)=0.0 wpp(m,n)=wpp(m,n)+p(1,m,n)*p(1,m,n)*dr(1)*0.5 do 20 l=2,ldb wpp(m,n)=wpp(m,n)+p(l,m,n)*p(l,m,n)*dr(l) 20 continue wpp(m,n)=wpp(m,n)+p(ld,m,n)*p(ld,m,n)*dr(ld)*0.5 wpp(m,n)=coef*wpp(m,n) wp=wp+wpp(m,n) 10 continue c return end