; $Id: readmesh.pro,v 1.2 2006/02/02 20:36:21 bob Exp $ ;----------------------------------------------------------------------- PRO readmesh,file, xmesh=xmesh, ymesh=ymesh, zmesh=zmesh, _extra=extra @common_cdata @common_cmesh @common_cmesh1 default, file, 'mesh.dat' print,'reading ',file openr, u, /get, file, /f77, /swap_if_big_endian, _extra=extra nxm=0L nym=0L nzm=0L readu, u, nxm,nym,nzm xm=fltarr(nxm) & xmdn=xm & dxm=xm & dxmdn=xm & dxidxup=xm & dxidxdn=xm ym=fltarr(nym) & ymdn=ym & dym=ym & dymdn=ym & dyidyup=ym & dyidydn=ym zm=fltarr(nzm) & zmdn=zm & dzm=zm & dzmdn=zm & dzidzup=zm & dzidzdn=zm readu, u, dxm, dxmdn, xm, xmdn, dxidxup, dxidxdn readu, u, dym, dymdn, ym, ymdn, dyidyup, dyidydn readu, u, dzm, dzmdn, zm, zmdn, dzidzup, dzidzdn free_lun, u xmesh=xm ymesh=ym zmesh=zm ; dxidxdn=rebin(reform(dxidxdn,nxm,1,1),nxm,nym,nzm) ; dxidxup=rebin(reform(dxidxup,nxm,1,1),nxm,nym,nzm) ; dyidydn=rebin(reform(dyidydn,1,nym,1),nxm,nym,nzm) ; dyidyup=rebin(reform(dyidyup,1,nym,1),nxm,nym,nzm) ; dzidzdn=rebin(reform(dzidzdn,1,1,nzm),nxm,nym,nzm) ; dzidzup=rebin(reform(dzidzup,1,1,nzm),nxm,nym,nzm) END