Usage: pgkyl gk_energy_balance [OPTIONS]
Plot (and compute) the energy balance of a gyrokinetic simulation.
Requires, per species (named ``<name>-<species_name>``): an
``_fdot_integrated_moms.gkyl`` file, and (only if the run had sources or non-periodic
boundaries) ``_source_integrated_moms.gkyl`` and
``_bflux_<direction><side>_integrated_HamiltonianMoments.gkyl`` files. A
``<name>-field_energy_dot.gkyl`` file is required; ``<name>-apar_energy_dot .gkyl`` is
read if present (electromagnetic simulations). If ``relative_error`` is requested, the
corresponding non-``_dot``
(``_integrated_moms.gkyl``/``field_energy.gkyl``/``apar_energy.gkyl``) and
``<name>-dt.gkyl`` files are also required.
Options:
-n, --name TEXT Simulation name (also the file prefix). [required]
-s, --species TEXT OR JSON ARRAY
Species names to sum over. [required]
-p, --path TEXT Directory holding the simulation output. [default:
./]
-r, --relative_error [BOOLEAN] Plot the relative error instead of every balance term.
[default: False]
-m, --multib TEXT ``"-10"`` (default) for a single block; ``"-1"`` to
discover every block; otherwise a comma list or
``'start:stop[:step]'`` slice of block indices (see
:func:`~postgkyl.diagnostics.gk.utils.
get_block_indices`). [default: -10]
-f, --field_dot_file TEXT Explicit field-energy derivative path override.
-a, --apar_dot_file TEXT Explicit parallel-vector-potential energy derivative
path.
--fdot_file TEXT Explicit distribution derivative moments path
override.
--source_file TEXT Explicit source moments path override.
-b, --bflux_files TEXT Optional per-boundary path overrides, keyed by
``"<direction><side>"`` (e.g. ``"xlower"``); unlisted
boundaries use the naming convention.
--f_file TEXT Explicit integrated distribution moments path
override.
--field_file TEXT Explicit field-energy path override.
--apar_file TEXT Explicit parallel-vector-potential energy path
override.
-d, --dt_file TEXT Explicit time-step history path override. In path
overrides, ``*`` stands for block index and, for per-
species files, species name.
-l, --logy [BOOLEAN] Log-scale the y axis. [default: False]
--absy [BOOLEAN] Take the absolute value of every trace before
plotting. [default: False]
-x, --xlabel TEXT Horizontal-axis label. [default: Time (s)]
-y, --ylabel TEXT Vertical-axis label; use the derived formula when
``None``.
-t, --title TEXT Figure title; use the balance description when
``None``.
-i, --indent_left FLOAT Horizontal axes-position adjustment in figure units.
[default: 0.0]
--add_width FLOAT Axes-width adjustment in figure units. [default: 0.0]
--show [BOOLEAN] Call ``plt.show()`` before returning. [default:
False]
--saveas TEXT If given, save the figure to this path.
--help Show this message and exit.