get_selection
- cosipy.postprocessing.field_plots.plot_cosipy_fields.get_selection(array, timestamp, mean=False)[source]
Selects data from array at specific time or as a daily mean.
- Parameters:
array (DataArray) – Labelled data array.
timestamp (str) – Date or datetime index of target data.
mean (bool) – If True, computes and selects the daily mean. Otherwise, selects data at
timestamp. Default False.
- Returns:
Array selection at target time.
- Raises:
KeyError – Selected time index refers to an entire day, not a single timestep. Use
--meanto plot the daily mean.- Return type:
DataArray