Data Resources: Using OPeNDAP to Read Data at PSD
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 clientsTo 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:
- NCL: A data display and analysis program from NCAR. (OPeNDAP instructions and example).
- GrADS (Grads OPeNDAP instructions).
- NCO (NCO OPeNDAP instructions: section 3.7.1).
- Integrated Data Viewer (IDV) (IDV OPeNDAP Instructions)
- IDL (commercial display and analysis). ( IDL OPeNDAP download instructions).
- Ferret: A display and analysis tool.
- 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.
- R The R project for statistical computing: For information on reading opendap in R, see these pages:
- ArcGIS: See https://publicwiki.deltares.nl/display/OET/KML+overview+of+OPeNDAP+data#KMLoverviewofOPeNDAPdata-AccessingnetCDF%2FOPeNDAPdatawitharcGIS
- ncBrowse. See https://publicwiki.deltares.nl/display/OET/KML+overview+of+OPeNDAP+data#KMLoverviewofOPeNDAPdata-AccessingnetCDF%2FOPeNDAPdatawithncBrowse
- Python. see https://publicwiki.deltares.nl/display/OET/KML+overview+of+OPeNDAP+data#KMLoverviewofOPeNDAPdata-AccessingnetCDF%2FOPeNDAPdatawithPython.
Other useful commands
- The command dncdump will do the netCDF ncdump on a netCDF DODS URL.
Compiling your own clientYour 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.
Using OPeNDAP DIRUsing 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 HandAn OPeNDAP URL has the form:
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.