PRO ryu2map ; n=64L ; zri=34.63170 ; n=128L ; zri = 44.77303 ; n=256L ; zri = 55.92095 n=512L zri=67.99017 rcube = 100 h = 0.7 omega0 = 0.27 fh=0.76 fhe=0.24 dummy=0L dum=fltarr(n,n) openr,1,'fluid08a',/f77 readu,1,dummy readu,1,dummy rho=fltarr(n,n,n) FOR iz=0,n-1 DO BEGIN readu,1,dum rho(*,*,iz)=dum(*,*) END close,1 openr,1,'fluid08e',/f77 readu,1,dummy readu,1,dummy temp=fltarr(n,n,n) FOR iz=0,n-1 DO BEGIN readu,1,dum temp(*,*,iz)=dum(*,*) END close,1 ; urho = 1.879e-29*(1.+zri)^3*h^2*omega0 urho = 1.879e-29*h^2*omega0 uvel = 1.224e+7*rcube*(1.+zri)^0.5*omega0^0.5 utmp = 1.814e+6*rcube^2*(1.+zri)*omega0/(2.*fh+0.75*fhe) temp=temp/rho*utmp rho=rho*urho temp1=fltarr(n,n) temp2=fltarr(n,n) temp3=fltarr(n,n) rho1=fltarr(n,n) rho2=fltarr(n,n) rho3=fltarr(n,n) dL=3.085678d24*rcube/h/n k=8.61e-8 for i1=0,n-1 DO BEGIN for i2=0,n-1 DO BEGIN temp1(i1,i2)=0.0 temp2(i1,i2)=0.0 temp3(i1,i2)=0.0 rho1(i1,i2)=0.0 rho2(i1,i2)=0.0 rho3(i1,i2)=0.0 for i3=0,n-1 DO BEGIN temp1(i1,i2)=temp1(i1,i2)+temp(i3,i1,i2)*k*rho(i3,i1,i2)*dL temp2(i1,i2)=temp2(i1,i2)+temp(i1,i3,i2)*k*rho(i1,i3,i2)*dL temp3(i1,i2)=temp3(i1,i2)+temp(i1,i2,i3)*k*rho(i1,i2,i3)+dL rho1(i1,i2)=rho1(i1,i2)+rho(i3,i1,i2)*dL rho2(i1,i2)=rho2(i1,i2)+rho(i1,i3,i2)*dL rho3(i1,i2)=rho3(i1,i2)+rho(i1,i2,i3)*dL end end end temp1=temp1/rho1 temp2=temp2/rho2 temp3=temp3/rho3 basename="tvd512-256" writefits,basename+"_rho.x.fits",rho1 writefits,basename+"_rho.y.fits",rho2 writefits,basename+"_rho.z.fits",rho3 writefits,basename+"_temp.x.fits",temp1 writefits,basename+"_temp.y.fits",temp2 writefits,basename+"_temp.z.fits",temp3 stop end