pro tgcm_rd ; ; program to read XDR file of TGCM post-processor output ; tgcmfile='' read,'enter tgcm filename',tgcmfile close,1 openr,1,tgcmfile,/xdr nfr = 0 loop: frsize = 0 readu,1,frsize hdr1='' & hdr2='' & hdr3='' & hdr4='' readu,1,hdr1,hdr2,hdr3,hdr4 nx = 0 & xlab='' & readu,1,nx,xlab xx = fltarr(nx) & readu,1,xx ny = 0 & ylab='' & readu,1,ny,ylab yy = fltarr(ny) & readu,1,yy f = fltarr(nx,ny) & readu,1,f nfr = nfr+1 print,'Read frame ',nfr ;l=findgen(20)*10. + 150. ;contour,f,xx,yy,/fol,lev=l contour,f,xx,yy,/fol ;stop,'hit .con for next frame' ans='' read,'Next frame? (y/n) ',ans if (ans ne 'y') then stop goto,loop ; ; temp=f ; frame = { $ ; size:frsize, $ frame size (only a dummy as of 2/96) ; hdr1:hdr1, $ 1st header line ; hdr2:hdr2, $ 2nd header line ; hdr3:hdr3, $ 3rd header line ; hdr4:hdr4, $ 4th header line ; nx:nx, $ number of x coords ; xlab:xlab, $ x-axis label ; xx:xx, $ x coords ; ny:ny, $ number of y coords ; ylab:ylab, $ y-axis label ; yy:yy, $ y coords ; mtime:mtime, $ model time (day,hr,min) ; f:f $ data ; } ;readu,1,frame end