Personal tools

OpenDAP

From MohidWiki

Revision as of 12:47, 10 March 2009 by Guillaume (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Available software

libdap

Developer libraries and tools. Provides the command-line getdap tool that allows to download opendap files.

libnc-dap

Provides substitute netcdf libraries, yet opendap-able.

Hyrax

Is the opendap server. Requires handlers for specific file format such as netcdf, hdf4, hdf5, etc...

Matlab loaddap

Is a matlab client which allows to access and read netcdf files from opendap urls. Requires the libdap libraries.

Definitions

Below lie the different concepts associated with OpenDAP.

DAP

is an acronym for Data Access Protocol. It's a protocol for accessing and extracting information from large dataset files through the internet.

DAP server

is a suite of CGI scripts and executables which serve large dataset files. An http daemon a.k.a httpd, such as Apache, working on a given port (typically port 80) is required.

DAP handler

is a program that deals with a specific file type (ex: netcdf, HDF, JGOFS, FreeForm etc ...). It requires a DAP server. An HDF5 handler is on the way (as of April 2006).

DAP client

is a program that can communicate with a DAP server. Reknowned clients are ncBrowse , Ferret, matlab. There's even a command line client geturl that comes with the DODS package.

DAP interface

is an solution for users to access, browse and retrieve data from a data repository. For example, LAS is a DAP interface.

OpenDAP

is an open source project for a network data access protocol. OpenDAP is also known as DODS, Distributed Ocean Datasets System. It provides a package encapsulating a DAP server with file handlers such as netcdf or HDF. The official website is found at http://www.opendap.org.

DODS URL

A DODS URL is the http address that allows to browse and retrieve data from a DAP server. A DODS URL can append a query string, indicating the variable(s), the time and the space window. It can also query for the metadata of the file.


End user's guide

This is a local user's guide. These are the official user's guide and quick start guide.

Quick start

From ncBrowse

  1. Download and install the latest version of the Java platform from Sun.
  2. Download and install the latest version of ncBrowse.
  3. Run ncBrowse.
  4. Go to file --> OpenDAP, write down the URL to the desired file http://data.mohid.com/opendap/nph-dods/mercator-ist/Portugal/20061213_Portugal_WaterProperties.nc, then hit Accept.
  5. You can now browse at will the content of the remote file.

From a web-browser

  1. From a web-browser, compose the address where the DAP files are being served. ex: http://data.mohid.com/opendap/nph-dods/LASoutput.nc.html or http://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/. You can browse the directories to see the available files. netcdf files are most likely to be found.
  2. Select a netcdf file by clicking on it or simply append it's full address in the address bar followed by .html suffix. ex: http://data.mohid.com/opendap/nph-dods/mercator-ist/Portugal/20061213_Portugal_WaterProperties.nc.html or http://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/coads/1degree/global/std/air.mean.nc.html.
  3. Select the desired variables by clicking on their select boxes. Then write their subdomain limits. For example, putting in latitude [12:2:24] selects the subdomain ranging from 12ºN to 24ºN with a 2º step. Only integers are allowed.
  4. Get the data by clicking in Get Ascii or Binary Data Object. Respectively you will obtain the data in an ASCII file or in netcdf format (rewrite the extension .nc.dods to .nc).

Quick ref

Here's a list of useful suffixes for extracting metadata from netcdf files:

  • .help generates a web based help document.
  • .html generates a web page containing information and action buttons over the netcdf file.
  • .info returns the netcdf file metadata.
  • .dds returns information about the variables.
  • .das returns information about the variable attributes.
  • .ver returns the OpenDAP server version.
  • .asc returns the netcdf file in ASCII format.

Here's a quick reference of suffixes for extracting data from netcdf files:

  • .asc?time returns the variable time in ascii format.
  • .asc?time[0:2:6] returns the variable time in ascii format but within a subset of stride 2.
  • .dods?time[0:2:6] returns the same variable as above but in binary format (i.e. netcdf).
  • .dods?time[2:3:8],sst[2:3:8][43:47][215:234],ssh[2:3:8][43:47][215:234] returns the time, the SST and the SSH variables for a given domain.
  • .dods?time[2:3:8],sst[2:3:8][43:47][215:234]&pressure>50.0&pressure<100.0 returns the time and the SST variables for a given domain with the additional constraint that the variable pressure must range between 50.0 and 100.0 units.

Netcdf libraries

The Opendap team maintains alternative netcdf libraries to be linked against any netcdf tool. They provide the ability to the netcdf libraries to read opendap urls besides local netcdf files.

External references