GHCND

SCOPE

This page deals with the daily data part of the Global Historical Climatology Network (GHCN), giving download links, together with some test results, and the core MATLAB software used to extract information from downloaded files.

Temperatures are stored as tenths of a degree Centigrade, and rainfall as tenths of a millimeter.

The test results are not good, use GHCND with extreme caution.

DOWNLOADING

Information such as station and country codes and format specifications can be found via the following link:

https://www.ncei.noaa.gov/products/land-based-station/global-historical-climatology-network-daily

Data downloading can be done using file download software, the following example uses a particular free product.

Example: To download the station file ASN00040094.dly (Harrisville Australia), copy the following text to the paste buffer, then click on the + button of FreeDownloadManager:

ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/all/ASN00040094.dly

There appears to be a rationing system for file downloads, 2 or 3 files can be downloaded quickly, but a wait of several minutes is then required before another file can be downloaded.

TESTS OF GHCND

TEST 01: 2021 contents of a station file of interest, due to recent (2018/19) drought conditions in Cape Town, South Africa.

The following figure shows the contents of the station file SF000.dly (Cape Town Malan Airport) in 2021, only the first 10 days of each month are shown:

Some problems are readily apparent:

  • There is a lot of missing data, indicated by the value -9999
  • Rainfall data (PRCP) is especially sparsely populated
  • The only data type with solid data is TAVG

The problems listed above may be due solely to defects in the (presumably) Automatic Weather Station (AWS), with TAVG being relatively easy to measure, and rainfall being especially difficult.

TEST 02: Walgett Council Depot (Australia) January 1987

The following figure provides a direct test of some data in GHCND, compared with the source from the Australian BoM.

At the top of the figure above is ALL the daily data within GHCND for this station for January (month 01) 1987, comprising separate rows for TMAX, TMIN and PRCP. Note that the rows for 31 days have wrapped around. The source data from the BoM has been copied directly from CSV files available from the BoM Climate Data Online website.

Test Passed: all data agree exactly.

TEST 03: Precipitation data for Harrisville Australia

This station data has been tested because it contains a feature that is quite common in daily rainfall data from Australia. The feature is that some rainfall totals cover several days of accumulation, often there is no missing data, but the format of GHCND does not distinguish between missing and delayed data.

The following figure shows an extract from the GHCND file ASN0040094.dly:

The source data from the BoM for the two periods marked in red above is as follows:

Rainfall totals have been lost for the periods spanning more than one day.

TEST 04: Comparison between GHCND and GHCNMv2

Precipitation data for Cape Town Airport is contained within both GHCNMv2 (as monthly totals) and GHCND (as daily totals). Is there agreement between GHCNMv2 and monthly totals derived from GHCND? The answer is NO, as shown in the following figure:

Missing data within GHCND prevents many months from getting a monthly total, but the ones that do are not in agreement with GHCNMv2.

The following extract from the GHCND Readme file may be relevant:

S = Global Summary of the Day (NCDC DSI-9618)
NOTE: “S” values are derived from hourly synoptic reports
exchanged on the Global Telecommunications System (GTS).
Daily values derived in this fashion may differ significantly
from “true” daily data, particularly for precipitation
(i.e., use with caution).

CORE MATLAB

The following MATLAB code can be used to extract numerical data from a GHCND .dly file for a particular year and data type:

while 1
tline = fgetl(fid1);
if ~ischar(tline), break, end
yr_str = tline(12:15); % year string
mt_str = tline(16:17); % month string
if (yr_str == target_str)
if (sum((tline(18:21) == type_str)) == 4) %
fprintf(1, ‘%s \n’,tline(1:269)); % Prints to console
end
end
end

END OF PAGE

Leave a comment