View source: R/OsWL_Intensity.R
OsWL_Intensity | R Documentation |
Calculates the "intensity" of extreme water levels, as defined in Wahl et al. (2011).
OsWL_Intensity(
Data,
Cluster_Max,
Base_Line = mean(Data$OsWL, na.rm = T),
Rainfall_Interval = 24
)
Data |
A data frame with co-occurring rainfall and O-sWL time series in two columns labeled |
Cluster_Max |
Numeric vector containing indexes of peaks in the O-sWL column of |
Base_Line |
Numeric vector of length one, specifying water level about which to calculate the intensity. Default is the mean O-sWL. |
Rainfall_Interval |
Numeric vector of length one, specifying length of time before and after a peak over which to sum rainfall totals. Total window width is 2* |
A data frame with the following columns:
Pre.High
Index of the OsWL column of Data
containing the preceding high water level.
Fol.High
Index of the OsWL column of Data
containing the following high water level.
Pre.Low
Index of the OsWL column of Data
containing the preceding low water level.
Fol.Low
Index of the OsWL column of Data
containing the following low water level.
Intensity
Intensity of the O-sWL.
V
Total rainfall volume within Rainfall_Interval
before and after the peak.
Decluster
WL_Curve
#Decluster O-sWL series at S-13 using a runs method
S13.OsWL.Declust = Decluster(Data=S13.Detrend.df$OsWL,
SepCrit=24*7, u=0.99667)
#Calculate O-sWL of the identified cluster maximum
intensity = OsWL_Intensity(Data=S13.Detrend.df,Cluster_Max=S13.OsWL.Declust$EventsMax)
#Plot O-sWL series identifying cluster maximum (in red) and print "intensity" above each maximum
plot(as.Date(S13.Detrend.df$Date_Time),
S13.Detrend.df$OsWL)
points(as.Date(S13.Detrend.df$Date_Time[S13.OsWL.Declust$EventsMax]),
S13.Detrend.df$OsWL[S13.OsWL.Declust$EventsMax],pch=16,col=2)
text(as.Date(S13.Detrend.df$Date_Time[S13.OsWL.Declust$EventsMax]),
S13.Detrend.df$OsWL[S13.OsWL.Declust$EventsMax]+0.2,
round(intensity$Intensity,0),cex=0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.