pangeo_fish.helpers.open_distributions

pangeo_fish.helpers.open_distributions#

pangeo_fish.helpers.open_distributions(*, target_root: str, storage_options: dict, chunks: dict, chunk_time=24, **kwargs)#

Load and merge the emission and states probability distributions into a single dataset.

Warning

Since this function is assumed to be used for visualization and rendering tasks, and that only 2D-indexed data is currently supported by pangeo-fish, the dataset returned is regridded to 2D.

Parameters:
  • target_root (str) – Path to a folder that must contain the combined.zarr and states.zarr files. Must not end with “/”.

  • storage_options (dict) – Additional information for xarray to open the .zarr array

  • chunks (dict) – Mapping of the chunk sizes for each dimension of the xarray.Datasets to load: namely, the .zarr arrays combined and states

  • chunk_time (int, default: 24) – Chunk size of the dimension “time” to use to chunk the result

Returns:

data (xarray.Dataset) – The merged and cleaned dataset, 2D-indexed