GY672 - Assignment 2

Author

Csaba Horvath

January median rainfall across the island of Ireland 1850 - 2014

Aims and objectives

This blog entry aims to visualise, explore and analyse spatial-temporal aspects of rainfall patterns across Ireland. The objective is to communicate insights effectively by creating a dynamic narrative supported by visual representations.

The discussion highlighting key emerging patterns is based on a colour ramp map of rainfall data from 25 weather stations across Ireland with long-term January median rainfall in the focus. The blog entry provides an insightful explanation of the underlying data set, unravels the code employed for the data preparation and map creation, showcases the embedded map, and provides a brief discussion highlighting the key patterns that emerge from the spatial exploration of data.

Data and quality assurance

The data set in the focus of the exercise is a slightly extended version of the Island of Ireland Precipitation (IIP) series. The original data set covers the 1850-2010 period, while the data provided for the exercise expands to the end of 2014.

The IIP series was constructed in collaboration with researchers from the Irish Climate Analysis and Research Units (ICARUS) and Met Éireann by collating rescued data from meteorological archives and previously available long-term records.The network of rain gauges consists of 25 stations from all over the island (see Figure 1).

Figure 1: Rain gauge locations of the Island of Ireland Precipitation (IIP) network. Source: the Author’s work

Detailed metadata were compiled for each station, individual series were homogenised, and breaks confirmed by metadata in the individual time series were adjusted. After the England-Wales Precipitation series (EWP), the resulting long-term series is the second-longest regional precipitation archive in the British-Irish Isles. The data set consists of homogenised and quality-assured precipitation data for 25 locations across Ireland for over 150 years.

Detailed information about the data preparation, applied quality assurance steps along with the initial analysis of the IIP series is available from the research publication of Noone and his colleagues (2016), while data for the 25 station network is obtainable at the Met Éireann website (2023).

Data preparation and processing

The data set used in this exercise was provided in an R Data format by the module coordinator. Because it is based on the thoroughly quality-assured IIP series, no further quality control processes were applied apart from a visual check for any missing data or other data continuity issues.

The RData file consisted of two ‘objects’:

  • a.) A “rain” object with a time stamp indicating years and months in separate columns, the monthly rainfall totals in millimetres (mm) for each station for the 1850 – 2014 period and the station name;

and

  • b.) A “stations” object with the metadata for all 25 stations of the network, including information such as the station name, station abbreviation, the location coordinates in Lat-Long and Easting-Northing format, the county in which the station is situated and the source of data.

Data preparation and processing for the mapping of the required data consists of five main steps:

  • the initial data check
  • the computing of long-term (1850-2014) monthly median values
  • narrowing of data to January median values
  • obtaining coordinates for the stations
  • joining long-term January median values with station coordinates

First, data was loaded, and objects in the RData file were listed and visually checked. The total number of monthly observations and the number of observations for each calendar month were computed for each station. No missing observations were identified. As an additional safety measure, both objects were saved as separate comma-separated value (CSV) files and were visually assessed. No issues were identified.

# 1. Initial data check 
## Loading data

# Loading rrequired libraries
library(tidyverse)
library(dplyr)

# Loading the data and listing the objects in it
load("rainfall.RData")
ls()


## Separating and saving "rain" and "stations" data as csvs

write.csv(rain, file = "rain.csv", row.names = FALSE)
write.csv(stations, file = "stations.csv", row.names = FALSE)


## Computing number of months for 1850 - 2014

# Define the start and end years
start_year <- 1850
end_year <- 2014

# Calculating the number of months
number_of_months <- (end_year - start_year + 1) * 12

# Exhibiting the result
print(paste("Number of months from", start_year, "to", end_year, "is:", number_of_months))

# NOTE: Number of months from 1850 to 2014 is: 1980 (165 yrs)


## Checking the number of observations for each station 

# Creating a table for counting observations by station
observations_by_station <- table(rain$Station)

# Exhibiting the counts for each station
print("Observations by Station:")
print(observations_by_station)

# NOTE: Each station has 1980 mtly observations


## Checking the number of observations for each calendar month for each station

# Creating a table for counting observations by station and month
observations_by_station_and_month <- table(interaction(rain$Station, rain$Month))

# Exhibiting the counts for each station and month
print("Observations by Station and Month:")
print(observations_by_station_and_month)

# Saving the observations_by_station_and_month object
write.csv(observations_by_station_and_month, file = "observations_by_station_and_month.csv", row.names = FALSE)

# NOTE: Each station has 165 observations for each calendar month

During the second step, based on the long-term monthly observations, median rainfall values (LTA_med_indiv) were computed for each calendar month for each station for the entire 1850-2014 period.

## 2. Computing long-term (1850-2014) monthly median values
# NOTE: LTA_med_indiv = monthly median values for each individual station for each calendar month

# Grouping data by month and station, then computing monthly median values
rain %>% group_by(Month,Station) %>% 
  summarise(medrain=median(Rainfall)) ->
  LTA_med_indiv

# Checking results
LTA_med_indiv

# Saving the LTA_med_indiv object
write.csv(LTA_med_indiv, file = "LTA_med_indiv.csv", row.names = FALSE)

In the third step, the computed long-term monthly median rainfall values were filtered for January.

## 3. Filtering for January
# NOTE: LTA_med_indiv_JAN = January median values for each individual station

LTA_med_indiv %>% filter(Month == "Jan") -> LTA_med_indiv_JAN

# Checking results
LTA_med_indiv_JAN

# Saving the LTA_med_indiv_JAN object
write.csv(LTA_med_indiv_JAN, file = "LTA_med_indiv_JAN.csv", row.names = FALSE)

The coordinates stored in the “stations” object were obtained and assigned to each corresponding value. Simple feature points were generated from the longitude and latitude coordinates stored in the “stations” object, and the computed January median rainfall values were joined.

## 4. Obtaining station coordinates

# Obtaining station location coordinates

# Loading required package
library(sf)

# Generating simple feature points from Long, Lat coordinates
stations_sf <- stations %>%
  st_as_sf(coords=c('Long', 'Lat'), crs=4326)

# Checking results
stations_sf


## 5. Joining LTA_med_indiv_JAN with "Stations"

# Joining LTA_med_indiv_JAN data with station coordinates
stations_sf %>% left_join(LTA_med_indiv_JAN) -> LTA_med_indiv_JAN_loc

# Checking the new object and its structure
LTA_med_indiv_JAN_loc
str(LTA_med_indiv_JAN_loc)

# Saving the LTA_med_indiv_loc object
write.csv(LTA_med_indiv_JAN_loc, file = "LTA_med_indiv_JAN_loc.csv", row.names = FALSE)

Mapping the data

January median rainfall values were plotted for each station with the Thematic Maps (‘tmap’) package of R (Tennekes, 2018).

The information to exhibit was monthly rainfall at point sources without requiring topographical or other geographical details (except for county borders). Because the task required a graduated colour-ramp map, the ‘plot’ mode was chosen to visualise data.

Due to its relative simplicity and cleaner look, this map mode optimises the readability of the displayed information, enabling a more convenient analysis of data.

To maintain the simple look and readability, the map only utilises the “counties” geojson file provided in the module’s data folder. The file contains shape files for the Irish counties, including counties of Northern Ireland. Station locations are marked with simple circles or dots, and the symbol size is increased for better visibility. To further improve the markers’ visibility, the marker circle borders were highlighted by duplicating the layer with different colouring and sizing.

Conveniently, the built-in palette colouring function of ‘tmap’ automatically generated six pretty-break categories beginning from 60mm, increased by 20mm intervals to a maximum of 180mm, which is an optimal categorisation for the visual representation of the relatively wide data range (63mm to 177.7mm). Blue is commonly associated with water and rainfall, so the palette colour was set to “Blues”. As default, ‘tmap’ assigned darker shades to higher values; therefore, no further adjustment was required regarding the colour ramp.

A legend was generated for the colour ramp, with the title “Median rain” indicating the units (millimetres). Additionally, a North arrow and scale bar were added to complete the map (see Fig 3).

## 6. Mapping the data

# Loading required package
library(tmap)

# Loading counties
counties <- st_read("counties.geojson")
counties

# Plotting the map
tmap_mode("plot")

# Adding background layers
  tm_shape(counties) + 
  tm_borders() +
  
# Adding station 'marker circle borders'  
  tm_shape(LTA_med_indiv_JAN_loc) + 
  tm_dots(col = "black", size = 2.3) +

# Adding and formatting station markers, setting the colour ramp, adding legend and legend title    
  tm_shape(LTA_med_indiv_JAN_loc) + 
  tm_dots(col = "medrain", palette = "Blues", size = 2, legend.show = TRUE, title = "Median rain (mm)") +
    
# Adding north arrow and scale bar     
  tm_compass(north = 0, type = "arrow", size = 2, position = "right") +
  tm_scale_bar(position = "right")

January median rainfall across the island of Ireland 1850 - 2014

Winter and autumn are the wettest seasons in Ireland with January being one of the wettest months (the wettest month is December, closely followed by October, November and January) with a benchmark long-term average of approximately 130mm or higher monthly rainfall total. The rainfall distribution across the island is uneven, with a solid west-to-east decline. Figure 1 shows the long-term average January rainfall distribution. Both rainfall amounts and number of rain days are highest in the west and southwest of the country, especially at higher elevations. ( Curley et al., 2023)

Figure 2: Long-term January rainfall distribution in Met Éireann’s latest Climate Averages report. Source: Curley, M., Coonan, B., Ruth, C.E. and Ryan, C. (2023) ‘Ireland’s Climate Averages 1991-2020’, Climatological Note No. 22, Met Éireann, Ireland. Available at: https://www.met.ie/climate/30-year-averages

All these spatial characteristics are nicely observable on the map of January median rainfall of the 1850 – 2014 period (see Fig 3). Stations with the highest January median rainfall values are typically located in the southwestern and western parts of the island, while the median rainfall values show a generally decreasing tendency towards the east/northeast. In contrast, stations with the lowest January median values are located in the midlands and further east/northeast on the island, which nicely illustrates how Ireland’s precipitation pattern is controlled by mid-latitude, westerly atmospheric circulation, and its associated frontal systems.

Figure 3: January median rainfall during the period of 1850–2014. Source: the Author’s work

Although somewhat masked by the effects of the dominant large-scale atmospheric circulation, the inversely proportional relation between rainfall volumes and distance from the sea is also observable in the mapped median January data. The stations clustered in the heart of the island of Ireland receive less rainfall than those closer to the coastline. The only exceptions are the airport units from the greater Dublin area, where, despite the gauges’ relative closeness to the shores, the instrument sites are sheltered by the Wicklow Mountains from the dominant south-westerly winds and the associated frontal systems.

These gauge sites are prime examples of the influence of topography on local precipitation characteristics. In general, stations in hillier and mountainous areas like Enniscorthy or Rathdrum, especially on more exposed west and southwest slopes, like Cappoquinn, are characterised by higher January median rainfall values, while stations on the lee side of the mountains, such as the Dublin area, receive noticeably lower rainfall during the same period.

The map also reveals some peculiarities. Despite being relatively close to the western fringe of the island, the Shannon Airport near Limerick has a markedly lower January median rainfall than either of the ‘neighbouring’ stations in Killarney or Galway. On the other hand, it must be kept in mind that the plotted data are median values and not long-term monthly means, and therefore, only represent a value that is exceeded and subceeded 50 per cent of the time. Nevertheless, this anomaly would be worth further investigation to reveal the likely cause of the lower median value.

Similarly, despite its exposure to similar westerly winds in the winter, Derry’s median rainfall is significantly lower than that of its closest neighbour, Ardara. However, it has to be considered that the hilly terrain north-northwest of Derry might have a ‘sheltering’ effect on the station. In contrast, Ardara is wholly exposed to westerly winds.

Conclusions

In conclusion, the brief analysis of January median rainfall across the island of Ireland from 1850 to 2014 reveals a complex spatial distribution influenced by various geographical and atmospheric factors.

The map effectively illustrates the impact of Ireland’s mid-latitude westerly atmospheric circulation: the west-to-east decline in rainfall distribution is prominent, with the highest values concentrated in the southwest and west, gradually decreasing towards the east and northeast.

Stations closer to the coast generally receive more rainfall, showcasing the influence of the inverse relationship between rainfall volumes and distance from the sea. However, exceptions, such as the greater Dublin area, highlight the role of topography, where the Wicklow Mountains shield specific locations from prevailing south-westerly winds.

Noteworthy variations are observed, such as the lower January median rainfall at Shannon Airport compared to neighbouring stations or the contrast between Derry and Ardara, which both prompt further investigation.

In essence, the generated map not only provides insights into the historical patterns of January median rainfall in Ireland but also emphasises the need for a nuanced understanding of the complex interplay of factors, such as the local topography and atmospheric dynamics, to unveil the intricacies of precipitation variations across a region.

References

Met Éireann (2023) ‘Long Term Data Sets - Rainfall time series from 1850-2010 for Ireland’, Met Éireann, Available at: https://www.met.ie/climate/available-data/long-term-data-sets, Accessed [08 December 2023]

Curley, M., Coonan, B., Ruth, C.E. and Ryan, C. (2023) ‘Ireland’s Climate Averages 1991-2020’, Climatological Note No. 22, Met Éireann, Ireland. Available at: https://www.met.ie/climate/30-year-averages, Accessed [08 December 2023]

Noone, S., Murphy, C., Coll, J., Matthews, T., Mullan, D., Wilby, R.L. and Walsh, S. (2016) ‘Homogenization and analysis of an expanded long-term monthly rainfall network for the Island of Ireland (1850–2010)’, International Journal of Climatology, 36(8), pp.2837-2853

Tennekes, M. (2018) ‘tmap: Thematic Maps in R’, Journal of Statistical Software, 84(6), pp.1–39