MPI-AMRVAC
3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
|
this doc describes the latest version of the data file format, which is numbered "5"
All data files consist of a single snapshot, and they can be used for restart and/or further conversion to other data formats directly usable for visualization. Note that restart is possible on a differing number of CPUs, and may suddenly allow more refinement levels. Also, note that the individual snapshots will typically have different lengths, as the number of grid blocks will vary dynamically. The data is saved in binary format (double precision). You can find the exact implementation in src/mod_input_output.t
, more specifically in snapshot_write_header()
and snapshot_read_header()
.
A snapshot (.dat
file) contains a header, mesh tree information, and block data, in the following order:
Version 1 contained the following information
1. block data (nw variables) 2. leaf/parent logical array 3. header: nx^D domain_nx^D xprobmin^D xprobmax^D nleafs levmax ndim ndir nw it global_time
The idea is that you can reconstruct the full grid when you know the Morton order used for the leaf/parent logical array.
Version 2 had the same information as version 1, but changes were made to the Morton order on the coarse grid, causing incompatibility.
Version 5 introduced the geometry
parameter (e.g. "polar_2D", "cartesian_1.75D"... ), as well as a periodic
and a staggered
flags. The periodic flag a ndir
-long 1D boolean array. For each direction, it defaults to .false.
but is set to .true.
if at least one quantity is using a periodic boundary condition in the corresponding direction. This change was motivated by improving the (upcoming) compatibility with yt
. The staggered
flag is added to support staggered grid for constrained transport MHD.