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 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:- 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).
- Ferret: A display and analysis tool.
- MATLAB version 2012a and later has native openDAP support.
- 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.
example:
ncdump -h 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-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 PSL
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 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 Hand
An OPeNDAP URL has the form:https://psl.noaa.gov/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.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.
- Look at the OPeNDAP catalog.
- Follow the link to 1st dataset: CM2.1U_Control-1990_E1_ITFblock ocean_tripolar monthly all vars 01010101-02001231
- Click on the OPENDAP link
- 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.