climepi.epimod.SuitabilityModel#

class climepi.epimod.SuitabilityModel(temperature_range=None, suitability_table=None)#

Generic class for suitability models.

temperature_range#

A list or tuple of two floats defining the temperature range of suitability (in degrees Celsius). Only defined if the parameter temperature_range is provided.

Type:

list or tuple or array-like of two floats, optional

suitability_table#

A dataset containing suitability values defined for different temperature values or temperature/precipitation combinations. Only defined if the parameter suitability_table is provided.

Type:

xarray.Dataset

Parameters:
  • temperature_range (list or tuple or array-like of two floats, optional) – A list or tuple of two floats defining the temperature range of suitability (in degrees Celsius), where suitability is assumed to be 1 for temperatures within the range and 0 otherwise. Default is None. Only one of temperature_range and suitability_table should be provided.

  • suitability_table (xarray.Dataset, optional) – A dataset containing suitability values defined for different temperature values or temperature/precipitation combinations. The dataset should have a single data variable called “suitability” with dimension(s) “temperature” and, optionally, “precipitation”. Temperatures should be in degrees Celsius and precipitation values in mm/day. If suitability only depends on temperature, linear interpolation is used to calculate suitability values away from grid points. If suitability only depends on both tempperature and precipitation, equi-spaced temperature and precipitation values should be provided (this is not required if suitability only depends on temperature), and nearest neighbour interpolation is used to calculate suitability values away from grid points (this is for performance reasons). Suitability values can be either binary (0 or 1) or continuous. Suitability is assumed to take the nearest endpoint value for temperature and/or precipitation values outside the provided range(s). Default is None. Only one of temperature_range and suitability_table should be provided.

__init__(temperature_range=None, suitability_table=None)#

Methods

__init__([temperature_range, suitability_table])

get_max_suitability()

Return the maximum suitability value.

plot_suitability_region(**kwargs)

Plot suitability against temperature and (if relevant) precipitation.

run(ds_clim[, ...])

Run the epidemiological model on a given climate dataset.