pyrokinetics.gk_code.gk_output.read_gk_output

Contents

pyrokinetics.gk_code.gk_output.read_gk_output#

pyrokinetics.gk_code.gk_output.read_gk_output(path, norm, output_convention='pyrokinetics', load_fields=True, load_fluxes=True, load_moments=False, gk_type=None, **kwargs)[source]#

Read gyrokinetics output file(s) from disk, returning an GKOutput instance.

Parameters:
  • convention

  • path (PathLike) – Location of the file(s) on disk.

  • norm (SimulationNormalisation) – The normalisation scheme of the simulation that produced the data. Usually generated by a Pyro object.

  • output_convention (ConventionNormalisation, default "pyrokinetics") – Convention to convert output to

  • load_fields (bool, default True) – Flag to load fields or not

  • load_fluxes (bool, default True) – Flag to load fluxes or not

  • load_moments (bool, default False) – Flag to load moments or not

  • gk_type (Optional[str]) – String specifying the type of gyrokinetics files. If unset, the file type will be inferred automatically. Specifying the file type may improve performance.

  • **kwargs – Keyword arguments forwarded to the gyrokinetics output file reader.

Raises:

ValueError – If path doesn’t exist or isn’t a file.