subroutine cnplotk(a,title,tim,ipage,net,fave) c c k-space contour plot c implicit none include 'itg.par' include 'itg.cmn' c include 'post.cmn' c arguments: real a(fno*nez,mz,nz) character*16 title real tim,fave integer ipage,net c local variables: integer l1,l2,n1 real ty(mz),tx(nz),a2(nz,mz) real work(200*nz*mz),xx0,sc0,f1,f2,s1,s2,tmpa(fno*nez) real ave,pfmax,pfmin,sdv,xx,zmax,zmin integer iwork(400*nz*mz),i,j,mr,nr,m,n,mpts,npts character*30 maxstr c mpts=md c npts=nd mpts=mz npts=nz if (md.le.1) return if (nd.le.1) return c c time average c zmin=0. zmax=0. do m=1,md do n=1,nd n1=nrr(n)+(nz-1)/2+1 a2(n1,m)=0. do i=1,net tmpa(i)=a(i,m,n) enddo call timeavp(tmpa,ave,sdv,net,fave,pfmin,pfmax) a2(n1,m)=ave if (a2(n1,m).gt.zmax) zmax=a2(n1,m) if (a2(n1,m).lt.zmin) zmin=a2(n1,m) enddo enddo do m=md+1,mz do n=1,nz a2(n,m)=1.e-15 enddo enddo do m=1,mz do n=1,1+(nz-nd)/2 a2(n,m)=1.e-15 enddo enddo do m=1,mz do n=1+(nz+nd-2)/2,nz a2(n,m)=1.e-15 enddo enddo xx0=float(nz-1)*(abs(shr)*z0)/y0/float(nd-1) sc0=float(mz-1)/y0 write(maxstr,101) zmin,zmax 101 format(' min: ',f7.2,' max: ',f7.2) call cpseti('LLP',0) ! no labels on contours call cpseti('CLS - CONTOUR LEVEL SELECTION',0) call cpseti('NCL - NUMBER OF CONTOUR LEVELS',14) zmax=zmax/3. do j=1,14 call cpseti('PAI - PARAMETER ARRAY INDEX',j) xx=(zmax-zmin)/13.*float(j-1)+zmin call cpsetr('CLV - CONTOUR LEVEL VALUE',xx) call cpseti('CLU - CONTOUR LEVEL USE',3) if (xx.lt.0) call cpseti('CLD - CONTOUR LINE DASH PATTERN',3855) if (xx.ge.0) call cpseti('CLD - CONTOUR LINE DASH PATTERN',65535) enddo call setzer call plchlq(.5,.95,title,20.,0.,0.) call plchlq(.65,.91,maxstr,9.,0.,-1.) call cpseti('SET',0) call cpseti('MAP',3) call cpsetr('XC1',-xx0) call cpsetr('XCM',xx0) call cpsetr('YC1',0.) call cpsetr('YCN',sc0) call maps(-xx0,xx0,0.,sc0) call cprect(a2,npts,npts,mpts,work,200*mpts*npts,iwork, & 400*mpts*npts) call cpcldr(a2,work,iwork) c call cplbdr(a2,work,iwork) call finish(ipage) c if ((title(1:9).eq.'Growth ra').or. & (title(1:9).eq.'Energy ').or. & (title(1:9).eq.'Total dri')) then write(9,*) '------ k contour data ',title write(9,*) mpts,npts do j=1,mpts do i=1,npts write(9,*) a2(i,j) enddo enddo endif return end