Changeset 5118 for TI09-UKCollaboration


Ignore:
Timestamp:
19/03/09 06:31:38 (10 years ago)
Author:
spascoe
Message:

Version printed for workshop

Location:
TI09-UKCollaboration/trunk/DS_Workshop
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • TI09-UKCollaboration/trunk/DS_Workshop/doc/cows.rst

    r5114 r5118  
    4242 
    4343 
    44 As you did in the OPeNDAP tutorial, edit ``CowsServer/development.ini`` to set the host, port and proxy filter.  Follow this general template: 
     44Edit ``CowsServer/development.ini`` as you did in the OPeNDAP tutorial 
     45to set the host, port and proxy filter.  Follow this general template: 
    4546 
    4647.. code-block:: ini 
     
    6465  filter-with = proxy 
    6566 
    66 Replace <username> and <port> with values from the table below 
    67  
    68 ========  ==== 
    69 Username  Port 
    70 ========  ==== 
    71 test      5010 
    72 nsb       5011 
    73 nico      5012 
    74 mlcu      5013 
    75 njcu      5014 
    76 mase      5015 
    77 wael      5016 
    78 lq        5017 
    79 pjk       5018 
    80 mggr      5019 
    81 petwa     5020 
    82 aprc      5021 
    83 monz      5022 
    84 dlowe     5023 
    85 ========  ==== 
     67Replace <username> and <port> with values given to you in your user 
     68information handout. 
    8669 
    8770You are now all ready to start your server.  run the command:: 
     
    9376catalogue and can try out the WMS demo. 
    9477 
     78.. admonition:: Exercise 
    9579 
     80  You can customise COWS server by editing files in the 
     81  ``cowsserver/templates`` and ``cowsserver/public`` directories.  Try making 
     82  the demo page a bit more attractive by editing  
     83  ``cowsserver/templates/demo.xlm``. 
    9684 
    9785Accessing the Web Coverage Service (WCS) with OWSLib 
     
    10290There is however an Open Souce python OGC client library called OWSLib which we will use to communicate with the WCS. Again we need to install this with easy_install:: 
    10391 
    104   $easy_install owslib 
     92  $ easy_install owslib 
    10593 
    10694Start ipython again and make a connection to the WCS: 
     
    10997  >>> wcs=WebCoverageService('http://cirrus.badc.rl.ac.uk/<username>/hadcm3/wcs',version='1.0.0') 
    11098  >>> print 'Accessing WCS version %s at %s'%(wcs.version, wcs.url) 
    111  
    112 !TODO: Put information in capabilities.cfg to give the section below meaning. 
    11399 
    114100The OWSLib wcs 'identification' object contains general information about the service (some of which is missing in this service!):: 
     
    133119  >>> wcs.provider.contact.postcode 
    134120  >>> wcs.provider.contact.country 
     121 
     122 
     123.. admonition:: Exercise 
     124 
     125  The ``capabilities.cfg`` file contains service-level metadata.  Customise 
     126  this file to reflect your server. 
    135127 
    136128 
  • TI09-UKCollaboration/trunk/DS_Workshop/doc/csml.rst

    r5114 r5118  
    145145  ===================  ============================== 
    146146 
    147 !TODO: more details, references. 
    148  
    149147To generate CSML for this data use the 
    150148``csmlscan`` tool again. This time we will use a configuration file 
    151 rather than command line arguments. First create a configuration file: 
    152  
    153 **hadcm3.cfg**:: 
     149rather than command line arguments. First create a configuration file ``hadcm3.cfg``: 
     150 
     151.. code-block:: ini 
    154152 
    155153  [dataset] 
  • TI09-UKCollaboration/trunk/DS_Workshop/doc/index.rst

    r5107 r5118  
    88This tutorial will show you how to use CSML (Climate Science Modelling Language) tools and then walk you through creating a combined WMS/WCS server for NetCDF data conforming to the CF conventions using the CEDA OWS Framework (COWS).  
    99 
    10  
    11  
    12 Contents: 
    13  
    1410.. toctree:: 
    1511   :maxdepth: 2 
     
    2016   cows 
    2117 
    22  
    23 Indices and tables 
    24 ================== 
    25  
    26 * :ref:`genindex` 
    27 * :ref:`search` 
    28  
  • TI09-UKCollaboration/trunk/DS_Workshop/doc/opendap.rst

    r5114 r5118  
    6767 
    6868The server will be available on your Windows desktop at 
    69 ``http://cirrus.badc.rl.ac.uk/<username>/``.   
     69``http://cirrus.badc.rl.ac.uk/<username>/``. 
    7070 
    7171 
     
    7373-------------------------- 
    7474 
     75PyDAP includes a very minimal browser interface to your OPeNDAP 
     76service which allows you to browse the directory hierarchy of your 
     77data directory (configured in ``server.ini``) until you reach a NetCDF 
     78dataset.  When you select a "*.nc" file you will be presented with 4 options: 
     79 
     80#. Select the filename to view an HTML summary form of the data. 
     81#. Select the *size* column to download the NetCDF file. 
     82#. Select *DDS* to view the data shape metadata. 
     83#. Select *DAS* to view the attribute metadata. 
     84 
     85From the HTML view you can download the data as ASCII.  Other 
     86responsee handlers can be plugged into PyDAP to allow other formats to 
     87be served. 
    7588 
    7689Remote plotting of OPeNDAP data 
    7790------------------------------- 
    7891 
     92This section will demonstrate connecting to your OPeNDAP server using 
     93a Windows GUI client called *ncBrowse*. 
     94 
     95#. Start ncBrowse from the icon on your desktop 
     96 
     97#. Select "Open OPeNDAP" from the *File* menu 
     98 
     99#. You must specify the full URL of a OPeNDAP dataset in the dialogue 
     100   box.  For instance 
     101   ``http://cirrus.badc.rl.ac.uk/test/famous/air_temperature.nc`` 
     102 
     103#. Explore your way around the interface.  You can do line or contour 
     104   plots and animations through ncBrowse but coastlines aren't plotted 
     105 
    79106 
    80107Python OPeNDAP client 
    81108--------------------- 
     109 
     110We can also interact with the PyDAP server from Python.  To do this restart your server in daemon mode:: 
     111 
     112  Starting server in PID 4855. 
     113  serving on 0.0.0.0:5010 view at http://127.0.0.1:5010 
     114  [Press Ctr-C] 
     115  $ paster serve server.ini --daemon 
     116  Entering daemon mode 
     117  $ 
     118 
     119Now enter ipython and import the pydap client:: 
     120 
     121  $ ipython 
     122  In [1]: import pydap.client 
     123 
     124  In [2]: dap = pydap.client.op 
     125  pydap.client.open_dods  pydap.client.open_url 
     126 
     127  In [2]: dap = pydap.client.open_url('http://cirrus.badc.rl.ac.uk/test/famous/air_temperature.nc') 
     128 
     129  In [3]: dap.keys() 
     130  Out[3]: 
     131  ['bound_longitude', 
     132   'model_level_number', 
     133   'bound_latitude', 
     134   'air_pressure', 
     135   'air_temperature', 
     136   'longitude', 
     137   'bound_time', 
     138   'time', 
     139   'latitude'] 
     140 
     141  In [4]: t = dap['air_temperature'] 
     142 
     143  In [6]: t.shape 
     144  Out[6]: (140, 15, 37, 48) 
     145 
     146  In [7]: t.maps 
     147  Out[7]: {'time': <pydap.model.BaseType object at 0x1091750>, 'air_pressure': <pydap.model.BaseType object at 0x1091810>, 'latitude': <pydap.model.BaseType object at 0x1091910>, 'longitude': <pydap.model.BaseType object at 0x1091a10>} 
     148 
     149  In [8]: t0 = t[0,0] 
     150 
     151  In [9]: t0.shape 
     152  Out[9]: (37, 48) 
     153 
     154  In [10]: t0 
     155  Out[10]: 
     156  array([[ 251.60295105,  251.60295105,  251.60295105, ...,  251.60295105, 
     157           251.60295105,  251.60295105], 
     158         [ 250.52920532,  250.48817444,  250.1905365 , ...,  254.33642578, 
     159           253.29823303,  251.52334595], 
     160         [ 252.8968811 ,  254.03727722,  252.09588623, ...,  262.63522339, 
     161           253.88961792,  252.63334656], 
     162         ..., 
     163         [ 261.28967285,  260.862854  ,  260.41851807, ...,  262.44433594, 
     164           261.64273071,  261.74609375], 
     165         [ 258.36517334,  258.36773682,  258.24761963, ...,  258.69970703, 
     166           258.25183105,  258.31414795], 
     167         [ 257.6817627 ,  257.6817627 ,  257.6817627 , ...,  257.6817627 , 
     168           257.6817627 ,  257.6817627 ]], dtype=float32) 
     169 
  • TI09-UKCollaboration/trunk/DS_Workshop/doc/setup.rst

    r5114 r5118  
    88been given to you on a separate sheet. 
    99 
    10 To log into cirrus use the ``putty`` application.  !TODO: more details 
     10To log into cirrus use the ``putty`` application. 
    1111 
    1212.. note:: 
     
    6969  where you can customize many aspects of IPython's functionality in: 
    7070 
    71   /home/test/.ipython 
    72   Initializing from configuration /home/test/lib/python2.5/site-packages/ipython-0.9.1-py2.5.egg/IPython/UserConfig 
    73  
    74   Successful installation! 
    75  
    76   Please read the sections 'Initial Configuration' and 'Quick Tips' in the 
    77   IPython manual (there are both HTML and PDF versions supplied with the 
    78   distribution) to make sure that your system environment is properly configured 
    79   to take advantage of IPython's features. 
    80  
    81   Important note: the configuration system has changed! The old system is 
    82   still in place, but its setting may be partly overridden by the settings in 
    83   "~/.ipython/ipy_user_conf.py" config file. Please take a look at the file 
    84   if some of the new settings bother you. 
    85  
    86  
    87   Please press <RETURN> to start IPython. 
    88   ********************************************************************** 
    89   Python 2.5.1 (r251:54863, Jan 10 2008, 18:00:49) 
    90   Type "copyright", "credits" or "license" for more information. 
    91  
    92   IPython 0.9.1 -- An enhanced Interactive Python. 
    93   ?         -> Introduction and overview of IPython's features. 
    94   %quickref -> Quick reference. 
    95   help      -> Python's own help system. 
    96   object?   -> Details about 'object'. ?object also works, ?? prints more. 
     71  ... 
    9772 
    9873  In [1]: 
Note: See TracChangeset for help on using the changeset viewer.