Comparing Monthly Rainfall Data between 1850 & 2014 across four Irish Stations using the dygraphs package in R

Author

Lionel Swan (20364951)

Introduction

The frequent and intensity of Rainfall over Ireland has temporal and spacial variability (Mateus and Coonan, 2023).The driest months are April and June, where as the wettest are December and January. The eastern half of the country typically receives between 750 - 1000mm of rain per annum, while the western half receives between 1000 - 1400mm per annum (Met Éireann, n.d.). Particularly hilly or mountainous areas receive the most rainfall, exceeding 2000mm per annum.

Studies have assessed whether these historical pattern are changing or if they already have. Kiely, (1999) found evidence that since 1975, Ireland has received significantly more rainfall due to the presence of an increased NAO. Leahy and Kiely, (2011) also found that since the 1970s, there has been a change in the spatial distribution and seasonal pattern of rainfall across Ireland.

Further changes are expected to occur due to climate change. Researchers project that Ireland’s summers will get drier and it’s winters will get wetter (Murphy et al., 2019).

Using a rainfall dataset running from 1850 to 2014, four rainfall gauges (approximately covering the North, South, East & West of Ireland) were compared to see if these temporal and spatial patterns are visible, and whether any changes can be identified over time.

The Data & Methods

The Island of Ireland Precipitation (IIP) series from 1850 - 2010 constructed by Noone et al (2015) provided the initial framework for this report. The dataset comprised of monthly rainfall data for 25 locations across Ireland. An altered version of this dataset was provided by the lead authors of the paper cited above for the benefit of this report.

Four stations, Dublin Airport, Belfast, University College Galway and Cork Airport were selected from the 25 for analysis. These four stations approximately represent the Northern, Southern, Eastern and Western regions of the Island of Ireland, allowing for spatial analysis. All data values were monthly totals for each station allowing for temporal analysis.

The dygraphs package in R provides an easy and effective visualization of time-series data (Github, n.d.). Besides the main function dygraph, other functions such as dyRangeSelector and dyRoller allow for increased interactiveness and functionality to the graph. The function dyRangeSelector introduces a movable slider to the bottom of the graph which allows the user to zoom in on specific time periods or intervals without having to create multiple graphs. The function dyRoller provides the user the option of smoothing out variability within the data by calculating a moving average over a specified period which can be adjusted in real time without the need of creating multiple graphs.

Results & Discussion

Looking at Figure 1, there does appear to be a number of interesting trends in the time series. At the beginning of the time series (1850s), monthly rainfall is relatively high. Following this is a gradual decline in monthly rainfall until 1900. From 1900 to 1970, monthly rainfall appears to stabilize, with no increasing or decreasing trend visible. However, from 1970 onwards, there is a visible increase in monthly rainfall, returning to levels similar to those seen in the 1850s.

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.4
✔ forcats   1.0.0     ✔ stringr   1.5.0
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.0
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(dygraphs)
load('Rainfall.RData')
rain %>%  filter(Station=="Dublin Airport") %>%
  summarise(Rainfall=sum(Rainfall),.by=c(Year,Month)) %>% pull(Rainfall) %>%
  ts(start=c(1850,1),freq=12) ->  dublin_ts
rain %>% filter(Station=="Belfast") %>%
  summarise(Rainfall=sum(Rainfall),.by=c(Year,Month)) %>% pull(Rainfall) %>%
  ts(start=c(1850,1),freq=12) ->  belfast_ts
rain %>% filter(Station=="University College Galway") %>% 
  summarise(Rainfall=sum(Rainfall),.by=c(Year, Month)) %>% pull(Rainfall) %>% 
  ts(start=c(1850,1), freq=12) -> galway_ts
rain %>% filter(Station=="Cork Airport") %>% 
  summarise(Rainfall=sum(Rainfall),.by=c(Year, Month)) %>% pull(Rainfall) %>% 
  ts(start=c(1850,1), freq=12) -> cork_ts

All_ts <- cbind(belfast_ts,dublin_ts,galway_ts,cork_ts)

All_ts %>% dygraph() %>% dyRangeSelector() %>% dyRoller(rollPeriod = 1)

Figure 1. Time series of monthly rainfall totals observed between 1850 and 2014 across four stations; Dublin Airport, Belfast, University College Galway and Cork Airport.

Using the movable slider to zoom in on the interval between 1970 and 1975, it is possible to see the expected temporal trend of wet winters and dry summers, with a few noticeable exceptions. Investigating further, June 1975 was an extremely wet month, significantly wetter than the December of that same year, however besides that month, the general trend in visible. It also becomes clear the spatial trend that exist across Ireland. The Dublin station recorded the lowest amount of rainfall on 8 of the 12 months in 1975. 8 out of the 12 months of 1975 also saw either the University College Galway station or the Belfast station record the highest amount of rainfall. Setting the moving average function to 100 month, the overall spatial trend becomes distinctly visible. The Dublin station consistently records the lowest amount of monthly rainfall, where as the Cork Airport station and the University College Galway station exchange the highest amount of monthly rainfall multiple times through out the time series.

Figure 2 displays the same data as Figure 1, however the four stations are separated allowing for a different visual. When looking at the stations individually, it becomes clearer the overall trend over time. The Dublin station appears to exhibit a gradual increasing trend over time, whereas the University College Galway station and the Cork Airport station shows some what of a decline, followed by a period of stability, and then began to increase from the 1970s as first indicated by Figure 1.

dublin_ts %>% dygraph(width=800,height=160,group="dub_belf",main="Dublin Airport")
belfast_ts %>% dygraph(width=800,height=170,group="dub_belf",main="Belfast") 
galway_ts %>% dygraph(width=800,height=170,group="dub_belf",main="University College Galway")
cork_ts %>% dygraph(width=800,height=225,group="dub_belf",main="Cork Airport")%>% 
  dyRangeSelector

Figure 2. Separated Time Series of monthly rainfall totals observed between 1850 and 2014 across four stations; Dublin Airport, Belfast, University College Galway and Cork Airport.

Based of these figures, the expected temporal and spatial trends are observed in the data. Typically the most rainfall was recorded during the winter months of December and January, and the least was normally recorded in late spring and early summer, as supported by the literature. The Dublin station, located in the East of the country consistently recorded the least monthly rainfall. The University College Galway station, located along the west coast, typically recorded the highest or the second highest monthly rainfall throughout the time series, again supported by the literature.

Conclusion

Rainfall over Ireland exhibits a temporal and spatial trend, with the most rainfall experienced during the winter months of December and January, and the least during the months of late spring and early summer. The east of the country experiences the least amount of rainfall, whereas the west experiences the most. Using a monthly rainfall dataset, a visual investigation was conducted to establish if these trends were visible across four rainfall stations located around Ireland. Results were conducive with the trends identified in the literature, indicating that Ireland’s rainfall has distinct temporal and spatial patterns and trends over time.

References

Github, (n.d.) dygraphs for R. Available at: https://rstudio.github.io/dygraphs/

Kiely, G. (1999) Climate change in Ireland from precipitation and streamflow observations. Advances in Water Resources, 23, 141-151. Available at: https://www.ucc.ie/en/media/research/hydromet/1-s2.0-S0309170899000184-main.pdf

Leahy, P.G., Kiely, G. (2011) Short Duration Rainfall Extremes in Ireland: Influence of Climatic Variability. Water Resour Manage 25, 987–1003. Available at: https://link.springer.com/article/10.1007/s11269-010-9737-2

Mateus, C., and Coonan, B. (2023). Estimation of point rainfall frequencies in Ireland. Technical Note No. 68. Met Éireann. Available at: https://www.researchgate.net/profile/Carla-Mateus-4/publication/370599804_Estimation_of_point_rainfall_frequencies_in_Ireland/links/64590a535762c95ac380210e/Estimation-of-point-rainfall-frequencies-in-Ireland.pdf

Met Éireann, (n.d.) Rainfall Climate of Ireland, The current Rainfall Irish Climatology and the Long Term Average period 1981 - 2010. Available at: https://www.met.ie/climate/what-we-measure/rainfall

Murphy, C., Broderick, C., Matthews, T.K.R. et al (2019) Irish Climate Futures: Data for Decision-making. EPA Research, Climate - Water - Sustainability. Report No.277. Available at: https://www.epa.ie/publications/research/climate-change/Reserach_Report_277.pdf

Noone. S., Murphy, C., Coll, J., et al (2015) Homogenization and analysis of an expanded long-term monthly rainfall network for the Island of Ireland (1850-2010). International Journal of Climatology, 36(8), 2837-2853. Available at: https://doi.org/10.1002/joc.4522