Contributors: Chenrui Yang (Flanders Marine Insitute) & Javier Burgoa (Flanders Marine Institute) Source data: Data were made available by EMODnet Physics, in collaboration with Copernicus Marine Service (CMEMS) and EuroGOOS ROOSs INSTAC where data originator and data center is: Agency for Maritime Services and Coast Department Coast (MDK) for wind data Westhinder station. Institute: LifeWatch (www.lifewatch.be)

This following code makes use of EMODnet’s available data on wind speed and direction. The windrose plot that this script produces shows in an intuitive way the most frequent wind directions and wind average speeds. Data from only one station at a time should be plotted.

1. Load the dataset

Load packages

library(openair)

Read in the data files that can be downloaded at http://www.emodnet-physics.eu/Map/ (For further instructions please go back to the “BPNS wind and sea state data products” within LifeWatch’s webpage)

filenames <- list.files(path = "Folder_containing_CSVs/", pattern = ".csv$")
filepaths <- paste0("Folder_containing_CSVs/", filepaths)

data <- lapply(filepaths, FUN = read.table, header = TRUE, sep = ';', comment.char = "#")
## Combine all datasets into one
data <- Reduce(function(data1, data2){rbind(data1, data2)}, data)
## Make desired variables numeric
data$WSPD <- as.numeric(data$WSPD)
data$WDIR <- as.numeric(data$WDIR)

2. Plot the wind data

This windrose plot has been manually adjusted to the Beaufort scale by means of the argument “breaks”. In case that any other scale is desired, please modify the values of that argument. For further information on how to customize the windrose plot, please refer to the ‘openair’ package vignette in https://davidcarslaw.com/files/openairmanual.pdf

windRose(
  data, 
  ws ="WSPD", wd ="WDIR", # here wind speed and direction
  auto.text=FALSE, 
  breaks=c(0,0.3,1.5,3.3,5.5,7.9,10.7,13.8,17.1,20.7,24.4),
  offset =0.2,
  normalise =FALSE,
  paddle =F, 
  annotate =TRUE, 
  seg =0.8,
  key =list(labels =c("0-0.3                       calm","0.3-1.5                light air","1.6-3.3          light breeze","3.4-5.4       gentle breeze","5.5-7.9  moderate breeze","8-10.7         fresh breeze","10.8-13.8   strong breeze","13.9-17.1          high wind","17.2-20.7                   gale","20.7-24.4        strong gale")), # Beafort scale legend
  key.position ="left",
  key.footer = "",
  key.header ="Average wind speed (m/s)",
  border =FALSE, 
  fill =TRUE,
  angle =45, 
  angle.scale =45, 
  grid.line =5
)