pangeo_fish.io.prepare_dataset#
- pangeo_fish.io.prepare_dataset(dataset, chunks=None, bbox=None, names=None)#
Prepares a dataset of a reference model. It renames some variables (see
names), adds dynamic bathymetry and depth and broadcast lat(itude)/lon(gitude) coordinates.- Parameters:
dataset (
xarray.Dataset) – The pre-opened dataset of the fields datachunks (mapping, optional) – The initial chunk size. Should be multiples of the on-disk chunk sizes. By default, the chunksizes are
{"lat": -1, "lon": -1, "depth": 11, "time": 8}bbox (mapping of
strtotupleoffloat, optional) – The spatial boundaries of the area of interest. Shoud have the keys “longitude” and “latitude”. If provided, it checks whether there is data available within the dataset for the area.names (mapping of
strtostr, optional) – A dictionary that maps the three variables that correspond to the “TEMP”, “XE” and “H0” data. By default, the names align data from the Copernicus Marine Service with{"thetao": "TEMP", "zos": "XE", "deptho": "H0"}.
- Returns:
ds (
xarray.Dataset) – The post-processed dataset.