Skip to main content

4  Access meteorological data

4.1 The worldmet package

The data imported using importUKAQ() (Chapter 3) include basic modelled hourly meteorological data (wind speed, wind direction and surface temperature). These data are derived from the WRF model that WSP runs to provide the data.

Alternatively it may be advantageous to use surface measurements. worldmet provides an easy way in which to access surface meteorological data from >30,000 sites across the world. The package accesses the NOAA webservers to download hourly data. See https://github.com/openair-project/worldmet and https://www.ncei.noaa.gov/products/global-historical-climatology-network-hourly for further information.

Access to surface meteorological data is very useful in general but is especially useful when using openair and functions such as polarPlot(). To install the package, type:

install.packages("worldmet")

To learn which monitoring stations are available, the import_ghcn_stations() function is provided. By default, this function returns all data as a data.frame, but can usefully also return it as a map using return = "map". As an example, we will search for sites near Dublin (latitude = 53.3, longitude = -6.3).

import_ghcn_stations(lat = 53.3, lng = -6.3, return = "map")
Figure 4.1: Map of returned area of interest. The user can interactively select a site of interest and find its code to import data.

It is also possible to map all available stations at once, and then use the map to find a site of interest and its code.

import_ghcn_stations(return = "map")

We can use the map that is produced to select a site of interest and import the data. For example, to import data for Dublin Airport and look at some of the data:

dublin_met <- import_ghcn_hourly("EII0000EIDW", year = 2019)

# first few lines of data
dublin_met
# A tibble: 8,760 × 38
   station_id  station_name date                  lat   lng  elev    wd    ws
   <fct>       <fct>        <dttm>              <dbl> <dbl> <dbl> <dbl> <dbl>
 1 EII0000EIDW DUBLIN       2019-01-01 00:00:00  53.4 -6.27  73.8  250   5.05
 2 EII0000EIDW DUBLIN       2019-01-01 01:00:00  53.4 -6.27  73.8  245.  4.8 
 3 EII0000EIDW DUBLIN       2019-01-01 02:00:00  53.4 -6.27  73.8  250   4.05
 4 EII0000EIDW DUBLIN       2019-01-01 03:00:00  53.4 -6.27  73.8  250   4.55
 5 EII0000EIDW DUBLIN       2019-01-01 04:00:00  53.4 -6.27  73.8  255.  5.35
 6 EII0000EIDW DUBLIN       2019-01-01 05:00:00  53.4 -6.27  73.8  260   5.05
 7 EII0000EIDW DUBLIN       2019-01-01 06:00:00  53.4 -6.27  73.8  260   4.8 
 8 EII0000EIDW DUBLIN       2019-01-01 07:00:00  53.4 -6.27  73.8  256.  4.55
 9 EII0000EIDW DUBLIN       2019-01-01 08:00:00  53.4 -6.27  73.8  270   5.05
10 EII0000EIDW DUBLIN       2019-01-01 09:00:00  53.4 -6.27  73.8  265.  4.8 
# ℹ 8,750 more rows
# ℹ 30 more variables: air_temp <dbl>, atmos_pres <dbl>, visibility <dbl>,
#   dew_point <dbl>, rh <dbl>, cl <dbl>, cl_baseht <dbl>,
#   cl_layer_1_okta <dbl>, cl_layer_2_okta <dbl>, cl_layer_3_okta <dbl>,
#   cl_layer_4_okta <lgl>, cl_layer_baseht_1 <dbl>, cl_layer_baseht_2 <dbl>,
#   cl_layer_baseht_3 <dbl>, cl_layer_baseht_4 <lgl>,
#   cl_summation_baseht_1 <lgl>, cl_summation_baseht_2 <lgl>, …

Plot a wind rose.

windRose(dublin_met)
Figure 4.2: Example wind rose for Dublin Airport data.