Skip to content

Commit

Permalink
Suggestions from review
Browse files Browse the repository at this point in the history
  • Loading branch information
aulemahal committed Oct 9, 2024
1 parent 24e2f7a commit fb6cf7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions xclim/indicators/atmos/_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class TempHourlyWithIndexing(ResamplingIndicatorWithIndexing):
long_name="Number of heat spells",
description="{freq} number of heat spells events. A heat spell occurs when the {window}-day "
"averages of daily minimum and maximum temperatures each exceed {thresh_tasmin} and {thresh_tasmax}. "
"All days of the {window}-day period are considered part of the spell. Gaps of under {min_gap} days are allowed "
"All days of the {window}-day period are considered part of the spell. Gaps of fewer than {min_gap} day(s) are allowed "
"within a spell.",
abstract="Number of heat spells. A heat spell occurs when rolling averages of daily minimum and maximum temperatures exceed given "
"thresholds for a number of days.",
Expand Down Expand Up @@ -342,7 +342,7 @@ class TempHourlyWithIndexing(ResamplingIndicatorWithIndexing):
long_name="Longest heat spell",
description="{freq} maximum length of heat spells. A heat spell occurs when the {window}-day "
"averages of daily minimum and maximum temperatures each exceed {thresh_tasmin} and {thresh_tasmax}. "
"All days of the {window}-day period are considered part of the spell. Gaps of under {min_gap} days are allowed "
"All days of the {window}-day period are considered part of the spell. Gaps of fewer than {min_gap} day(s) are allowed "
"within a spell.",
abstract="The longest heat spell of a period. A heat spell occurs when rolling averages of daily minimum and maximum temperatures exceed given "
"thresholds for a number of days.",
Expand Down Expand Up @@ -376,7 +376,7 @@ class TempHourlyWithIndexing(ResamplingIndicatorWithIndexing):
description="{freq} total length of heat spell events. "
"A heat spell occurs when the {window}-day averages of daily minimum and maximum temperatures "
"each exceed {thresh_tasmin} and {thresh_tasmax}. All days of the {window}-day period are considered part of the spell."
"Gaps of under {min_gap} days are allowed within a spell.",
"Gaps of fewer than {min_gap} day(s) are allowed within a spell.",
abstract="Total length of heat spells. A heat spell occurs when rolling averages of daily minimum and maximum temperatures exceed given "
"thresholds for a number of days.",
compute=indices.generic.bivariate_spell_length_statistics,
Expand Down
9 changes: 6 additions & 3 deletions xclim/indices/run_length.py
Original file line number Diff line number Diff line change
Expand Up @@ -1747,9 +1747,12 @@ def suspicious_run(


def _find_events(da_start, da_stop, data, window_start, window_stop):
# Get basic blocks to work with, our runs with holes and the lengths of those runs
# Series of ones indicating where we have continuous runs of freezing rain with pauses
# not exceeding `window_stop`
"""Actual finding of events for each period.
Get basic blocks to work with, our runs with holes and the lengths of those runs.
Series of ones indicating where we have continuous runs with pauses
not exceeding `window_stop`
"""
runs = runs_with_holes(da_start, window_start, da_stop, window_stop)

# Compute the length of freezing rain events
Expand Down

0 comments on commit fb6cf7d

Please sign in to comment.