c c------------------------------------------------------------------ c Begin file /home/sting/foster/gonz/gonz.f c------------------------------------------------------------------ c program gonz c c Make file for Gonzalo: c include 'tgcmparam.h' include 'input.h' include 'tigcmfld.h' include 'gonz.h' logical found dimension un(jmx),vn(jmx),unmag(jmx),vnmag(jmx) data luout/90/ ! must match assign in cjob c c Get user input: c call setgrid call getinp c c ut loop: c istart = 1 do 100 it=1,ntms write(6,"(' ')") write(6,"('Gonz: it=',i2,' ntms=',i2,' md:mh:mm=', + i2,':',i2,':',i2)") it,ntms,md(it),mh(it),mm(it) call gethist(histvol,nhvols,md(it),mh(it),mm(it), + istart,found,ivf) istart = 0 c c Loop in selected height and longitude: c do k=1,nhts do i=1,nlon c c Interpolate neutral winds to selected height: c call tgcmint(pnt(1,1,1,ixu),pnt(1,1,1,ixz),gcmlat,jmx, + slon(i),1,shts(k),1,0,3,un,jmx,1,1,kmx,gcmzp,ier,0,spval,0) call tgcmint(pnt(1,1,1,ixv),pnt(1,1,1,ixz),gcmlat,jmx, + slon(i),1,shts(k),1,0,3,vn,jmx,1,1,kmx,gcmzp,ier,0,spval,0) c c Write neutral wind at height to file: write(luout,"('longitude=',f8.2,' height=',f8.2, + ' ut=',f6.2,' history=',3a8,/, + 'un at lat grid (-87.5 to +87.5 by 5 =')") + slon(i),shts(k),ut(it),(histvol(ii,ivf),ii=1,3) write(luout,"(6e12.4)") un write(luout,"('vn at lat grid (-87.5 to +87.5 by 5) =')") write(luout,"(6e12.4)") vn write(6,"('longitude=',f8.2,' height=',f8.2, + ' ut=',f6.2,' history=',3a8)") + slon(i),shts(k),ut(it),(histvol(ii,ivf),ii=1,3) c c Convert to magnetic coords and write to file: c subroutine mkuvmag(rlat,rlon,alt,un,vn,unmag,vnmag,spval) c c do j=1,jmx c call mkuvmag(gcmlat(j),slon(i),shts(k),un(j),vn(j), c + unmag(j),vnmag(j),spval) c enddo c write(luout,"('longitude=',f8.2,' height=',f8.2, c + ' ut=',f6.2,' history=',3a8,/'unmag at lat grid=')") c + slon(i),shts(k),ut(it),(histvol(ii,ivf),ii=1,3) c write(luout,"(6e12.4)") unmag c write(luout,"('vnmag at lat grid=')") c write(luout,"(6e12.4)") vnmag c write(6,"('longitude=',f8.2,' height=',f8.2, c + ' ut=',f6.2,' history=',3a8)") c + slon(i),shts(k),ut(it),(histvol(ii,ivf),ii=1,3) c enddo c enddo c 100 continue stop end