postgkyl.gk.nodes

postgkyl.gk.nodes(name, *, path='./', multib='-10', nodes_file=None, psi_file=None, wall_file=None, contour=False, clevels=None, cnlevels=11, fixaspect=False, xlim=None, ylim=None, xlabel='R (m)', ylabel='Z (m)', zlabel='$\\psi$', title=None, indent_left=0.0, add_width=0.0, multib_unicolor=False, show=False, saveas=None)

Plot the nodes of a (possibly multiblock) grid, with optional overlays.

Parameters:
  • name – Simulation name (also the file prefix).

  • path – Directory holding the simulation output.

  • multib – "-10" (default) for a single block; "-1" to discover every block; otherwise a comma list or 'start:stop[:step]' slice of block indices.

  • nodes_file – Override for the <name>-nodes.gkyl grid-nodes file (* stands for the block index); an absolute path is used as-is.

  • psi_file – Optional poloidal-flux file to overlay (interpolated p2 tensor basis); an absolute path is used as-is.

  • wall_file – Optional CSV (R, Z) vacuum-vessel wall outline to overlay.

  • contour – Draw psi_file as contour lines instead of a colormesh.

  • clevels – Contour levels: comma-separated values, or a 'start:stop:nlevels' range; defaults to cnlevels automatic levels when None.

  • cnlevels – Number of automatic contour levels (ignored if clevels is given).

  • fixaspect – Enforce equal R/Z scaling (unused placeholder kept for interface symmetry with the old CLI’s --fix_aspect; the figure is already built to the data’s aspect ratio).

  • xlim – Optional horizontal-axis limits.

  • ylim – Optional vertical-axis limits.

  • xlabel – Horizontal-axis label.

  • ylabel – Vertical-axis label.

  • zlabel – Poloidal-flux colorbar label.

  • title – Figure title.

  • indent_left – Horizontal axes-position adjustment in figure units.

  • add_width – Axes-width adjustment in figure units.

  • multib_unicolor – Use one color for every block instead of cycling.

  • show – Call plt.show() before returning.

  • saveas – If given, save the figure to this path.

Returns:

The populated Figure.

CLI: gk_nodes