pro chtab,nz1 common cdat,x,y,z,nx,ny,nz,mp,ntmax,date0,time0 common ctable,ttmean,rhm,drhm,eemin,eemax,dee,mtab,itab,tab nz=nz1 rhm=rhm(0:n) eemin=eemin(0:n) eemax=eemax(0:n) dee=dee(0:n) mtab=mtab(0:n) itab=itab(0:n) end PRO table,file,mz=mz,sstab=sstab ; ; Load Table ; common cdat,x,y,z,nx,ny,nz,mp,ntmax,date0,time0 common ctable,ttmean,rhm,drhm,eemin,eemax,dee,mtab,itab,tab if n_params() eq 0 then begin print,'table,file [,mz=mz]' return endif if n_elements(mz) eq 0 then mz=nz close,2 openr,2,file i=assoc(2,lonarr(10)) inext=i(0,0) lcfile=i(1,0) j=assoc(2,lonarr(10),4L*(1+lcfile+1000)) lrec=j(0,0) irecp=assoc(2,lonarr(inext),4L*(lcfile+1)) irec=4L*lrec*irecp(0) tabm=assoc(2,fltarr(mz),irec(0)+12*4L) ttmean=tabm(0) rhm=tabm(2) rhm1=alog(rhm(0)) rhm2=alog(rhm(mz-1)) drhm=(rhm2-rhm1)/(mz-1) eemin=tabm(7) eemax=tabm(8) dee=tabm(9) itabm=assoc(2,lonarr(mz),irec(0)+12*4L) itab=itabm(10) mtab=itabm(11) ; mtable=2*63*63*63L ; mtaba=mtable-12*mz-12 mtaba=itab(mz-1)+7*3*mtab(mz-1) print,format='(a,i7,a)','reading ',mtaba,' words into table' a=assoc(2,fltarr(mtaba),irec(0)+12*4L+12*mz*4L) print,'used file size =',irec(0)+12*4L+(12*mz+mtaba)*4L tab=a(0) if n_elements(sstab) ne 0 then sstab end