Using vtk libraries for writing in xml/vtk fileformat using fortran

I wondering if someone would help me on how to install,use vtk libraries to write data in binary format in fortran. Alternatively, suitable modifications to write in binary format from a fortran code wrting files in .vtk in ASCII format are also welcome. I understand that its very easy to write in ASCII and have a writer in place, hence was hoping someone would help me out with the binary format. I am specifically attempting to write unstructured FE grid data in legacy vtk or xml formats in parallel.

This is a questions about VTK. I suggest posting it on the VTK discourse (

I don’t have to deal with Fortran, but probably your best option is with the xml binary format, which is base-64 encoded. The output will not be as compact as using the appended format with raw output, but I’ve found the inline formats (non-appended) formats easier to work with when streaming out multiple fields.