pyrokinetics.pyroscan.PyroScanGKOutput#
- class pyrokinetics.pyroscan.PyroScanGKOutput(dataset, norms=None)[source]#
Bases:
DatasetWrapper- Parameters:
dataset (xr.Dataset)
Methods
__init__(dataset[, norms])convert_physical_units(norms)Replace physical units on data_vars and coords with the generic simulation units of
norms.from_netcdf(path, *args[, ...])Initialise self.data from a netCDF file.
to(norms, *contexts)to_netcdf(*args, **kwargs)Serialise to netCDF.
unwrap()Return the underlying xarray.Dataset.
Attributes
attrsRedirects to underlying Xarray Dataset attrs.
coordsRedirects to underlying Xarray Dataset coords.
dataProperty for managing the underlying Xarray Dataset.
data_varsRedirects to underlying Xarray Dataset data_vars.
dimsRedirects to underlying Xarray Dataset dims.
sizesRedirects to underlying Xarray Dataset sizes.
- convert_physical_units(norms)[source]#
Replace physical units on data_vars and coords with the generic simulation units of
norms. Needed before writing to netCDF so saved unit strings (e.g.nref_electron) are not tied to a particular pyro’s run-specific normalisation name.- Parameters:
norms (ConventionNormalisation)
- to(norms, *contexts)[source]#
- Parameters:
norms (
ConventionNormalisation) – Normalisation convention to convert to- Return type:
GKOutput with units from norms