Postprocessing
There are several ways to post-process the output of Quokka simulations. AMReX PlotfileTools, yt, and VisIt all allow you to analyze the outputs after they are written to disk.
AMReX PlotfileTools
These are self-contained C++ programs (included with AMReX in the Tools/Plotfile
subdirectory) that will output a 2D slice (axis-aligned), a 1D slice (axis-aligned), or compute a volume integral given an AMReX plotfile. This works as an alternative to yt and VisIt for basic tasks.
- To compute a volume integral, use fvolumesum.
- To compute a 2D slice plot (axis-aligned planes only), use fsnapshot.
- To compute a 1D slice (axis-aligned directions only, with output as ASCII), use fextract.
Other tools:
- fboxinfo prints out the indices of all the Boxes in a plotfile
- fcompare calculates the absolute and relative errors between plotfiles in L-inf norm
- fextrema calculates the minimum and maximum values of all variables in a plotfile
- fnan determines whether there are any NaNs in a plotfile
- ftime prints the simulation time of each plotfile
- fvarnames prints the names of all the variables in a given plotfile
yt
Warning
There are known bugs that affect Quokka outputs. PlotfileTools (see above) can be used instead for axis-aligned slice plots.
Tip
One of the most useful things to do is to convert the data into a uniform-resolution NumPy array with the covering_grid function.
We have a fork of YT that includes a customized Quokka frontend: https://github.com/chongchonghe/yt. To install it, run pip install "yt[quokka] @ git+https://github.com/chongchonghe/yt.git"
. A comprehensive documentation is available at this link, and a Jupyter Notebook with tutorials is available at README.ipynb.
The quick_plot
script in scripts/python/
is a convenient tool for visualizing Quokka outputs. It is a wrapper around YT for batch processing snapshots and generating slice or projection plots. The script has detailed documentation in the code itself, accessible at the top of the file and also by running quick_plot -h
.
VisIt
VisIt can read cell-centered output variables from AMReX plotfiles. Currently, there is no support for reading either face-centered variables or particles. (However, by default, cell-centered averages of face-centered variables are included in Quokka plotfiles.)
In order to read an individual plotfile, you can select the plt00000/Header
file in VisIt's Open dialog box.
If you want to read a timeseries of plotfiles, you can create a file with a .visit
extension that lists the plt*/Header
files, one per line, with the following command: :
ls -1 plt*/Header | tee plotfiles.visit
Then select plotfiles.visit
in VisIt's Open dialog box.
Warning
There are rendering bugs with unscaled box dimensions. Slices generally work. However, do not expect volume rendering to work when using, e.g. parsec-size boxes with cgs units.