ruins.processing.climate_indices#

Module Contents#

Functions#

climate_index_agg(ts, index)

Aggregate the index days based on the available INDICES

calculate_climate_indices([rolling_center, rcps])

Calculates all relevant climate indices for the given climate data, as configured in the DataManager.

Attributes#

INDICES

ruins.processing.climate_indices.INDICES#
ruins.processing.climate_indices.climate_index_agg(ts, index)#

Aggregate the index days based on the available INDICES

ruins.processing.climate_indices.calculate_climate_indices(_dataManager: ruins.core.DataManager, station: str, variable: str, ci: str, rolling_windows=(10, 5), rolling_center=True, rcps=('rcp26', 'rcp45', 'rcp85')) pandas.DataFrame#

Calculates all relevant climate indices for the given climate data, as configured in the DataManager. The procedure will return a pandas DataFrame with aggregated index information for the weather data. For each of the available RCP scenarios, the indices are calculated as well. By default, for each scenario and the weather data, a rolling mean is calculated

Parameters:
  • _dataManager (ruins.core.DataManager) – DataManager instance containing the ‘weather’ and ‘climate’ data

  • station (str) – Station name for filtering weather data. Has to exist as data variable in the weather netCDF

  • variable (str) – Variable name for filtering. Has to exist as dimension value in both, the weather and climate netCDF

  • ci (str) – Index name. Can be any key of ruins.processing.climate_indices.INDICES

  • rolling_windows (Tuple[int, int]) – The window sizes for weather (0) and climate (1) rolling means

  • rolling_center (bool) – If True (default), the rollwing window center will be used as value

  • rcps (List[str]) – Short names of the RCP scenarios to include. Usually only (‘rcp26’, ‘rcp45’, ‘rcp85’) are available.

Returns:

data – DataFrame with all calcualted indices and the year as index

Return type:

pd.DataFrame