How to use OPeNDAP


Revision as of 20:28, 16 June 2015 by WikiSysop (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

OPeNDAP is a software allowing simple access to remote data. With suitable client software, one can access to remote data distributed through OPeNDAP as easily as data stored locally.


Client Software


Use Octave-netcdf compiled with a NetCDF library with OPeNDAP-support.


Matlab Structs Tool

The Matlab Structs Tool is available at

Installation instructions for Linux:

 1/ install libdap, usually a package is readily available. Example for debian: as root, type 
    "apt-get install libdap-dev libdap10 libdap-bin libdap10" . 
    Alternatively, download source tarball, untar it, run "configure", make, make install
 2/ install loaddap: 
   * download from the URL above
   * tar xzvf loaddap-3.X.X.tar.gz
   * cd loaddap-3.X.X
   * configure --with-matlab=/some/path/to/Matlab/R2011a
     if configure fails at matlab version checking, edit conf/matlabver.m4 around line 78 and see if matlab version is in format X.X or XX.X (e.g. add another test for a version format X.XX)
   * make
   * make install (need to be root to install in /usr/... , alternatively use above "configure --prefix=/path/to/install/to" )
 3/ to load remote databases, or parts of them, in matlab:
   * add loaddap to matlab path, 
   * load some remote files, e.g. for HYCOM global forecasts, run in matlab:

OpenDAP syntax details are available on


MEXNC with OPeNDAP support
instructions are available at If this approach is followed, the octave example code can also be used with the matlab netCDF toolbox.


Any Fortran program that can read netCDF files (e.g. ustat, and friends) can use OPeNDAP if it is linked with the netcdf4 library, which itself needs to be compiled with curl support. Hence, install libcurl (package or manually) along with hdf5, zlib (and optional szlib) BEFORE you configure/make/install the netcdf4 library. After installing, use "nc-config --all" and check that DAP support is properly installed.

Regarding ustat and friends (i.e. all programs using ufileformat, including the GHER model, the assimilation kit etc): ufileformat.F90 needs to be modified, as current syntax is only valid for local netcdf files

e.g. : ustat

Ufileformat detects the hash (#), identifies a netcdf file, and loads it accordingly Everything following the hash is used as the variable name (and matrix restrictions)

Work in progress: replacing # with "?" , and generalize netcdf support to opendap support,

e.g. : ustat "[1:10][1][1][1]"

Data distributed by OPeNDAP

List of other links:

Useful links

Personal tools