joseki¶
Joseki.
Submodules¶
Attributes¶
Functions¶
List all registered profile identifiers. |
|
|
Interpolate atmospheric profile on new altitudes. |
|
Thin wrapper around xarray.load_dataset. |
|
Create a profile with the specified identifier. |
|
Merge multiple profiles into a single profile. |
|
Thin wrapper around xarray.open_dataset. |
Package Contents¶
- joseki.identifiers()[source]¶
List all registered profile identifiers.
- Returns:
List of all registered profile identifiers.
- Return type:
List[str]
- joseki.interp(ds, z_new, method=DEFAULT_METHOD, conserve_column=False, **kwargs)[source]¶
Interpolate atmospheric profile on new altitudes.
- Parameters:
ds (xarray.Dataset) – Atmospheric profile to interpolate.
z_new (pint.Quantity) – Altitudes values at which to interpolate the atmospheric profile.
method (Dict[str, str]) – Mapping of variable and interpolation method. If a variable is not in the mapping, the linear interpolation is used. By default, linear interpolation is used for all variables.
conserve_column (bool) – If True, ensure that column densities are conserved.
kwargs (Any) – Parameters passed to
scipy.interpolate.interp1d()(except ‘kind’ and ‘bounds_error’).
- Returns:
Interpolated atmospheric profile.
- Return type:
- joseki.load_dataset(path, *args, **kwargs)[source]¶
Thin wrapper around xarray.load_dataset.
- Parameters:
path (os.PathLike) – Path to the dataset.
- Returns:
Profile.
- Return type:
- joseki.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:
- joseki.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:
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.open_dataset(path, *args, **kwargs)[source]¶
Thin wrapper around xarray.open_dataset.
- Parameters:
path (os.PathLike) – Path to the dataset.
- Returns:
Profile.
- Return type:
- joseki.unit_registry¶