MPI-AMRVAC  3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
AMRVAC datasets and YT

Introduction

The datfile format is such that its is compatible with yt, an open-source Python package for analysing and visualising volumetric data. yt supports AMR meshes and can handle discrete or sampled data such as particles. It's query-based so that it can handle larger-than-RAM datasets and makes uses of Cython for speed-up and C-interoperability.

The main goal of this webpage is to show off some of yt's functionality and possibilities. For a detailed guide explaining the full capabilities of yt (with examples!), we refer to the YT Cookbook.

The yt frontend for AMRVAC was developed by Clément Robert and Niels Claes (who are also the current maintainers). The actual pull request for the frontend, including it in the main yt repository, was accepted on the 13th of November, 2019.

We would greatly appreciate any feedback or issues that you encounter. The most efficient ways to get in touch with us are either

Installing yt

The yt website has detailed instructions on how to install the yt package. As of right now the only way to use the AMRVAC frontend is building from source. It's recommended to use -e . as well, so you can immediately pull updates from the repository (note the dot after -e, this is important). Required dependencies are Numpy and Cython.

pip install numpy cython
git clone https://github.com/yt-project/yt
cd yt
git checkout master
pip install -e .

Features currently in development/planned

  • Support for staggered grids (planned)
  • Support for stretched grids (in development)
  • Support for particle data (planned)

Current limitations & unsupported features

  • yt supports particle data, but this has not (yet) been implemented in the AMRVAC frontend. This might come later.
  • Staggered grids (version 2.2 and later): yt will log a warning if staggered grids are loaded, but the flag is currently ignored. You can still use all of yt's features on those datasets though.
  • Stretched grids are currently unsupported. However, since various users have already told us that they would love to use yt with their stretched-grid datasets, we have put this quite high on our to-do list. We are working on this.

Examples

Since adding lots of examples and figures on this webpage would be quite difficult to maintain, we prepared a Jupyter notebook which contains various examples of using yt with actual MPI-AMRVAC datasets:

MPI-AMRVAC example notebook on Jupyter nbviewer

This notebook is regularly updated whenever we update the frontend or have a fun idea that we think is worthwile to add as an example. If you want to experiment with it, you can either download the notebook directly from nbviewer and use your own data, or you can clone the repository with the notebook here.