<br>I am on travel right now, otherwise I would be happy to help you. My first guess to this is that ParaView is getting confused between the XMol Molecule files and Plot3D.<br><br><a href="https://visualization.hpc.mil/wiki/index.php/Paraview_Data_Formats#Supported_Data_Formats">
https://visualization.hpc.mil/wiki/index.php/Paraview_Data_Formats#Supported_Data_Formats</a><br><br>My second guess is that ParaView is not liking the Fortran Binary Plot3D file. Otherwise it looks like you are writing it out correctly.
<br><br>You can write C binary VTK files directly from Fortran using the latest
gfortran compiler. For example, suppose I have a rectilinear grid, and
I wish to write out a scalar field called Fraction.<br><br><span style="color: rgb(128, 128, 128); font-style: italic;"><span style="font-style: italic;">!</span>......................................................................
</span><br>
<span style="color: rgb(128, 128, 128); font-style: italic;">!.....Write out Grid File in VTK format</span><br>
<span style="color: rgb(128, 128, 128); font-style: italic;">!......................................................................</span><br>
open<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span>,<span style="color: rgb(177, 177, 0);">file</span>=solnfn,<span style="color: rgb(177, 177, 0);">access</span>
=<span style="color: rgb(255, 0, 0);">'stream'</span>,<span style="color: rgb(177, 177, 0);">status</span>=<span style="color: rgb(255, 0, 0);">'new'</span>,convert=<span style="color: rgb(255, 0, 0);">'big_endian'
</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(255, 0, 0);">"# vtk DataFile Version
3.0"</span>//<span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">10</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(255, 0, 0);">"Insert Comment Here"
</span>//<span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">10</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(255, 0, 0);">"BINARY"</span>
//<span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">10</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(255, 0, 0);">"DATASET RECTILINEAR_GRID"
</span>//<span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">10</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span>ss,<span style="color: rgb(177, 177, 0);">fmt</span>=<span style="color: rgb(255, 0, 0);">'(A10,3I5)'</span><span style="color: rgb(102, 204, 102);">)
</span> <span style="color: rgb(255, 0, 0);">"DIMENSIONS"</span>,ni,nj,nk<br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> ss//<span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">
(</span><span style="color: rgb(204, 102, 204);">10</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span>ss,<span style="color: rgb(177, 177, 0);">fmt</span>=<span style="color: rgb(255, 0, 0);">'(A13,I6,A6)'</span><span style="color: rgb(102, 204, 102);">
)</span> <span style="color: rgb(255, 0, 0);">"X_COORDINATES"</span>,ni,<span style="color: rgb(255, 0, 0);">" float"</span><br><span style="color: rgb(255, 0, 0);"></span> write<span style="color: rgb(102, 204, 102);">
(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> ss//<span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">
10</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">(</span>x<span style="color: rgb(102, 204, 102);">
(</span>i<span style="color: rgb(102, 204, 102);">)</span>,i=<span style="color: rgb(204, 102, 204);">1</span>,ni<span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span>ss,<span style="color: rgb(177, 177, 0);">fmt</span>=<span style="color: rgb(255, 0, 0);">'(A13,I6,A6)'</span><span style="color: rgb(102, 204, 102);">
)</span> <span style="color: rgb(255, 0, 0);">"Y_COORDINATES"</span>,nj,<span style="color: rgb(255, 0, 0);">" float"</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">
(</span><span style="color: rgb(204, 102, 204);">10</span><span style="color: rgb(102, 204, 102);">)</span>//ss//<span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">
10</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">(</span>y<span style="color: rgb(102, 204, 102);">
(</span>j<span style="color: rgb(102, 204, 102);">)</span>,j=<span style="color: rgb(204, 102, 204);">1</span>,nj<span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span>ss,<span style="color: rgb(177, 177, 0);">fmt</span>=<span style="color: rgb(255, 0, 0);">'(A13,I6,A6)'</span><span style="color: rgb(102, 204, 102);">
)</span> <span style="color: rgb(255, 0, 0);">"Z_COORDINATES"</span>,nk,<span style="color: rgb(255, 0, 0);">" float"</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">
(</span><span style="color: rgb(204, 102, 204);">10</span><span style="color: rgb(102, 204, 102);">)</span>//ss//<span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">
10</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">(</span>z<span style="color: rgb(102, 204, 102);">
(</span>k<span style="color: rgb(102, 204, 102);">)</span>,k=<span style="color: rgb(204, 102, 204);">1</span>,nk<span style="color: rgb(102, 204, 102);">)</span><span style="color: rgb(102, 204, 102);"></span><br>
<br>
write<span style="color: rgb(102, 204, 102);">(</span>ss,<span style="color: rgb(177, 177, 0);">fmt</span>=<span style="color: rgb(255, 0, 0);">'(A10,I15)'</span><span style="color: rgb(102, 204, 102);">)
</span> <span style="color: rgb(255, 0, 0);">"POINT_DATA"</span>,ni*nj*nk<br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">
(</span><span style="color: rgb(204, 102, 204);">10</span><span style="color: rgb(102, 204, 102);">)</span>//ss//<span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">
10</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(255, 0, 0);">"SCALARS Scalar_Name float 1"
</span>//<span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">10</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(255, 0, 0);">"LOOKUP_TABLE default"
</span>//<span style="color: rgb(153, 51, 51);">char</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">10</span><span style="color: rgb(102, 204, 102);">)</span><br>
write<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(204, 102, 204);">11</span><span style="color: rgb(102, 204, 102);">)</span> f<br>
<br>
<br>
All that is left to do then is to compile it with the following command:<br>
<br>
gfortran -o 2vtk 2vtk.f90 -fconvert=big-endian -frecord-marker=4<br>
<br><br>Paul Adams<br><a href="http://viz.hpc.mil">http://viz.hpc.mil</a><br><br>