xarray.Dataset.climepi.yearly_portion_suitable#

Dataset.climepi.yearly_portion_suitable(suitability_var_name=None, suitability_threshold=0)[source]#

Calculate the portion of each year that is suitable given suitability data.

Suitability data must be provided on either a monthly or daily basis; the suitable portion of each year is given as the number of months or days that are suitable in the respective cases.

Parameters:
  • suitability_var_name (str, optional) – Name of the suitability variable to use. If not provided, the method will attempt to automatically select a suitable variable.

  • suitability_threshold (float, optional) – Minimum suitability threshold for a month to be considered suitable. Default is 0.

Returns:

xarray.Dataset – Dataset with a single non-bounds data variable ‘portion_suitable’, with units of months (for monthly suitability data) or days (for daily suitability data) each year.