diff --git a/vignettes/wave/heatcoldwaves.md b/vignettes/wave/heatcoldwaves.md index ada8d907f283cc234d7b7db83a2a4ee892f02f39..999349f942e16c2344076e312c3e7260ba6254f0 100644 --- a/vignettes/wave/heatcoldwaves.md +++ b/vignettes/wave/heatcoldwaves.md @@ -6,7 +6,7 @@ output: Heatwave and coldwave duration ============================== -Heatwave and coldwave duration is the total duration of "extreme spells"; the total number of days in a season where the temperature exceeds a threshold over a minimum number of consecutive days. Other tools for computing such events are also available, but the novelty of this tool is that the users can select their own thresholds (based on quantiles) and minimum duration of an event. The duration of heatwaves and coldwaves helps to understand potential changes in energy demand. +Heatwave and coldwave duration is considered to be the total duration of "extreme spells", i.e. the total number of days in a season when the temperature exceeds a threshold for a given number of consecutive days. Other tools for computing such events are also available, but the novelty of this tool is that the users can select their own thresholds (based on quantiles) and the minimum duration of an event. The duration of heatwaves and coldwaves helps to understand potential changes in energy demand. ### 1- Load dependencies @@ -32,9 +32,9 @@ library(s2dverification) library(parallel) ``` -The ilustrative problem is to analyze the daily maximum or minimum air temperature at 2 m to com. The reference period used from the historical simulations to compute a threshold is 1971 - 2000. While, the future scenario chosen is the rcp2.6 during the period 2006 - 2100 for which the heat/cold wave duration will be determined. Finally, the region selected in the northern hemisphere is between -40 - 20 ºE and 25 - 60 ºN. +The ilustrative problem is to analyze the daily maximum or minimum air temperature at 2m. The reference period used to compute a threshold is 1971 - 2000. The future scenario chosen is the rcp2.6 during the period 2006 - 2100 for which the heat/cold wave duration will be determined. Finally, the region selected in the northern hemisphere is between -40 - 20 ºE and 25 - 60 ºN. -The parameters, for a heat wave example, are defined by running the next lines in R: +These parameters are defined by running: ```r var <- 'tasmax' @@ -49,7 +49,7 @@ lat <- seq(25, 60, 5) lon <- seq(-35, 20 ,5) ``` -A synthetic sample of data for the reference period is built by adding random perturbation to a sinusoidal function. The latitudinal behavior of the temperature is considered by subtracting randomly a value proportional to the latitud. Furthermore, attributes of time and dimensions are added. +A synthetic sample of data for the reference period is built by adding random perturbations to a sinusoidal function. The latitudinal behavior of the temperature is considered by randomly subtracting a value proportional to the latitude. Furthermore, attributes of time and dimensions are added. ```r @@ -76,7 +76,7 @@ attr(time, "variables") <- metadata attr(tmax_historical, 'Variables')$dat1$time <- time ``` -A similar procedure is considered to build the synthetic data for the future projections. However, a little trend is added. +A similar procedure is considered to build the synthetic data for the future projections. However, a small trend is added. ´ ```r @@ -107,14 +107,14 @@ attr(tmax_projection, 'Variables')$dat1$time <- time ### 2- Heatwaves -The heatwaves duration is the number of consecutive days for which the maximum temperature is exceeding a threshold over a minimum number of days during summer. +The heatwaves duration is the number of consecutive days for which the maximum temperature is exceeding a threshold for a minimum number of days during summer. #### 2.1- Defining heatwaves threshold In this example, the threshold is defined as the 90th percentile of maximum temperature during the period 1971-2000. -The summer data can be picked by `SeasonSelect` function from the **ClimProjDiags package**. +The summer data can be picked by the `SeasonSelect` function from the **ClimProjDiags package**. ```r summer_tmax_historical <- SeasonSelect(tmax_historical, season = 'JJA') @@ -129,7 +129,7 @@ List of 2 $ dates: POSIXct[1:2760], format: "1971-06-01 12:00:00" "1971-06-04 12:00:00" ... ``` -To define the heatwave it is necessary to select the maximum temperature threshold that must be exceeded. In this example, the 90 th percentile of the maximum temperature during the reference period is selected. This calculation is performed using `Threshold` function from **ClimProjDiags package**. +To define the heatwave it is necessary to select the maximum temperature threshold that must be exceeded. In this example, the 90th percentile of the maximum temperature during the reference period is selected. This calculation is performed using `Threshold` function from **ClimProjDiags package**. ```r quantile <- 0.9