Output formats
This section describes the type of output data generated by WarpX.
Field and Particle Data
openPMD Outputs
openPMD is supported by common community formats such as ADIOS and HDF5. More details about using openPMD outputs with WarpX are available in Read openPMD Data.
AMReX Plotfiles
Plotfiles are AMReX’s native data format. See Read AMReX Plotfiles with yt for tools to read AMReX plotfiles.
Reduced diagnostics
WarpX includes reduced diagnostics. Reduced diagnostics compute observables on the fly, such as energy histograms or particle beam statistics, and are usually stored as tabular text (CSV) files.
WarpX also provides optional reduced diagnostics that typically return a single value (e.g., particle energy) per time step.
A simple and quick way to read the data using Python is
data = numpy.genfromtxt("filename.txt")
where data is a two-dimensional array and data[i][j] gives the value in the i-th row and j-th column.
Note that, while this applies to most reduced diagnostics, there are a few that require openPMD, such as ParticleHistogram2D and DifferentialLuminosity2D.
Asynchronous IO
When using the AMReX plotfile format, users can set the amrex.async_out=1
option to perform I/O in a non-blocking fashion: the simulation continues while an I/O thread
writes data to disk. This can significantly reduce the overall time spent in I/O. It is
primarily intended for large runs on supercomputers (e.g., at OLCF or NERSC); depending on
your MPI implementation, you may not see a benefit on a workstation.
When writing plotfiles, each rank writes to a separate file, up to a maximum number (by
default 64). This maximum can be adjusted using the amrex.async_out_nfiles input
parameter. To use asynchronous I/O with more than amrex.async_out_nfiles MPI ranks,
WarpX must be configured with -DWarpX_MPI_THREAD_MULTIPLE=ON. See
the building instructions for details.
Staggering of Output Data
Time
Warning: quantities in the output file for iteration n are not all defined at the same physical time due to temporal staggering in WarpX.
The table below shows the physical time (in units of time steps) at which each quantity is written for time step n.
quantity |
staggering |
|
|---|---|---|
E |
n |
n |
B |
n |
n |
j |
n-1/2 |
n-1/2 |
rho |
n |
n |
position |
n |
n |
momentum |
n |
n |
Space
Warning
Field quantities (see <diag_name>.fields_to_plot in diagnostics) in the output files are averaged at cell centers.