GSODR

Adam H Sparks

Introduction

The GSOD or Global Surface Summary of the Day (GSOD) data provided by the US National Centers for Environmental Information (NCEI) are a valuable source of weather data with global coverage. However, the data files are cumbersome and difficult to work with. GSODR aims to make it easy to find, transfer and format the data you need for use in analysis and provides four main functions for facilitating this:

When reformatting data either with get_GSOD() or reformat_GSOD(), all units are converted from United States Customary System (USCS) to International System of Units (SI), e.g., inches to millimetres and Fahrenheit to Celsius. Data in the R session summarise each year by station, which also includes vapour pressure and relative humidity elements calculated from existing data in GSOD.

For more information see the description of the data provided by NCEI, http://www7.ncdc.noaa.gov/CDO/GSOD_DESC.txt.

Using get_GSOD()

Find Stations in or near Toowoomba, Queensland, Australia

GSODR provides lists of weather station locations and elevation values. It’s easy to find all stations in Australia.

library("GSODR")

load(system.file("extdata", "isd_history.rda", package = "GSODR"))

# create data.frame for Australia only
Oz <- subset(isd_history, COUNTRY_NAME == "AUSTRALIA")

Oz
##              STNID                         NAME    LAT   LON CTRY
##    1: 695023-99999          HORN ISLAND   (HID) -10.58 142.3   AS
##    2: 749430-99999           AIDELAIDE RIVER SE -13.30 131.1   AS
##    3: 749432-99999    BATCHELOR FIELD AUSTRALIA -13.05 131.1   AS
##    4: 749438-99999         IRON RANGE AUSTRALIA -12.70 143.3   AS
##    5: 749439-99999     MAREEBA AS/HOEVETT FIELD -17.05 145.4   AS
##   ---                                                            
## 1038: 959890-99999      BICHENO (COUNCIL DEPOT) -41.87 148.3   AS
## 1039: 959950-99999 LORD HOWE ISLAND WINDY POINT -31.53 159.1   AS
## 1040: 959970-99999    HEARD ISLAND (ATLAS COVE) -53.02  73.4   AS
## 1041: 996600-99999          ENVIRONM BUOY 55011 -40.80 144.3   AS
## 1042: 999999-82101               NORTHWEST CAPE -22.33 114.0   AS
##       STATE    BEGIN      END COUNTRY_NAME ISO2C ISO3C
##    1:       19420804 20030816    AUSTRALIA    AU   AUS
##    2:       19430228 19440821    AUSTRALIA    AU   AUS
##    3:       19421231 19430610    AUSTRALIA    AU   AUS
##    4:       19420917 19440930    AUSTRALIA    AU   AUS
##    5:       19420630 19440630    AUSTRALIA    AU   AUS
##   ---                                                 
## 1038:       19650101 20200606    AUSTRALIA    AU   AUS
## 1039:       20120920 20200607    AUSTRALIA    AU   AUS
## 1040:       19980301 20121220    AUSTRALIA    AU   AUS
## 1041:       19930221 19970403    AUSTRALIA    AU   AUS
## 1042:       19680305 19680430    AUSTRALIA    AU   AUS
# Look for a specific town in Australia
subset(Oz, grepl("TOOWOOMBA", NAME))
##           STNID              NAME    LAT   LON CTRY STATE    BEGIN
## 1: 945510-99999         TOOWOOMBA -27.58 151.9   AS       19561231
## 2: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS       19980301
##         END COUNTRY_NAME ISO2C ISO3C
## 1: 20120503    AUSTRALIA    AU   AUS
## 2: 20200607    AUSTRALIA    AU   AUS

Download a Single Station and Year Using get_GSOD()

Now that we’ve seen where the reporting stations are located, we can download weather data from the station Toowoomba, Queensland, Australia for 2010 by using the STNID in the station parameter of get_GSOD().

tbar <- get_GSOD(years = 2010, station = "955510-99999")
str(tbar)
## Classes 'data.table' and 'data.frame':   365 obs. of  44 variables:
##  $ STNID           : chr  "955510-99999" "955510-99999" "955510-99999" "955510-99999" ...
##  $ NAME            : chr  "TOOWOOMBA AIRPORT" "TOOWOOMBA AIRPORT" "TOOWOOMBA AIRPORT" "TOOWOOMBA AIRPORT" ...
##  $ CTRY            : chr  "AS" "AS" "AS" "AS" ...
##  $ STATE           : chr  "" "" "" "" ...
##  $ LATITUDE        : num  -27.6 -27.6 -27.6 -27.6 -27.6 ...
##  $ LONGITUDE       : num  152 152 152 152 152 ...
##  $ ELEVATION       : num  642 642 642 642 642 642 642 642 642 642 ...
##  $ BEGIN           : int  19980301 19980301 19980301 19980301 19980301 19980301 19980301 19980301 19980301 19980301 ...
##  $ END             : int  20200607 20200607 20200607 20200607 20200607 20200607 20200607 20200607 20200607 20200607 ...
##  $ YEARMODA        : Date, format: "2010-01-01" ...
##  $ YEAR            : int  2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 ...
##  $ MONTH           : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ DAY             : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ YDAY            : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ TEMP            : num  21.2 23.2 21.4 18.9 20.5 21.9 21.3 20.9 21.9 22.3 ...
##  $ TEMP_ATTRIBUTES : chr  " 8" " 8" " 8" " 8" ...
##  $ DEWP            : num  17.9 19.4 18.9 16.4 16.4 18.7 17.4 17.1 16.2 14.9 ...
##  $ DEWP_ATTRIBUTES : chr  " 8" " 8" " 8" " 8" ...
##  $ SLP             : num  1013 1010 1012 1016 1016 ...
##  $ SLP_ATTRIBUTES  : chr  " 8" " 8" " 8" " 8" ...
##  $ STP             : num  942 939 941 944 944 ...
##  $ STP_ATTRIBUTES  : chr  " 8" " 8" " 8" " 8" ...
##  $ VISIB           : num  NA NA 14.3 23.3 NA NA NA NA NA NA ...
##  $ VISIB_ATTRIBUTES: chr  " 0" " 0" " 6" " 4" ...
##  $ WDSP            : num  4.3 3.7 7.6 8.7 7.5 6.3 7.8 7.5 6.8 6.3 ...
##  $ WDSP_ATTRIBUTES : chr  " 8" " 8" " 8" " 8" ...
##  $ MXSPD           : num  6.7 5.1 10.3 10.3 10.8 7.7 8.7 8.7 8.2 7.2 ...
##  $ GUST            : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ MAX             : num  25.8 26.5 28.7 24.1 24.6 26.8 26.1 26.5 27.4 28.7 ...
##  $ MAX_ATTRIBUTES  : chr  NA NA NA NA ...
##  $ MIN             : num  17.8 19.1 19.3 16.9 16.7 17.5 19.1 18.5 17.8 17.7 ...
##  $ MIN_ATTRIBUTES  : chr  NA NA "*" "*" ...
##  $ PRCP            : num  1.5 0.3 19.8 1 0.3 0 0.3 2.5 0 0 ...
##  $ PRCP_ATTRIBUTES : chr  "G" "G" "G" "G" ...
##  $ SNDP            : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_FOG           : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_RAIN_DRIZZLE  : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_SNOW_ICE      : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_HAIL          : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_THUNDER       : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_TORNADO_FUNNEL: int  NA NA NA NA NA NA NA NA NA NA ...
##  $ EA              : num  2 2.2 2.2 1.9 1.9 2.2 2 1.9 1.8 1.7 ...
##  $ ES              : num  2.5 2.8 2.5 2.2 2.4 2.6 2.5 2.5 2.6 2.7 ...
##  $ RH              : num  81.5 79.2 85.7 85.4 77.3 82.1 78.5 78.9 70.1 62.9 ...
##  - attr(*, ".internal.selfref")=<externalptr>

Using nearest_stations() to Download Multiple Stations at Once

Using the nearest_stations() function, you can find stations closest to a given point specified by latitude and longitude in decimal degrees. This can be used to generate a vector to pass along to get_GSOD() and download the stations of interest.

tbar_stations <- nearest_stations(LAT = -27.5598,
                                  LON = 151.9507,
                                  distance = 50)

tbar <- get_GSOD(years = 2010, station = tbar_stations)
str(tbar)
## Classes 'data.table' and 'data.frame':   1095 obs. of  44 variables:
##  $ STNID           : chr  "945520-99999" "945520-99999" "945520-99999" "945520-99999" ...
##  $ NAME            : chr  "OAKEY" "OAKEY" "OAKEY" "OAKEY" ...
##  $ CTRY            : chr  "AS" "AS" "AS" "AS" ...
##  $ STATE           : chr  "" "" "" "" ...
##  $ LATITUDE        : num  -27.4 -27.4 -27.4 -27.4 -27.4 ...
##  $ LONGITUDE       : num  152 152 152 152 152 ...
##  $ ELEVATION       : num  407 407 407 407 407 ...
##  $ BEGIN           : int  19730430 19730430 19730430 19730430 19730430 19730430 19730430 19730430 19730430 19730430 ...
##  $ END             : int  20200607 20200607 20200607 20200607 20200607 20200607 20200607 20200607 20200607 20200607 ...
##  $ YEARMODA        : Date, format: "2010-01-01" ...
##  $ YEAR            : int  2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 ...
##  $ MONTH           : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ DAY             : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ YDAY            : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ TEMP            : num  23.4 26.2 24.5 21.6 22.6 24.7 24 23.3 24.4 25.1 ...
##  $ TEMP_ATTRIBUTES : chr  "16" "16" "16" "16" ...
##  $ DEWP            : num  18.4 19.4 19.4 16.8 16.9 18.7 17.1 17.1 15.7 13.6 ...
##  $ DEWP_ATTRIBUTES : chr  "16" "16" "16" "16" ...
##  $ SLP             : num  1012 1009 1011 1015 1015 ...
##  $ SLP_ATTRIBUTES  : chr  "16" "16" "16" "16" ...
##  $ STP             : num  967 964 966 969 969 ...
##  $ STP_ATTRIBUTES  : chr  "16" "16" "16" "16" ...
##  $ VISIB           : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ VISIB_ATTRIBUTES: chr  " 0" " 0" " 0" " 0" ...
##  $ WDSP            : num  4.3 4.1 6.1 7.5 4.4 4.3 5.8 6.2 5.6 4.5 ...
##  $ WDSP_ATTRIBUTES : chr  "16" "16" "16" "16" ...
##  $ MXSPD           : num  7.2 6.2 8.7 9.8 7.7 6.2 8.2 9.3 7.7 7.2 ...
##  $ GUST            : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ MAX             : num  28.5 31.2 33.6 27.1 27.8 30.4 30 30.5 31.9 33.2 ...
##  $ MAX_ATTRIBUTES  : chr  NA NA NA NA ...
##  $ MIN             : num  19.5 20.5 21.3 18.8 18.4 18.6 20.6 18.6 17.2 16.2 ...
##  $ MIN_ATTRIBUTES  : chr  NA NA "*" "*" ...
##  $ PRCP            : num  0.5 0 3.3 0 0 0 0 0.3 0 0 ...
##  $ PRCP_ATTRIBUTES : chr  "G" "G" "G" "G" ...
##  $ SNDP            : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_FOG           : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_RAIN_DRIZZLE  : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_SNOW_ICE      : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_HAIL          : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_THUNDER       : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_TORNADO_FUNNEL: int  NA NA NA NA NA NA NA NA NA NA ...
##  $ EA              : num  2.1 2.2 2.2 1.9 1.9 2.2 1.9 1.9 1.8 1.6 ...
##  $ ES              : num  2.9 3.4 3.1 2.6 2.7 3.1 3 2.9 3.1 3.2 ...
##  $ RH              : num  73.5 66.2 73.3 74.2 70.2 69.3 65.3 68.2 58.4 48.9 ...
##  - attr(*, ".internal.selfref")=<externalptr>

Plot Maximum and Minimum Temperature Values

Using the first data downloaded for a single station, 955510-99999, plot the temperature for 2010.

library("ggplot2")
library("tidyr")

# Create a dataframe of just the date and temperature values that we want to
# plot
tbar_temps <- tbar[, c("YEARMODA", "TEMP", "MAX", "MIN")]

# Gather the data from wide to long
tbar_temps <-
  pivot_longer(tbar_temps, cols = TEMP:MIN, names_to = "Measurement")

ggplot(data = tbar_temps, aes(x = YEARMODA,
                              y = value,
                              colour = Measurement)) +
  geom_line() +
  scale_color_brewer(type = "qual", na.value = "black") +
  scale_y_continuous(name = "Temperature") +
  scale_x_date(name = "Date") +
  ggtitle(label = "Max, min and mean temperatures for Toowoomba, Qld, AU",
          subtitle = "Data: U.S. NCEI GSOD") +
  theme_classic()

plot of chunk Ex5

Download and Process Files in Parallel

GSODR supports the future package for parallel processing on varied platforms with the user determining the parallel back end to be used. The most simple way is to use multisession as an argument for future::plan(), which will default to available local cores as workers for the run. This can greatly reduce the time necessary to process GSOD files.

future::plan("multisession")
global <- get_GSOD(years = 2010:2011)

str(global)
## Classes 'data.table' and 'data.frame':   11193950 obs. of  44 variables:
##  $ STNID           : chr  "008260-99999" "008260-99999" "008260-99999" "008260-99999" ...
##  $ NAME            : chr  NA NA NA NA ...
##  $ CTRY            : chr  NA NA NA NA ...
##  $ STATE           : chr  NA NA NA NA ...
##  $ LATITUDE        : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ LONGITUDE       : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ ELEVATION       : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ BEGIN           : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ END             : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ YEARMODA        : Date, format: "2010-01-01" ...
##  $ YEAR            : int  2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 ...
##  $ MONTH           : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ DAY             : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ YDAY            : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ TEMP            : num  0.6 -0.4 -1.9 -2.4 -3.1 -1.2 2.4 -3.2 -5.6 -7.2 ...
##  $ TEMP_ATTRIBUTES : chr  "24" "24" "23" "24" ...
##  $ DEWP            : num  -0.4 -1.1 -4.5 -6.3 -7.8 -6.7 -5.3 -5.9 -11.3 -15.2 ...
##  $ DEWP_ATTRIBUTES : chr  "24" "24" "22" "24" ...
##  $ SLP             : num  NA NA 1021 NA NA ...
##  $ SLP_ATTRIBUTES  : chr  " 0" " 0" " 5" " 0" ...
##  $ STP             : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ STP_ATTRIBUTES  : chr  " 0" " 0" " 0" " 0" ...
##  $ VISIB           : num  11.4 6.1 5.6 15.4 15.1 14.6 10.6 13.7 15.6 16.1 ...
##  $ VISIB_ATTRIBUTES: chr  "24" "24" "23" "24" ...
##  $ WDSP            : num  2.6 4 7.8 6.2 2.4 4.3 4.4 2.6 4.1 2.3 ...
##  $ WDSP_ATTRIBUTES : chr  "24" "24" "23" "24" ...
##  $ MXSPD           : num  6.7 7.7 13.4 9.3 4.6 7.2 11.3 8.2 6.7 5.1 ...
##  $ GUST            : num  10.8 11.3 19.5 14.4 NA 9.3 17 10.8 8.7 7.2 ...
##  $ MAX             : num  4.4 6 12 0 5 10.6 9 0 -3 4 ...
##  $ MAX_ATTRIBUTES  : chr  NA "*" "*" "*" ...
##  $ MIN             : num  -7 -7 -9 -10 -9 -11.7 -6 -9.4 -14 -13 ...
##  $ MIN_ATTRIBUTES  : chr  "*" "*" "*" "*" ...
##  $ PRCP            : num  2.3 0.3 0 0.3 0 NA 1.3 0 0.3 0.3 ...
##  $ PRCP_ATTRIBUTES : chr  "G" "G" "G" "G" ...
##  $ SNDP            : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_FOG           : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ I_RAIN_DRIZZLE  : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_SNOW_ICE      : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_HAIL          : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_THUNDER       : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ I_TORNADO_FUNNEL: int  NA NA NA NA NA NA NA NA NA NA ...
##  $ EA              : num  0.6 0.6 0.4 0.4 0.3 0.4 0.4 0.4 0.3 0.2 ...
##  $ ES              : num  0.6 0.6 0.5 0.5 0.5 0.6 0.7 0.5 0.4 0.4 ...
##  $ RH              : num  93 95 82.4 74.6 70 66.2 56.8 81.6 64.2 52.8 ...
##  - attr(*, ".internal.selfref")=<externalptr>

Using reformat_GSOD()

You may have already downloaded GSOD data or may just wish to use your browser to download the files from the server to you local disk and not use the capabilities of get_GSOD(). In that case the reformat_GSOD() function is useful.

There are two ways, you can either provide reformat_GSOD() with a list of specified station files or you can supply it with a directory containing all of the “STATION.csv” station files or “YEAR.zip” annual files that you wish to reformat.

Note Any .csv file provided to reformat_GSOD() will be imported, if it is not a GSOD data file, this will lead to an error. Make sure the directory and file lists are clean.

Reformat a List of Local Files

In this example two STATION.csv files are in subdirectories of user’s home directory and are listed for reformatting as a string.

y <- c("~/GSOD/gsod_1960/20049099999.csv",
       "~/GSOD/gsod_1961/20049099999.csv")
x <- reformat_GSOD(file_list = y)

Reformat all Local Files Found in Directory

In this example all STATION.csv files in the sub-folder GSOD/gsod_1960 will be imported and reformatted.

x <- reformat_GSOD(dsn = "~/GSOD/gsod_1960")

Using update_station_list()

GSODR uses internal databases of station data from the NCEI to provide location and other metadata, e.g. elevation, station names, WMO codes, etc. to make the process of querying for weather data faster. This database is created and packaged with GSODR for distribution and is updated with new releases. Users have the option of updating these databases after installing GSODR. While this option gives the users the ability to keep the database up-to-date and gives GSODR’s authors flexibility in maintaining it, this also means that reproducibility may be affected since the same version of GSODR may have different databases on different machines. If reproducibility is necessary, care should be taken to ensure that the version of the databases is the same across different machines.

The database file isd_history.rda can be located on your local system by using the following command, paste0(.libPaths(), "/GSODR/extdata")[1], unless you have specified another location for library installations and installed GSODR there, in which case it would still be in GSODR/extdata.

To update GSODR’s internal database of station locations simply use update_station_list(), which will update the internal station database according to the latest data available from the NCEI.

update_station_list()

Using get_inventory()

GSODR provides a function, get_inventory() to retrieve an inventory of the number of weather observations by station-year-month for the beginning of record through to current.

Following is an example of how to retrieve the inventory and check a station in Toowoomba, Queensland, Australia, which was used in an earlier example.

inventory <- get_inventory()

inventory
##   *** FEDERAL CLIMATE COMPLEX INTEGRATED SURFACE DATA INVENTORY ***  
##    This inventory provides the number of weather observations by  
##    STATION-YEAR-MONTH for beginning of record through June 2020   
##                STNID NAME LAT LON CTRY STATE BEGIN END
##      1: 007018-99999 <NA>  NA  NA <NA>  <NA>    NA  NA
##      2: 007018-99999 <NA>  NA  NA <NA>  <NA>    NA  NA
##      3: 007026-99999 <NA>  NA  NA <NA>  <NA>    NA  NA
##      4: 007026-99999 <NA>  NA  NA <NA>  <NA>    NA  NA
##      5: 007026-99999 <NA>  NA  NA <NA>  <NA>    NA  NA
##     ---                                               
## 643185:   A51256-451 <NA>  NA  NA <NA>  <NA>    NA  NA
## 643186:   A51256-451 <NA>  NA  NA <NA>  <NA>    NA  NA
## 643187:   A51256-451 <NA>  NA  NA <NA>  <NA>    NA  NA
## 643188:   A51256-451 <NA>  NA  NA <NA>  <NA>    NA  NA
## 643189:   A51256-451 <NA>  NA  NA <NA>  <NA>    NA  NA
##         COUNTRY_NAME ISO2C ISO3C YEAR  JAN  FEB  MAR  APR  MAY
##      1:         <NA>  <NA>  <NA> 2011    0    0 2104 2797 2543
##      2:         <NA>  <NA>  <NA> 2013    0    0    0    0    0
##      3:         <NA>  <NA>  <NA> 2012    0    0    0    0    0
##      4:         <NA>  <NA>  <NA> 2014    0    0    0    0    0
##      5:         <NA>  <NA>  <NA> 2016    0    0    0    0    0
##     ---                                                       
## 643185:         <NA>  <NA>  <NA> 2016 2185 2047 2175 2131 2213
## 643186:         <NA>  <NA>  <NA> 2017 2192 1883 2204 1910 2145
## 643187:         <NA>  <NA>  <NA> 2018 2192 1887 2194 2113 2151
## 643188:         <NA>  <NA>  <NA> 2019 2188 2000 2143 2105 2187
## 643189:         <NA>  <NA>  <NA> 2020 2162 1437 2144 2125 2199
##          JUN  JUL  AUG  SEP  OCT  NOV  DEC
##      1: 2614  382    0    0    0    0    0
##      2:    0  710    0    0    0    0    0
##      3:    0  367    0    0    0    0    7
##      4:    0  180    0    4    0  552    0
##      5:  794    0    0    0    0    0    0
##     ---                                   
## 643185: 2139 2209 2216 2131 2196 2131 1665
## 643186: 2113 2218 2204 2082 2192 2103 2174
## 643187: 2095 2202 2197 1816 2195 2063 2178
## 643188: 2124 2184 2138 2077 1872 1508 2159
## 643189:  556    0    0    0    0    0    0
subset(inventory, STNID %in% "955510-99999")
##   *** FEDERAL CLIMATE COMPLEX INTEGRATED SURFACE DATA INVENTORY ***  
##    This inventory provides the number of weather observations by  
##    STATION-YEAR-MONTH for beginning of record through June 2020   
##            STNID              NAME    LAT   LON CTRY STATE
##  1: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
##  2: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
##  3: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
##  4: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
##  5: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
##  6: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
##  7: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
##  8: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
##  9: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 10: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 11: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 12: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 13: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 14: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 15: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 16: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 17: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 18: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 19: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 20: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 21: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 22: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
## 23: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.9   AS      
##            STNID              NAME    LAT   LON CTRY STATE
##        BEGIN      END COUNTRY_NAME ISO2C ISO3C YEAR JAN FEB MAR
##  1: 19980301 20200607    AUSTRALIA    AU   AUS 1998   0   0 222
##  2: 19980301 20200607    AUSTRALIA    AU   AUS 1999 213 201 235
##  3: 19980301 20200607    AUSTRALIA    AU   AUS 2000 241 227 247
##  4: 19980301 20200607    AUSTRALIA    AU   AUS 2001 245 223 246
##  5: 19980301 20200607    AUSTRALIA    AU   AUS 2002 245 219 246
##  6: 19980301 20200607    AUSTRALIA    AU   AUS 2003 244 217 220
##  7: 19980301 20200607    AUSTRALIA    AU   AUS 2004 240 227 241
##  8: 19980301 20200607    AUSTRALIA    AU   AUS 2005 241 221 242
##  9: 19980301 20200607    AUSTRALIA    AU   AUS 2006 245 223 246
## 10: 19980301 20200607    AUSTRALIA    AU   AUS 2007 247 222 244
## 11: 19980301 20200607    AUSTRALIA    AU   AUS 2008 247 228 248
## 12: 19980301 20200607    AUSTRALIA    AU   AUS 2009 245 222 246
## 13: 19980301 20200607    AUSTRALIA    AU   AUS 2010 248 223 248
## 14: 19980301 20200607    AUSTRALIA    AU   AUS 2011 247 224 247
## 15: 19980301 20200607    AUSTRALIA    AU   AUS 2012 248 232 248
## 16: 19980301 20200607    AUSTRALIA    AU   AUS 2013 236 220 247
## 17: 19980301 20200607    AUSTRALIA    AU   AUS 2014 243 224 247
## 18: 19980301 20200607    AUSTRALIA    AU   AUS 2015 248 222 248
## 19: 19980301 20200607    AUSTRALIA    AU   AUS 2016 246 228 245
## 20: 19980301 20200607    AUSTRALIA    AU   AUS 2017 247 224 248
## 21: 19980301 20200607    AUSTRALIA    AU   AUS 2018 248 224 248
## 22: 19980301 20200607    AUSTRALIA    AU   AUS 2019 247 224 245
## 23: 19980301 20200607    AUSTRALIA    AU   AUS 2020 246 232 248
##        BEGIN      END COUNTRY_NAME ISO2C ISO3C YEAR JAN FEB MAR
##     APR MAY JUN JUL AUG SEP OCT NOV DEC
##  1: 223 221 211 226 217 222 234 215 230
##  2: 224 244 229 239 247 236 246 233 243
##  3: 238 246 237 245 240 236 248 239 248
##  4: 238 239 236 243 240 237 236 235 246
##  5: 236 243 229 243 246 227 238 233 246
##  6: 232 235 233 246 242 218 239 225 245
##  7: 229 233 224 235 244 235 244 235 245
##  8: 240 247 239 247 247 234 242 239 246
##  9: 232 241 238 247 247 239 247 240 247
## 10: 240 248 240 244 244 239 247 237 246
## 11: 239 248 239 248 247 239 247 238 248
## 12: 235 244 237 248 248 239 248 239 248
## 13: 240 244 240 242 247 240 248 240 247
## 14: 240 247 240 248 247 239 248 239 248
## 15: 240 248 240 248 247 240 248 240 245
## 16: 233 248 239 252 247 238 248 239 246
## 17: 240 246 239 246 247 240 247 240 248
## 18:  72 247 240 247 248 239 247 238 247
## 19: 240 246 240 248 248 238 248 239 248
## 20: 240 248 239 248 247 239 248 240 248
## 21: 239 247 240 246 247 218 244 190 248
## 22: 240 245 240 248 247 240 248 237 248
## 23: 238 248  70   0   0   0   0   0   0
##     APR MAY JUN JUL AUG SEP OCT NOV DEC

Additional Climate Data Availability

Additional climate data, GSODRdata, formatted for use with GSOD data provided by GSODR are available as an R package, which can only be installed through GitHub due to the package size, >5Mb, being too large for CRAN.

if (!require(remotes)) {
  install.packages(
    "devtools",
    repos = c(CRAN = "https://cloud.r-project.org/")
  )
  library("remotes")
}
remotes::install_github("adamhsparks/GSODRdata")
library("GSODRdata")

Notes

WMO Resolution 40. NOAA Policy

Users of these data should take into account the following (from the NCEI website):

“The following data and products may have conditions placed on their international commercial use. They can be used within the U.S. or for non-commercial international activities without restriction. The non-U.S. data cannot be redistributed for commercial purposes. Re-distribution of these data by others must provide this same notification.” WMO Resolution 40. NOAA Policy

Appendices

Appendix 1: GSODR Final Data Format, Contents and Units

GSODR formatted data include the following fields and units:

Appendix 2: Map of Current GSOD Station Locations

plot of chunk unnamed-chunk-1

References

Alduchov, Oleg A., and Robert E. Eskridge. 1996. “Improved Magnus Form Approximation of Saturation Vapor Pressure.” Journal of Applied Meteorology 35 (4): 601–9. https://doi.org/10.1175/1520-0450(1996)035<0601:IMFAOS>2.0.CO;2.