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.583 142.300   AS
##    2: 749430-99999           AIDELAIDE RIVER SE -13.300 131.133   AS
##    3: 749432-99999    BATCHELOR FIELD AUSTRALIA -13.049 131.066   AS
##    4: 749438-99999         IRON RANGE AUSTRALIA -12.700 143.300   AS
##    5: 749439-99999     MAREEBA AS/HOEVETT FIELD -17.050 145.400   AS
##   ---                                                               
## 1038: 959890-99999      BICHENO (COUNCIL DEPOT) -41.867 148.300   AS
## 1039: 959950-99999 LORD HOWE ISLAND WINDY POINT -31.533 159.067   AS
## 1040: 959970-99999    HEARD ISLAND (ATLAS COVE) -53.017  73.400   AS
## 1041: 996600-99999          ENVIRONM BUOY 55011 -40.800 144.300   AS
## 1042: 999999-82101               NORTHWEST CAPE -22.333 114.050   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 20200106    AUSTRALIA    AU   AUS
## 1039:       20120920 20200107    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.583 151.933   AS       19561231
## 2: 955510-99999 TOOWOOMBA AIRPORT -27.550 151.917   AS       19980301
##         END COUNTRY_NAME ISO2C ISO3C
## 1: 20120503    AUSTRALIA    AU   AUS
## 2: 20200107    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().

library(skimr)
tbar <- get_GSOD(years = 2010, station = "955510-99999")
skim(tbar)
Name tbar
Number of rows 365
Number of columns 44
_______________________
Column type frequency:
character 13
Date 1
numeric 30
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
STNID 0 1.00 12 12 0 1 0
NAME 0 1.00 17 17 0 1 0
CTRY 0 1.00 2 2 0 1 0
STATE 0 1.00 0 0 365 1 0
TEMP_ATTRIBUTES 0 1.00 2 2 0 4 365
DEWP_ATTRIBUTES 0 1.00 2 2 0 6 365
SLP_ATTRIBUTES 0 1.00 2 2 0 4 365
STP_ATTRIBUTES 0 1.00 2 2 0 4 365
VISIB_ATTRIBUTES 0 1.00 2 2 0 6 365
WDSP_ATTRIBUTES 0 1.00 2 2 0 4 365
MAX_ATTRIBUTES 351 0.04 1 1 0 1 0
MIN_ATTRIBUTES 212 0.42 1 1 0 1 0
PRCP_ATTRIBUTES 1 1.00 1 1 0 5 0

Variable type: Date

skim_variable n_missing complete_rate min max median n_unique
YEARMODA 0 1 2010-01-01 2010-12-31 2010-07-02 365

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
LATITUDE 0 1.00 -27.55 0.00 -27.55 -27.55 -27.55 -27.55 -27.55 ▁▁▇▁▁
LONGITUDE 0 1.00 151.92 0.00 151.92 151.92 151.92 151.92 151.92 ▁▁▇▁▁
ELEVATION 0 1.00 642.00 0.00 642.00 642.00 642.00 642.00 642.00 ▁▁▇▁▁
BEGIN 0 1.00 19980301.00 0.00 19980301.00 19980301.00 19980301.00 19980301.00 19980301.00 ▁▁▇▁▁
END 0 1.00 20200107.00 0.00 20200107.00 20200107.00 20200107.00 20200107.00 20200107.00 ▁▁▇▁▁
YEAR 0 1.00 2010.00 0.00 2010.00 2010.00 2010.00 2010.00 2010.00 ▁▁▇▁▁
MONTH 0 1.00 6.53 3.45 1.00 4.00 7.00 10.00 12.00 ▇▅▅▅▇
DAY 0 1.00 15.72 8.81 1.00 8.00 16.00 23.00 31.00 ▇▇▇▇▆
YDAY 0 1.00 183.00 105.51 1.00 92.00 183.00 274.00 365.00 ▇▇▇▇▇
TEMP 0 1.00 16.45 4.21 6.20 12.90 17.30 19.50 25.70 ▂▆▇▇▂
DEWP 4 0.99 11.83 4.86 -2.60 8.70 13.10 15.40 20.30 ▁▃▃▇▅
SLP 0 1.00 1017.67 5.09 1003.50 1014.10 1018.00 1021.00 1031.00 ▁▃▇▅▁
STP 0 1.00 944.68 4.19 932.60 942.10 944.90 947.40 955.60 ▁▃▇▆▁
VISIB 264 0.28 14.98 9.14 0.50 7.40 12.60 23.30 36.00 ▇▇▅▆▂
WDSP 0 1.00 5.93 1.97 2.20 4.40 5.70 7.20 15.30 ▆▇▃▁▁
MXSPD 0 1.00 8.29 2.29 3.60 6.70 8.20 9.80 17.00 ▅▇▅▁▁
GUST 365 0.00 NaN NaN NA NA NA NA NA
MAX 0 1.00 21.62 4.65 10.30 17.90 21.90 24.60 35.10 ▂▆▇▃▁
MIN 0 1.00 12.13 4.80 0.10 8.20 13.20 16.40 21.40 ▂▅▅▇▃
PRCP 1 1.00 3.02 9.32 0.00 0.00 0.00 1.00 86.60 ▇▁▁▁▁
SNDP 365 0.00 NaN NaN NA NA NA NA NA
I_FOG 365 0.00 NaN NaN NA NA NA NA NA
I_RAIN_DRIZZLE 365 0.00 NaN NaN NA NA NA NA NA
I_SNOW_ICE 365 0.00 NaN NaN NA NA NA NA NA
I_HAIL 365 0.00 NaN NaN NA NA NA NA NA
I_THUNDER 365 0.00 NaN NaN NA NA NA NA NA
I_TORNADO_FUNNEL 365 0.00 NaN NaN NA NA NA NA NA
EA 4 0.99 1.45 0.42 0.50 1.10 1.50 1.70 2.40 ▃▅▇▇▂
ES 0 1.00 1.93 0.50 0.90 1.50 2.00 2.30 3.30 ▃▇▇▃▁
RH 4 0.99 75.16 12.42 32.00 66.70 76.90 83.30 100.00 ▁▂▅▇▃

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)
skim(tbar)
Name tbar
Number of rows 1095
Number of columns 44
_______________________
Column type frequency:
character 13
Date 1
numeric 30
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
STNID 0 1.00 12 12 0 3 0
NAME 0 1.00 5 31 0 3 0
CTRY 0 1.00 2 2 0 1 0
STATE 0 1.00 0 0 1095 1 0
TEMP_ATTRIBUTES 0 1.00 2 2 0 8 730
DEWP_ATTRIBUTES 0 1.00 2 2 0 10 730
SLP_ATTRIBUTES 0 1.00 2 2 0 9 730
STP_ATTRIBUTES 0 1.00 2 2 0 9 730
VISIB_ATTRIBUTES 0 1.00 2 2 0 6 1095
WDSP_ATTRIBUTES 0 1.00 2 2 0 8 730
MAX_ATTRIBUTES 1052 0.04 1 1 0 1 0
MIN_ATTRIBUTES 634 0.42 1 1 0 1 0
PRCP_ATTRIBUTES 1 1.00 1 1 0 5 0

Variable type: Date

skim_variable n_missing complete_rate min max median n_unique
YEARMODA 0 1 2010-01-01 2010-12-31 2010-07-02 365

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
LATITUDE 0 1.00 -27.50 0.07 -27.55 -27.55 -27.55 -27.41 -27.41 ▇▁▁▁▃
LONGITUDE 0 1.00 152.00 0.25 151.74 151.74 151.92 152.33 152.33 ▇▇▁▁▇
ELEVATION 0 1.00 380.97 224.57 94.00 94.00 406.90 642.00 642.00 ▇▁▇▁▇
BEGIN 0 1.00 19913687.00 131241.93 19730430.00 19730430.00 19980301.00 20030330.00 20030330.00 ▃▁▁▁▇
END 0 1.00 20200107.00 0.00 20200107.00 20200107.00 20200107.00 20200107.00 20200107.00 ▁▁▇▁▁
YEAR 0 1.00 2010.00 0.00 2010.00 2010.00 2010.00 2010.00 2010.00 ▁▁▇▁▁
MONTH 0 1.00 6.53 3.45 1.00 4.00 7.00 10.00 12.00 ▇▅▅▅▇
DAY 0 1.00 15.72 8.80 1.00 8.00 16.00 23.00 31.00 ▇▇▇▇▆
YDAY 0 1.00 183.00 105.41 1.00 92.00 183.00 274.00 365.00 ▇▇▇▇▇
TEMP 0 1.00 17.78 4.74 5.90 14.20 18.20 21.40 28.80 ▂▆▇▇▂
DEWP 4 1.00 12.34 5.12 -3.70 8.95 13.50 16.20 22.40 ▁▂▃▇▃
SLP 365 0.67 1017.38 5.13 1003.00 1013.90 1017.70 1020.70 1031.00 ▁▅▇▅▁
STP 365 0.67 957.40 13.44 932.60 944.90 956.60 970.38 981.90 ▃▇▁▇▃
VISIB 797 0.27 21.42 8.86 0.50 14.60 24.55 29.58 36.00 ▃▃▃▇▇
WDSP 0 1.00 4.47 1.97 0.60 2.95 4.10 5.60 15.30 ▆▇▂▁▁
MXSPD 0 1.00 7.13 2.42 1.50 5.10 6.70 8.70 17.00 ▃▇▅▁▁
GUST 1095 0.00 NaN NaN NA NA NA NA NA
MAX 0 1.00 24.03 5.09 10.30 20.50 24.00 27.50 39.20 ▁▆▇▃▁
MIN 0 1.00 12.13 5.64 -6.00 7.60 13.30 16.70 23.70 ▁▂▅▇▃
PRCP 1 1.00 2.79 8.68 0.00 0.00 0.00 0.50 86.60 ▇▁▁▁▁
SNDP 1095 0.00 NaN NaN NA NA NA NA NA
I_FOG 1095 0.00 NaN NaN NA NA NA NA NA
I_RAIN_DRIZZLE 1095 0.00 NaN NaN NA NA NA NA NA
I_SNOW_ICE 1095 0.00 NaN NaN NA NA NA NA NA
I_HAIL 1095 0.00 NaN NaN NA NA NA NA NA
I_THUNDER 1095 0.00 NaN NaN NA NA NA NA NA
I_TORNADO_FUNNEL 1095 0.00 NaN NaN NA NA NA NA NA
EA 4 1.00 1.50 0.46 0.50 1.10 1.50 1.80 2.70 ▃▅▇▅▁
ES 0 1.00 2.12 0.62 0.90 1.60 2.10 2.50 4.00 ▆▇▇▃▁
RH 4 1.00 71.38 11.86 32.00 64.30 71.40 80.00 100.00 ▁▂▇▆▂

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)

skim(global)
Name global
Number of rows 7174677
Number of columns 44
_______________________
Column type frequency:
character 13
Date 1
numeric 30
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
STNID 0 1.00 12 12 0 11325 0
NAME 479443 0.93 2 50 0 10363 0
CTRY 479443 0.93 2 2 0 230 0
STATE 479443 0.93 0 2 5422379 65 0
TEMP_ATTRIBUTES 0 1.00 2 2 0 21 2489667
DEWP_ATTRIBUTES 0 1.00 2 2 0 22 2824750
SLP_ATTRIBUTES 0 1.00 2 2 0 22 5292224
STP_ATTRIBUTES 0 1.00 2 2 0 22 5124390
VISIB_ATTRIBUTES 0 1.00 2 2 0 22 3640096
WDSP_ATTRIBUTES 0 1.00 2 2 0 22 2747493
MAX_ATTRIBUTES 4623953 0.36 1 1 0 1 0
MIN_ATTRIBUTES 3937634 0.45 1 1 0 1 0
PRCP_ATTRIBUTES 707360 0.90 1 1 0 9 0

Variable type: Date

skim_variable n_missing complete_rate min max median n_unique
YEARMODA 0 1 2010-01-01 2011-12-31 2010-12-29 730

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
LATITUDE 479443 0.93 32.30 28.72 -89.00 24.71 40.65 50.58 83.65 ▁▂▂▇▅
LONGITUDE 479443 0.93 4.95 86.99 -179.98 -79.73 12.20 73.40 179.75 ▂▆▇▅▅
ELEVATION 6825 1.00 359.37 556.30 -999.90 29.00 143.86 424.30 7018.00 ▇▂▁▁▁
BEGIN 479443 0.93 19763685.10 246237.12 19010101.00 19550301.00 19731004.00 20020326.00 20111212.00 ▁▂▅▅▇
END 479443 0.93 20196639.37 14141.04 20100125.00 20200107.00 20200107.00 20200107.00 20200109.00 ▁▁▁▁▇
YEAR 0 1.00 2010.50 0.50 2010.00 2010.00 2010.00 2011.00 2011.00 ▇▁▁▁▇
MONTH 0 1.00 6.55 3.45 1.00 4.00 7.00 10.00 12.00 ▇▅▅▅▇
DAY 0 1.00 15.73 8.79 1.00 8.00 16.00 23.00 31.00 ▇▇▇▇▆
YDAY 0 1.00 183.70 105.42 1.00 92.00 184.00 275.00 365.00 ▇▇▇▇▇
TEMP 0 1.00 12.47 13.10 -79.30 4.70 14.00 22.70 43.30 ▁▁▁▇▅
DEWP 361081 0.95 6.41 12.05 -82.90 -0.70 7.40 15.10 32.20 ▁▁▁▇▇
SLP 2742534 0.62 1014.00 9.20 925.90 1008.90 1013.70 1019.10 1077.70 ▁▁▇▅▁
STP 2666250 0.63 559.60 462.23 0.00 11.90 882.20 977.70 999.80 ▆▁▁▁▇
VISIB 1649499 0.77 15.82 9.80 0.00 10.00 14.00 16.70 160.00 ▇▁▁▁▁
WDSP 313857 0.96 3.27 2.32 0.00 1.70 2.80 4.30 49.30 ▇▁▁▁▁
MXSPD 387117 0.95 6.08 3.30 0.50 4.00 5.70 7.70 49.80 ▇▁▁▁▁
GUST 5427149 0.24 12.06 4.10 5.00 9.30 11.30 14.00 59.60 ▇▂▁▁▁
MAX 5257 1.00 17.66 13.70 -78.30 9.00 19.50 28.50 56.00 ▁▁▂▇▃
MIN 4589 1.00 7.55 13.00 -81.80 0.10 8.90 17.10 42.70 ▁▁▁▇▃
PRCP 707360 0.90 1.91 7.67 0.00 0.00 0.00 0.30 481.10 ▇▁▁▁▁
SNDP 6785917 0.05 258.74 264.96 10.20 71.10 190.50 370.80 2989.60 ▇▁▁▁▁
I_FOG 4347339 0.39 1.00 0.00 1.00 1.00 1.00 1.00 1.00 ▁▁▇▁▁
I_RAIN_DRIZZLE 7174677 0.00 NaN NaN NA NA NA NA NA
I_SNOW_ICE 7174677 0.00 NaN NaN NA NA NA NA NA
I_HAIL 7174677 0.00 NaN NaN NA NA NA NA NA
I_THUNDER 7174677 0.00 NaN NaN NA NA NA NA NA
I_TORNADO_FUNNEL 7174677 0.00 NaN NaN NA NA NA NA NA
EA 361081 0.95 1.23 0.84 0.00 0.60 1.00 1.70 4.80 ▇▆▂▁▁
ES 0 1.00 1.87 1.26 0.00 0.90 1.60 2.80 8.80 ▇▅▂▁▁
RH 393042 0.95 69.17 19.78 0.00 57.70 71.90 83.30 100.00 ▁▂▃▇▆

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 January 2020   
##                STNID NAME LAT LON CTRY STATE BEGIN END COUNTRY_NAME
##      1: 007018-99999 <NA>  NA  NA <NA>  <NA>    NA  NA         <NA>
##      2: 007018-99999 <NA>  NA  NA <NA>  <NA>    NA  NA         <NA>
##      3: 007026-99999 <NA>  NA  NA <NA>  <NA>    NA  NA         <NA>
##      4: 007026-99999 <NA>  NA  NA <NA>  <NA>    NA  NA         <NA>
##      5: 007026-99999 <NA>  NA  NA <NA>  <NA>    NA  NA         <NA>
##     ---                                                            
## 643151:   A51256-451 <NA>  NA  NA <NA>  <NA>    NA  NA         <NA>
## 643152:   A51256-451 <NA>  NA  NA <NA>  <NA>    NA  NA         <NA>
## 643153:   A51256-451 <NA>  NA  NA <NA>  <NA>    NA  NA         <NA>
## 643154:   A51256-451 <NA>  NA  NA <NA>  <NA>    NA  NA         <NA>
## 643155:   A51256-451 <NA>  NA  NA <NA>  <NA>    NA  NA         <NA>
##         ISO2C ISO3C YEAR  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG  SEP
##      1:  <NA>  <NA> 2011    0    0 2104 2797 2543 2614  382    0    0
##      2:  <NA>  <NA> 2013    0    0    0    0    0    0  710    0    0
##      3:  <NA>  <NA> 2012    0    0    0    0    0    0  367    0    0
##      4:  <NA>  <NA> 2014    0    0    0    0    0    0  180    0    4
##      5:  <NA>  <NA> 2016    0    0    0    0    0  794    0    0    0
##     ---                                                              
## 643151:  <NA>  <NA> 2016 2185 2047 2175 2131 2213 2139 2209 2216 2131
## 643152:  <NA>  <NA> 2017 2192 1883 2204 1910 2145 2113 2218 2204 2082
## 643153:  <NA>  <NA> 2018 2192 1887 2194 2113 2151 2095 2202 2197 1816
## 643154:  <NA>  <NA> 2019 2188 2000 2143 2105 2187 2124 2184 2138 2077
## 643155:  <NA>  <NA> 2020 1419    0    0    0    0    0    0    0    0
##          OCT  NOV  DEC
##      1:    0    0    0
##      2:    0    0    0
##      3:    0    0    7
##      4:    0  552    0
##      5:    0    0    0
##     ---               
## 643151: 2196 2131 1665
## 643152: 2192 2103 2174
## 643153: 2195 2063 2178
## 643154: 1872 1508 2159
## 643155:    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 January 2020   
##            STNID              NAME    LAT     LON CTRY STATE    BEGIN
##  1: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
##  2: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
##  3: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
##  4: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
##  5: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
##  6: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
##  7: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
##  8: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
##  9: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 10: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 11: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 12: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 13: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 14: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 15: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 16: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 17: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 18: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 19: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 20: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 21: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 22: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
## 23: 955510-99999 TOOWOOMBA AIRPORT -27.55 151.917   AS       19980301
##            STNID              NAME    LAT     LON CTRY STATE    BEGIN
##          END COUNTRY_NAME ISO2C ISO3C YEAR JAN FEB MAR APR MAY JUN
##  1: 20200107    AUSTRALIA    AU   AUS 1998   0   0 222 223 221 211
##  2: 20200107    AUSTRALIA    AU   AUS 1999 213 201 235 224 244 229
##  3: 20200107    AUSTRALIA    AU   AUS 2000 241 227 247 238 246 237
##  4: 20200107    AUSTRALIA    AU   AUS 2001 245 223 246 238 239 236
##  5: 20200107    AUSTRALIA    AU   AUS 2002 245 219 246 236 243 229
##  6: 20200107    AUSTRALIA    AU   AUS 2003 244 217 220 232 235 233
##  7: 20200107    AUSTRALIA    AU   AUS 2004 240 227 241 229 233 224
##  8: 20200107    AUSTRALIA    AU   AUS 2005 241 221 242 240 247 239
##  9: 20200107    AUSTRALIA    AU   AUS 2006 245 223 246 232 241 238
## 10: 20200107    AUSTRALIA    AU   AUS 2007 247 222 244 240 248 240
## 11: 20200107    AUSTRALIA    AU   AUS 2008 247 228 248 239 248 239
## 12: 20200107    AUSTRALIA    AU   AUS 2009 245 222 246 235 244 237
## 13: 20200107    AUSTRALIA    AU   AUS 2010 248 223 248 240 244 240
## 14: 20200107    AUSTRALIA    AU   AUS 2011 247 224 247 240 247 240
## 15: 20200107    AUSTRALIA    AU   AUS 2012 248 232 248 240 248 240
## 16: 20200107    AUSTRALIA    AU   AUS 2013 236 220 247 233 248 239
## 17: 20200107    AUSTRALIA    AU   AUS 2014 243 224 247 240 246 239
## 18: 20200107    AUSTRALIA    AU   AUS 2015 248 222 248  72 247 240
## 19: 20200107    AUSTRALIA    AU   AUS 2016 246 228 245 240 246 240
## 20: 20200107    AUSTRALIA    AU   AUS 2017 247 224 248 240 248 239
## 21: 20200107    AUSTRALIA    AU   AUS 2018 248 224 248 239 247 240
## 22: 20200107    AUSTRALIA    AU   AUS 2019 247 224 245 240 214 240
## 23: 20200107    AUSTRALIA    AU   AUS 2020 157   0   0   0   0   0
##          END COUNTRY_NAME ISO2C ISO3C YEAR JAN FEB MAR APR MAY JUN
##     JUL AUG SEP OCT NOV DEC
##  1: 226 217 222 234 215 230
##  2: 239 247 236 246 233 243
##  3: 245 240 236 248 239 248
##  4: 243 240 237 236 235 246
##  5: 243 246 227 238 233 246
##  6: 246 242 218 239 225 245
##  7: 235 244 235 244 235 245
##  8: 247 247 234 242 239 246
##  9: 247 247 239 247 240 247
## 10: 244 244 239 247 237 246
## 11: 248 247 239 247 238 248
## 12: 248 248 239 248 239 248
## 13: 242 247 240 248 240 247
## 14: 248 247 239 248 239 248
## 15: 248 247 240 248 240 245
## 16: 252 247 238 248 239 246
## 17: 246 247 240 247 240 248
## 18: 247 248 239 247 238 247
## 19: 248 248 238 248 239 248
## 20: 248 247 239 248 240 248
## 21: 246 247 218 244 190 248
## 22: 248 247 240 248 237 248
## 23:   0   0   0   0   0   0
##     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(devtools)) {
  install.packages(
    "devtools",
    repos = c(CRAN = "https://cloud.r-project.org/")
  )
  library(devtools)
}
devtools::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