knitr::opts_chunk$set(
  collapse = TRUE,
  warning = FALSE,
  message = FALSE,
  eval = FALSE,
  comment = "#>",
  fig.path = "man/figures/README-"
)

worldmet - R package for accessing NOAA Integrated Surface Database (ISD) meteorological observations

R-CMD-check

worldmet provides an easy way to access data from the NOAA Integrated Surface Database (ISD). The ISD contains detailed surface meteorological data from around the world for over 35,000 locations. See also the map.

The package outputs (typically hourly meteorological data) work very well with the openair package.

Installation

Installation can be done in the normal way:

install.packages("worldmet")

The development version can be installed from GitHub. Installation of worldmet from GitHub is easy using the devtools package.

# install.packages("devtools")
devtools::install_github("davidcarslaw/worldmet")

Example

To search for meteorological sites the user can search by the name or partial name of the site in upper or lower case. The getMeta() function will return all site names that match the search string. The most important information returned is the code, which can then be supplied to the importNOAA() function that downloads the data.

For example, to search for site "heathrow":

library(worldmet)
## user getMeta function to search for sites
## note code to be used in importNOAA

getMeta(site = "heathrow")

Often we have a latitude / longitude of interest. A search can be made based on supplied decimal coordinates and the top n nearest sites are returned. The map shows the location searched by the user (red dot) and markers showing the nearest meteorological stations. Click on a station marker to obtain the code and other basic information.

## search for near a specified lat/lon - near Beijing airport
## returns 'n' nearest by default
info <- getMeta(lat = 40, lon = 116.9)
info

map of Beijing area

To obtain the data the user must supply a code (see above) and year or years of interest. For example, to download data for Heathrow Airport in 2010 (code 037720-99999):

met_london <- importNOAA(code = "037720-99999", year = 2010)
head(met_london)

A wind rose (for example) can easily be plotted using openair:

# load openair
library(openair)
windRose(met_london)

For the main worldmet website, see https://davidcarslaw.github.io/worldmet/.



davidcarslaw/worldmet documentation built on Feb. 24, 2023, 12:53 a.m.