joseki.core

Core module.

Attributes

Functions

identifiers()

List all registered profile identifiers.

load_dataset(path, *args, **kwargs)

Thin wrapper around xarray.load_dataset.

make(identifier[, z, interp_method, conserve_column, ...])

Create a profile with the specified identifier.

merge(datasets[, new_title])

Merge multiple profiles into a single profile.

open_dataset(path, *args, **kwargs)

Thin wrapper around xarray.open_dataset.

Module Contents

joseki.core.identifiers()[source]

List all registered profile identifiers.

Returns:

List of all registered profile identifiers.

Return type:

List[str]

joseki.core.load_dataset(path, *args, **kwargs)[source]

Thin wrapper around xarray.load_dataset.

Parameters:

path (os.PathLike) – Path to the dataset.

Returns:

Profile.

Return type:

xarray.Dataset

joseki.core.make(identifier, z=None, interp_method=DEFAULT_METHOD, conserve_column=False, molecules=None, regularize=None, rescale_to=None, check_x_sum=False, **kwargs)[source]

Create a profile with the specified identifier.

Parameters:
  • identifier (str) – Profile identifier.

  • z (pint.Quantity | dict | xarray.DataArray | None) – Altitude values.

  • interp_method (Mapping[str, str] | None) – Mapping of variable and interpolation method.

  • conserve_column (bool) – If True, ensure that column densities are conserved during interpolation.

  • molecules (List[str] | None) – List of molecules to include in the profile.

  • regularize (bool | dict | None) – Regularize the altitude grid with specified options which are passed to [regularize](reference.md#src.joseki.profiles.core.regularize).

  • rescale_to (dict | None) – Rescale molecular concentrations to the specified target values which are passed to [rescale_to](reference.md#src.joseki.accessor.JosekiAccessor.rescale_to).

  • check_x_sum (bool) – If True, check that the mole fraction sums are less or equal to 1.

  • kwargs (Any) – Additional keyword arguments passed to the profile constructor.

Returns:

Profile as xarray.Dataset.

Return type:

xarray.Dataset

joseki.core.merge(datasets, new_title=None)[source]

Merge multiple profiles into a single profile.

Parameters:
  • datasets (Iterable[xarray.Dataset]) – Iterable of profiles.

  • new_title (str | None) – New title for the merged profile. If None, the title of the first profile is used.

Returns:

Merged profile.

Return type:

xarray.Dataset

Notes

The first profile in the iterable is used as the base profile; when variables with the same name are encountered in subsequent profiles, the variable from the first profile is used.

joseki.core.open_dataset(path, *args, **kwargs)[source]

Thin wrapper around xarray.open_dataset.

Parameters:

path (os.PathLike) – Path to the dataset.

Returns:

Profile.

Return type:

xarray.Dataset

joseki.core.logger