yt.frontends.amrvac.datfile_utils module

yt.frontends.amrvac.datfile_utils.get_header(istream)[source]

Read header from an MPI-AMRVAC 2.0 snapshot. istream’ should be a file opened in binary mode.

yt.frontends.amrvac.datfile_utils.get_single_block_data(istream, byte_offset, block_shape)[source]

retrieve a specific block (all fields) from a datfile

yt.frontends.amrvac.datfile_utils.get_single_block_field_data(istream, byte_offset, block_shape, field_idx)[source]

retrieve a specific block (ONE field) from a datfile

yt.frontends.amrvac.datfile_utils.get_tree_info(istream)[source]

Read levels, morton-curve indices, and byte offsets for each block as stored in the datfile istream is an open datfile buffer with ‘rb’ mode This can be used as the “first pass” data reading required by YT’s interface.