Data Resources: Using OPeNDAP to Read Data at PSD

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.

Pre-packaged clients

To use data files on you desktop computer via OPeNDAP you must first obtain an OPeNDAP enabled client program.  (See Unidata's opendap list). Some commonly used ones include:
  1. NCL: A data display and analysis program from NCAR. (OPeNDAP instructions and example).
  2. GrADS (Grads OPeNDAP instructions).
  3. NCO (NCO OPeNDAP instructions: section 3.7.1).
  4. Integrated Data Viewer (IDV) (IDV OPeNDAP Instructions)
  5. IDL (commercial display and analysis). ( IDL OPeNDAP download instructions).
  6. Ferret: A display and analysis tool.
  7. MATLAB version 2012a and later has native openDAP support. For earlier versions, use the MATLAB has nctoolbox for Common Data Model (NetCDF, OpenDAP, HDF) access.
  8. R The R project for statistical computing: For information on reading opendap in R, see these pages:
  9. ArcGIS: See https://publicwiki.deltares.nl/display/OET/KML+overview+of+OPeNDAP+data#KMLoverviewofOPeNDAPdata-AccessingnetCDF%2FOPeNDAPdatawitharcGIS
  10. ncBrowse. See https://publicwiki.deltares.nl/display/OET/KML+overview+of+OPeNDAP+data#KMLoverviewofOPeNDAPdata-AccessingnetCDF%2FOPeNDAPdatawithncBrowse
  11. Python. see https://publicwiki.deltares.nl/display/OET/KML+overview+of+OPeNDAP+data#KMLoverviewofOPeNDAPdata-AccessingnetCDF%2FOPeNDAPdatawithPython.

Other useful commands

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

    ncdump -h http://data1.gfdl.noaa.gov/psd/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-enabled NetCDF4 library.  An OPeNDAP URL can then be used in place of the the file name in the NCOPN call. 

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.esrl.noaa.gov/psd/thredds/dodsC/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

An OPeNDAP URL has the form:

http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/noaa.oisst.v2/sst.mnmean.nc.dds

where the colored parts represent:

  • OPeNDAP server hostname
  • OPeNDAP server infix
  • 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 mixed layer depth data from the GFDL CM.2 model.
  • Clicking the check box next to any of the variables (e.g. mld or mixed layer depth) causes the interface for fill in the dimensions of that variable.
  • 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.