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

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI09-UKCollaboration/trunk/DS_Workshop/doc/opendap.rst@5113
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 0.0.0.0 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:

[server:main]
use = egg:Paste#http
# Change to 0.0.0.0 to make public
host = 0.0.0.0
port = 5010
[filter:proxy]
use = egg:PasteDeploy#prefix
prefix = /test
[app:main]
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 0.0.0.0:5010 view at http://127.0.0.1:5010

Goto http://cirrus.badc.rl.ac.uk/<username>/ and explore the PyDAP server.

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