I second the use of VTK for file output.
If you wish to use a very generic mesh structure, I would point you in the direction of the CGNS library (CFD General Notation System) which is an opensource mesh format with its own library that is maintained by a consortium (including Boeing and NASA). Reading a list of nodes, properties, boundary conditions, etc. is extremely useful with this library and the library itself is very easy to compile. The library is in C++, but it can be linked with Fortran.
We use it in our in-house code and I have found it is a very efficient format. It uses HDF5 under the hood for binary files. Furthermore, ANSYS, Salome, GMSH all support the exportation to this format at varying degree.
Here is the github:
https://cgns.github.io/