How can Realtime data be retrieved from the NDBC web site?
The data posted to the NDBC web server are stored in flat files that may be downloaded via HTTP, wget, or Perl/LWP (among other utilities). HTTPS is the protocol that should be used.
The Realtime directory data/realtime2 contains the current (last 45 days) data. The term Realtime refers to the version of the data. In general, Realtime data are the data that have undergone automated quality control checks as they were received in real time and released on the Global Telecommunications System. The files are named station_id.datatype.
The available data types are:
- txt for standard meteorological data
- drift for meteorological data from drifting buoys
- cwind for continuous winds data
- spec for spectral wave summaries
- data_spec for raw spectral wave data
- swdir for spectral wave data (alpha1)
- swdir2 spectral wave data (alpha2)
- swr1 for spectral wave data (r1)
- swr2 for spectral wave data (r2)
- adcp for Acoustic Doppler Current Profiler
- ocean for oceanographic data
- tide for tide data
For station 41002,
- the standard meteorological data is in 41002.txt
- the continuous winds data is in 41002.cwind
- the spectral wave summary data is in 41002.spec
- the raw spectral wave data is in 41002.data_spec
In building file names, C-MAN (land) stations are in uppercase, e.g., FPSN7.txt.
Not all of these data types are available on each station. All stations should have standard met data (.txt) and buoys should have spectral wave summaries (.spec).
See Measurement Descriptions and Units for more information on the units of measure used on the NDBC web site.
wget is a handy UNIX utility for retrieving files from remote servers. It supports the FTP and HTTP protocol. HTTP is the preferred protocol at NDBC.
To retrieve the 42001.txt file from NDBC, use:
- wget https://www.ndbc.noaa.gov/data/realtime2/41002.txt
Using Perl and the LWP interface to the web, you would reference these files as https://www.ndbc.noaa.gov/data/realtime2/41002.txt and so on. Note that the data files are accessed via HTTP and are in the data/realtime2 directory. Though LWP supports FTP, the preferred protocol at NDBC is HTTP. For more info on LWP, review the LWP modules at http://www.cpan.org/.
Anonymous FTP access is presently available on data.ndbc.noaa.gov, but this access method is expected to be discontinued. It is strongly recommended that if you are just beginning to access NDBC data, you not start with an FTP method. If already using it for NDBC data access, please plan to change to HTTP or wget.
A sample FTP session to extract files might look like this:
ftp data.ndbc.noaa.gov anonymous email address for password cd data/realtime2 get 46087.txt quit
Frequency of access
We ask that you limit your retrievals to a minimal level. Most stations report hourly and most of the data is available by 25 minutes after the hour. You can determine the reporting frequency of the station you are interested in by viewing the Previous Observations on the Station Page.