source: TI09-UKCollaboration/trunk/DS_Workshop/doc/opendap.rst @ 5113

Subversion URL:
Revision 5113, 2.0 KB checked in by spascoe, 12 years ago (diff)

Serving NetCDF directly with OPeNDAP

Creating your own OPeNDAP server

Install the light-weight OPeNDAP server Pydap:

$ easy_install pydap pydap.responses.netcdf pydap.handlers.netcdf

A new paster template is available for use:

$ paster create --list-templates
Available templates:
  basic_package:  A basic setuptools-enabled package
  paste_deploy:   A web application deployed through paste.deploy
  pydap:          A basic pydap server installation.

Create a new server from the pydap template:

$ paster create -t pydap DapServer

Your OPeNDAP server will be created in the DapServer directory. You will need to edit the file DapServer/server.ini to configure your application to work through cirrus' firewall.

  1. In the [server:main] section change the host to and the port to your personal server port (see user information handout).
  2. Add a [filter:proxy] section as shown below with the prefix option indicating your username.
  3. Add filter-with = proxy to the [app:main] section.
  4. Set the root option in [app:main] to the location of the workshop's test dataset as shown below.

After editing your server.ini file should like something like this one for user test:

use = egg:Paste#http
# Change to to make public
host =
port = 5010
use = egg:PasteDeploy#prefix
prefix = /test
use = egg:pydap#server
root = /home/spascoe/ds_workshop/data
templates = %(here)s/templates
x-wsgiorg.throw_errors = 0
filter-with = prefix

You can now start your OPeNDAP server with:

$ cd DapServer
$ paster serve server.ini
Starting server in PID 29158.
serving on view at

Goto<username>/ and explore the PyDAP server.

Note: See TracBrowser for help on using the repository browser.