Calculates the categories of MHWs or MCSs produced by
accordance with the naming scheme proposed in Hobday et al. (2018).
category( data, y = temp, S = TRUE, name = "Event", climatology = FALSE, MCScorrect = F, season = "range", roundVal = 4 )
The function receives the full (list) output from the
The column containing the measurement variable. If the column
name differs from the default (i.e.
This argument informs the function if the data were collected in the
southern hemisphere (TRUE, default) or the northern hemisphere (FALSE) so that it may correctly
If a character string (e.g. "Bohai Sea") is provided here it will be used
to name the events in the
The default setting of
When calculating marine cold-spells (MCSs) it may occur in some areas that the bottom thresholds for the more intense categories will be below -1.8C, this is physically impossible on Earth, so if one wants to correct the bottom thresholds to not be able to exceed -1.8C, set this argument to TRUE (default is FALSE).
This argument allows the user to decide how the season(s) of occurrence for
the MHWs are labelled. The default setting of
This argument allows the user to choose how many decimal places
the outputs will be rounded to. Default is 4. To
prevent rounding set
The function will return a tibble with results similar to those seen in
Table 2 of Hobday et al. (2018). This provides the information necessary to
appraise the extent of the events in the output of
detect_event based on the
category ranking scale. The category thresholds are calculated based on the difference
between the given seasonal climatology and threshold climatology. The four category levels
are then the difference multiplied by the category level.
The definitions for the default output columns are as follows:
The number of the event as determined by
to allow for joining between the outputs.
The name of the event. Generated from the
value provided and the year of the
peak_date (see following) of
the event. If no
name value is provided the default "Event" is used.
As proposed in Hobday et al. (2018),
Moderate events are not given a name
so as to prevent multiple repeat names within the same year. If two or more events
ranked greater than Moderate are reported within the same year, they will be
differentiated with the addition of a trailing letter
(e.g. Event 2001a, Event 2001b).
The date (day) on which the maximum intensity of the event was recorded.
The maximum category threshold reached/exceeded by the event.
The maximum intensity of the event above the threshold value.
The total duration (days) of the event. Note that this includes
any possible days when the measurement value
y) may have dropped below the
threshold value. Therefore, the proportion of the event duration (days) spent above
certain thresholds may not add up to 100% (see following four items).
The proportion of the total duration (days) spent at or above the first threshold, but below any further thresholds.
The proportion of the total duration (days) spent at or above the second threshold, but below any further thresholds.
The proportion of the total duration (days) spent at or above the third threshold, but below the fourth threshold.
The proportion of the total duration (days) spent at or above the fourth and final threshold.
The season(s) during which the event occurred. If the event
occurred across two seasons this will be displayed as e.g. "Winter/Spring".
Across three seasons as e.g. "Winter-Summer". Events lasting across four or more
seasons are listed as "Year-round". December (June) is used here as the start of
Austral (Boreal) summer. If "start", "peak", or "end" was given to the
argument then only the one season during that chosen period will be given.
The column containing the daily date values.
The numeric event number label.
The daily exceedance (default is degrees C) above the seasonal climatology.
The category classification per day.
An explanation for the categories is as follows:
I Moderate-Events that have been detected, but with a maximum intensity that does not double the distance between the seasonal climatology and the threshold value.
II Strong-Events with a maximum intensity that doubles the distance from the seasonal climatology and the threshold, but do not triple it.
III Severe-Events that triple the aforementioned distance, but do not quadruple it.
IV Extreme-Events with a maximum intensity that is four times or greater than the aforementioned distance. Scary stuff...
Hobday et al. (2018). Categorizing and Naming Marine Heatwaves. Oceanography 31(2).
Robert W. Schlegel
res_WA <- detect_event(ts2clm(sst_WA, climatologyPeriod = c("1983-01-01", "2012-12-31"))) # Note that the name argument expects a character vector cat_WA <- category(res_WA, name = "WA") tail(cat_WA)#> # A tibble: 6 × 11 #> event_no event_name peak_date category i_max duration p_moderate p_strong #> <int> <fct> <date> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 40 WA 2010c 2010-12-02 II Strong 2.66 15 73 27 #> 2 31 WA 2008a 2008-04-14 III Severe 3.77 34 62 29 #> 3 22 WA 1999 1999-05-22 II Strong 3.60 95 59 41 #> 4 58 WA 2014 2014-08-31 II Strong 2.20 12 58 42 #> 5 61 WA 2015 2015-10-02 II Strong 2.43 7 57 43 #> 6 42 WA 2011b 2011-02-28 IV Extreme 6.51 60 47 32 #> # … with 3 more variables: p_severe <dbl>, p_extreme <dbl>, season <chr># If the data were collected in the northern hemisphere # we must let the function know this, as seen below res_Med <- detect_event(ts2clm(sst_Med, climatologyPeriod = c("1983-01-01", "2012-12-31"))) cat_Med <- category(res_Med, S = FALSE, name = "Med") tail(cat_Med)#> # A tibble: 6 × 11 #> event_no event_name peak_date category i_max duration p_moderate p_strong #> <int> <fct> <date> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 84 Med 2017a 2017-04-12 II Strong 2.70 25 60 36 #> 2 28 Med 2003a 2003-06-20 II Strong 5.02 30 57 43 #> 3 62 Med 2012b 2012-08-20 II Strong 4.22 18 56 44 #> 4 70 Med 2014 2014-10-18 II Strong 3.31 144 49 50 #> 5 44 Med 2007b 2007-04-25 III Severe 4.02 19 42 53 #> 6 88 Med 2018a 2018-04-28 II Strong 3.29 10 20 80 #> # … with 3 more variables: p_severe <dbl>, p_extreme <dbl>, season <chr># One may also choose to have this function output the daily # category classifications as well by setting: climatology = TRUE cat_WA_daily <- category(res_WA, name = "WA", climatology = TRUE) head(cat_WA_daily$climatology)#> # A tibble: 6 × 4 #> t event_no intensity category #> <date> <int> <dbl> <chr> #> 1 1984-06-03 1 1.56 I Moderate #> 2 1984-06-04 1 1.79 I Moderate #> 3 1984-06-05 1 1.92 I Moderate #> 4 1984-06-06 1 1.67 I Moderate #> 5 1984-06-07 1 1.58 I Moderate #> 6 1984-06-17 2 2.02 I Moderate# Note that this will not return the complete time series, only the # days during which events were detected. # This was done to reduce the size of the output for those working # with gridded data. # Should one want a complete time series, the daily category results # may simply be left_join() with the detect_event() results cat_WA_ts <- dplyr::left_join(res_WA$climatology, cat_WA_daily$climatology)#>head(cat_WA_ts)#> # A tibble: 6 × 11 #> doy t temp seas thresh threshCriterion durationCriterion event #> <int> <date> <dbl> <dbl> <dbl> <lgl> <lgl> <lgl> #> 1 1 1982-01-01 20.9 21.6 23.0 FALSE FALSE FALSE #> 2 2 1982-01-02 21.2 21.6 23.0 FALSE FALSE FALSE #> 3 3 1982-01-03 21.4 21.7 23.0 FALSE FALSE FALSE #> 4 4 1982-01-04 21.2 21.7 23.1 FALSE FALSE FALSE #> 5 5 1982-01-05 21.3 21.7 23.1 FALSE FALSE FALSE #> 6 6 1982-01-06 21.6 21.7 23.1 FALSE FALSE FALSE #> # … with 3 more variables: event_no <int>, intensity <dbl>, category <chr>