SetDirectory["~/Work/Aether/Ccode/"];

data={
{"runtest"}
};

item=1;

Print[data[[item,1]]];

SetDirectory[data[[item,1]]];

Read data

file1=OpenRead["grid.dat",BinaryFormat->True];

{NZ,NX}=BinaryReadList[file1,"Integer32",2]

zarr=BinaryReadList[file1,"Real64",NZ]

xarr=BinaryReadList[file1,"Real64",NX]

Close[file1]

zpatch=Table[zarr[[ii]],{ii,1,NZ},{jj,1,NX}];

xpatch=Table[xarr[[jj]],{ii,1,NZ},{jj,1,NX}];

garr=Import["data.out","Real64"];

garr=Partition[Partition[Partition[garr,NX],NZ],10];

Length[garr]

Load functions

Load[ii_]:=(

gdat=garr[[ii]];

Tplt=Transpose[{Flatten[zpatch],Flatten[xpatch],Flatten[gdat[[1]]]}];

Vplt=Transpose[{Flatten[zpatch],Flatten[xpatch],Flatten[gdat[[2]]]}];

Bplt=Transpose[{Flatten[zpatch],Flatten[xpatch],Flatten[gdat[[3]]]}];

Splt=Transpose[{Flatten[zpatch],Flatten[xpatch],Flatten[gdat[[4]]]}];

Fplt=Transpose[{Flatten[zpatch],Flatten[xpatch],Flatten[gdat[[5]]]}];

Uplt=Transpose[{Flatten[zpatch],Flatten[xpatch],Flatten[gdat[[6]]]}];

Aplt=Transpose[{Flatten[zpatch],Flatten[xpatch],Flatten[gdat[[7]]]}];

Pplt=Transpose[{Flatten[zpatch],Flatten[xpatch],Flatten[gdat[[8]]]}];

Qplt=Transpose[{Flatten[zpatch],Flatten[xpatch],Flatten[gdat[[9]]]}];

Wplt=Transpose[{Flatten[zpatch],Flatten[xpatch],Flatten[gdat[[10]]]}];

)

Disp[x_]:=(

plt1=ListPlot3D[x,PlotRange->All,AxesLabel->{"z","x"},Mesh->False];

plt2=ListPointPlot3D[x,PlotRange->All,AxesLabel->{"z","x"}];

Print[Show[plt1,plt2]];

)

Load data -- run

Load[1]

Disp[Tplt]

Disp[Vplt]

Disp[Bplt]

Disp[Splt]

Disp[Fplt]

Disp[Uplt]

Disp[Aplt]