Data Resources: Using OPeNDAP to Read Data at PSD

(Note: OPeNDAP was previously known as "DODS" and is still referred to that way at many locations.)

Software | PSD datafiles | OPeNDAP at other sites

OPeNDAP is a data server architecture that allows users to use data files that are stored on remote computers with their favorite analysis and visualization client software.  Opening an OPeNDAP file is as easy as entering an OPeNDAP URL into the interface the client software where it expects a local file name to be entered.  Every netCDF data file that PSD provides via anonymous FTP is also available via OPeNDAP.

Client Software

Pre-packaged clients

To use data files on you desktop computer via OPeNDAP you must first obtain an OPeNDAP enabled client program.  Currently, these include:
  1. NCL: A data display and analysis prorgram from NCAR. (openDAP instructions and example).
  2. GrADS (Grads OpenDAP instructions).
  3. NCO (NCO OpenDAP instructions: section 3.7.1).
  4. IDL (commercial display and analysis). ( IDL openDAP download instructions).
  5. Ferret: A display and analysis tool.
  6. MATLAB (with or without the OPeNDAP MATLAB GUI).

Other useful commands

  1. The command dncdump will do the netCDF ncdump on a netCDF DODS URL.
    example:

    dncdump http://data1.gfdl.noaa.gov/cgi-bin/opendap/nph-nc/dods-data/gfdl_ocean_assimilation/time_mean.001980.nc


Compiling your own client

Your own FORTRAN program can be an OPeNDAP client.  A FORTRAN program that uses standard netCDF library calls can be linked with the OPeNDAP client library.  An OPeNDAP URL can then be used in place of the the file name in the NCOPN call.  The easiest way to link with the OPeNDAP library is to compile and link your FORTRAN code with the g++ compiler.

OPeNDAP Data Files at PSD

Once you have a OPeNDAP client installed, the next step is to find the data file or files which contain the data you want to read.

Using OPeNDAP DIR

Using a Web browser you can connect to the PSD netCDF OPeNDAP server at http://www.cdc.noaa.gov/cgi-bin/opendap/nph-nc/Datasets/.  The OPeNDAP server will return information about the data files found in that directory to your Web browser.  Once you have located the file of interest you can copy the OPeNDAP URL of the file to your client software.

Constructing OPeNDAP URLs by Hand

Note: see opendap.html for details on accessing the PSD OPeNDAP server.

An OPeNDAP URL has the form:

http://www.cdc.noaa.gov/cgi-bin/opendap/nph-nc/Datasets/noaa.oisst.v2/sst.mnmean.nc.dds

where the colored parts represent:

  • OPeNDAP server hostname
  • OPeNDAP server CGI
  • Path to dataset (a netCDF file in this case)
  • OPeNDAP extension (not included when entering the URL into the client software).

OPeNDAP Data at Other Sites

 
Many other sites around the world make data available via OPeNDAP servers. A list of many of the sites serving data and a list based on the Global Change Master Directory are available at the OPeNDAP documentation website at Unidata.

 

You can use any of the pre-packaged clients described above to read OPeNDAP data sets at other sites. In that same way a remote user can create a FORTRAN program to read OPeNDAP data at PSD, PSD users can read remote OPeNDAP data sets using FORTRAN programs that run locally with the correct libraries/compile commands.

 

Read remote OPeNDAP data sets.

  • First determine the structure of the files. For example, we can determine the structure of the salinity data from the ocean assimilation model at GFDL.
  • Clicking the check box next to any of the variables causes the interface for fill in the dimensions of that variable. Clicking on salinity shows us that it has dimenstions of 10 by 40 by 200 by 360 in time, levels, latitude and longitude.
  • You can examine the values of the coordinate variables by selecting them and clicking the "get ascii" button.
  • You can now write a program to read the data file based on the information about the structure you gathered in the previous steps with one of the packages listed above.