Main function for importing meteorological data
1 2 3 4 5 6 7 8
The identifying code as a character string. The code is a
combination of the USAF and the WBAN unique identifiers. The codes are
separated by a “-” e.g.
The year to import. This can be a vector of years e.g.
Should hourly means be calculated? The default is
Number of cores to use for parallel processing. Default is 1 and hence no parallelism.
If FALSE, print missing sites / years to the screen.
If a file path is provided, the data are saved as an rds file at
the chosen location e.g.
This is the main function to import data from the NOAA Integrated Surface Database (ISD). The ISD contains detailed surface meteorological data from around the world for over 30,000 locations. For general information of the ISD see https://www.ncdc.noaa.gov/isd and the map here https://gis.ncdc.noaa.gov/maps/ncei.
Note the following units for the main variables:
Date/time in POSIXct format. Note the time zone is GMT (UTC) and may need to be adjusted to merge with other local data. See details below.
Latitude in decimal degrees (-90 to 90).
Longitude in decimal degrees (-180 to 180). Negative numbers are west of the Greenwich Meridian.
Elevention of site in metres.
Wind direction in degrees. 90 is from the east.
Wind speed in m/s.
The height above ground level (AGL) of the lowest cloud or obscuring phenomena layer aloft with 5/8 or more summation total sky cover, which may be predominantly opaque, or the vertical visibility into a surface-based obstruction.
The visibility in metres.
Air temperature in degrees Celcius.
The dew point temperature in degrees Celcius.
The sea level pressure in millibars.
The relative humidity (%).
Cloud cover for different layers in Oktas (1-8).
Maximum of cl_1 to cl_3 cloud cover in Oktas (1-8).
Height of the cloud base for each later in metres.
12-hour precipitation in mm. The sum of this column should give the annual precipitation.
6-hour precipitation in mm.
This calue of precipitation spreads the 12-hour total across the previous 12 hours.
The description of the present weather description (if available).
The data are returned in GMT (UTC). It may be necessary to adjust the time
zone when combining with other data. For example, if air quality data were
available for Beijing with time zone set to "Etc/GMT-8" (note the negative
offset even though Beijing is ahead of GMT. See the
and manual for more details), then the time zone of the met data can be
changed to be the same. One way of doing this would be
"tzone") <- "Etc/GMT-8" for a meteorological data frame called
The two data sets could then be merged based on
Returns a data frame of surface observations. The data frame is
consistent for use with the
openair package. NOTE! the data are
returned in GMT (UTC) time zone format. Users may wish to express the data
in other time zones e.g. to merge with air pollution data. The
lubridate package is useful in this respect.
getMeta to obtain the codes based on various site
1 2 3 4 5
## Not run: ## use Beijing airport code (see getMeta example) dat <- importNOAA(code = "545110-99999", year = 2010:2011) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.