CLI reference¶
The vmec command is a drop-in equivalent of the xvmec2000 executable:
it parses the input deck, runs the NS_ARRAY multigrid ladder with
VMEC2000-format console output, writes wout_<case>.nc, and prints the
termination summary.
Usage¶
vmex input.X — solve (INDATA or VMEC++ JSON), write wout_X.nc
vmex --plot wout_*.nc — diagnostic plots from a WOUT file
vmex --plot mout_*.nc — straight-axis mirror diagnostics
vmex --booz wout_*.nc — run booz_xform_jax, write boozmn_*.nc
vmex --plot boozmn_*.nc — Boozer contour/spectrum plots
vmex --doctor — installation and JAX backend diagnostics
vmex --test — run and plot the bundled quick-start case
The positional argument is a VMEC input file (input.* namelist or a
VMEC++-style .json deck), or a wout_*.nc/mout_*.nc/boozmn_*.nc
file for --plot/--booz.
Options¶
Option |
Meaning |
|---|---|
|
Generate plots. With a |
|
Run |
|
Boozer poloidal / toroidal resolution (default 32 each). |
|
Boozer surfaces: comma/space-separated normalized |
|
Directory for wout/boozmn/figure output (default: alongside the input). |
|
Silence the VMEC-style stdout. |
|
Solver lane: |
|
Override the final-stage |
|
Override the final-stage |
|
ESSOS-style coils file ( |
|
Print installation, Python, package, and JAX backend diagnostics. |
|
Run the bundled |
|
Print the package version. |
Free-boundary routing¶
For LFREEB = T decks:
a readable
MGRID_FILEruns the free-boundary solver with the VMEC2000 console output (In VACUUMblock,VACUUM PRESSURE TURNED ONbanner) and free-boundary wout metadata (nextcur/extcur/curlabel/mgrid_mode);a missing mgrid file falls back to a fixed-boundary solve with a warning (VMEC2000 behavior, dropped by VMEC++);
MGRID_FILE = 'DIRECT_COILS'(or the--coilsflag) builds the external field from an ESSOS coils file (essos.coils.Coils): the coils are tabulated into an in-memory mgrid (Coils.to_mgrid) and read back as anvmex.core.mgrid.MgridField(requires ESSOS).
Known divergences of the current free-boundary lane: it is single-grid (only
the final NS_ARRAY stage runs; multi-stage decks print a note), and the
NESTOR potential is not yet exported to the wout potsin/xmpot/
xnpot/*_sur variables (written as netCDF fill). An NITER-exhausted
free-boundary run still writes the wout (VMEC2000 behavior) and exits with
ier_flag = 2.
Exit codes (zero-crash policy)¶
Every failure maps to a typed vmex.core.errors.VmecError; the
CLI prints the VMEC2000 werror message plus a one-line hint and exits
with the matching ier_flag code (0 on success, 2 for “MORE ITERATIONS
REQUIRED”, etc.). There are no raw tracebacks in normal operation.