postgkyl.gk.load_quantity

postgkyl.gk.load_quantity(quantity, species, name, frame=None, *, path='./', tag='default', label=None, direction=None, mass=None, charge=None, gamma_e=None, gamma_i=None, kind=None, read_options=None)

Load and compute a pre-named gyrokinetic quantity.

Modal source files retain their DG representation through the calculation: products, inverses, square roots, and derivatives use native DG operations. Call interpolate() on the returned datasets when point samples are needed.

Parameters:
  • quantity – Registered quantity name (see available_quantities()).

  • species – Species name, or a comma-separated list of them; None for species-independent quantities.

  • name – Simulation name prefix (e.g. 'gk_sheath_2x2v_p1').

  • frame – Frame number, comma-separated list, or 'start:stop[:step]' range; ':'/None selects all available frames.

  • path – Directory containing the simulation files.

  • tag – Tag for the output dataset(s); suffixed with the species when more than one species is requested.

  • label – Label override; defaults to the quantity’s registered label.

  • direction – Vector direction for quantities that expose components.

  • mass – Species mass used by quantities that require it.

  • charge – Species charge used by quantities that require it.

  • gamma_e – Electron adiabatic index for sound-speed quantities.

  • gamma_i – Ion adiabatic index for sound-speed quantities.

  • kind – Named variant accepted by a quantity provider.

  • read_options – Additional provider options as repeated key/value entries.

Returns:

A list of computed GDataState datasets.

Raises:

ValueError – if quantity is not registered, or it is an is_multi_species quantity requested without a species list.

CLI: gk_load_quantity