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
GKOutputinstance.- 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 toload_fields (
bool, defaultTrue) – Flag to load fields or notload_fluxes (
bool, defaultTrue) – Flag to load fluxes or notload_moments (
bool, defaultFalse) – Flag to load moments or notgk_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.