Using OPeNDAP to Read Data at PSL
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 PSL 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. Note that there is currently a bug whereby https URLs (including PSL's) do not work. Seehttps://www.mathworks.com/support/bugreports/1072120?s_tid=answers_rc2-2_p5_MLT for a workaround.
- 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 ncdump will do the netCDF ncdump on a netCDF OPeNDAP URL.
ncdump -h http://data1.gfdl.noaa.gov/cgi-bin/opendap/nph-nc/dods-data/gfdl_ocean_assimilation/time_mean.001980.nc
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 PSL netCDF OPeNDAP server at https://psl.noaa.gov/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 SitesMany 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.
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.