source: TI03-DataExtractor/branches/old_stuff/dx/doc/products.html @ 793

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/old_stuff/dx/doc/products.html@793
Revision 793, 11.9 KB checked in by astephen, 13 years ago (diff)

Put all the old code in the old_stuff branch.

  • Property svn:executable set to *
Line 
1
2<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module products</title>
4</head><body bgcolor="#f0f0f8">
5
6<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
7<tr bgcolor="#7799ee">
8<td valign=bottom>&nbsp;<br>
9<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>products</strong></big></big></font></td
10><td align=right valign=bottom
11><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/dx-0.1.1/products.py">/usr/local/dx-0.1.1/products.py</a></font></td></tr></table>
12    <p><tt>products.py<br>
13===========<br>
14&nbsp;<br>
15Procucts&nbsp;module&nbsp;for&nbsp;the&nbsp;extractor&nbsp;package.<br>
16&nbsp;<br>
17This&nbsp;module&nbsp;holds&nbsp;the&nbsp;<a href="#Product">Product</a>,&nbsp;Plot,&nbsp;<a href="#DataFile">DataFile</a>&nbsp;and&nbsp;other&nbsp;classes<br>
18used&nbsp;to&nbsp;generate&nbsp;products&nbsp;from&nbsp;the&nbsp;data&nbsp;extractor.</tt></p>
19<p>
20<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
21<tr bgcolor="#aa55cc">
22<td colspan=3 valign=bottom>&nbsp;<br>
23<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
24   
25<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
26<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="cdms.html">cdms</a><br>
27<a href="os.html">os</a><br>
28<a href="re.html">re</a><br>
29</td><td width="25%" valign=top><a href="shelve.html">shelve</a><br>
30<a href="smtplib.html">smtplib</a><br>
31<a href="sys.html">sys</a><br>
32</td><td width="25%" valign=top><a href="time.html">time</a><br>
33<a href="types.html">types</a><br>
34<a href="vcs.html">vcs</a><br>
35</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
36<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
37<tr bgcolor="#ee77aa">
38<td colspan=3 valign=bottom>&nbsp;<br>
39<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
40   
41<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
42<td width="100%"><dl>
43<dt><font face="helvetica, arial"><a href="extractMetadata.html#MetadataExtractor">extractMetadata.MetadataExtractor</a>
44</font></dt><dd>
45<dl>
46<dt><font face="helvetica, arial"><a href="products.html#Product">Product</a>
47</font></dt><dd>
48<dl>
49<dt><font face="helvetica, arial"><a href="products.html#DataFile">DataFile</a>
50</font></dt></dl>
51</dd>
52</dl>
53</dd>
54</dl>
55 <p>
56<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
57<tr bgcolor="#ffc8d8">
58<td colspan=3 valign=bottom>&nbsp;<br>
59<font color="#000000" face="helvetica, arial"><a name="DataFile">class <strong>DataFile</strong></a>(<a href="products.html#Product">Product</a>)</font></td></tr>
60   
61<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
62<td colspan=2><tt><a href="#DataFile">DataFile</a>&nbsp;class&nbsp;-&nbsp;sub-class&nbsp;of&nbsp;<a href="#Product">Product</a>.&nbsp;Holds&nbsp;the&nbsp;process&nbsp;method&nbsp;to&nbsp;actually&nbsp;write&nbsp;the<br>
63output&nbsp;to&nbsp;a&nbsp;file.<br>&nbsp;</tt></td></tr>
64<tr><td>&nbsp;</td>
65<td width="100%"><dl><dt>Method resolution order:</dt>
66<dd><a href="products.html#DataFile">DataFile</a></dd>
67<dd><a href="products.html#Product">Product</a></dd>
68<dd><a href="extractMetadata.html#MetadataExtractor">extractMetadata.MetadataExtractor</a></dd>
69</dl>
70<hr>
71Methods defined here:<br>
72<dl><dt><a name="DataFile-process"><strong>process</strong></a>(self)</dt><dd><tt>process&nbsp;method&nbsp;-&nbsp;creates&nbsp;an&nbsp;output&nbsp;NetCDF&nbsp;file&nbsp;and&nbsp;writes&nbsp;to&nbsp;it.&nbsp;Also&nbsp;checks&nbsp;if<br>
73it&nbsp;can&nbsp;pick&nbsp;up&nbsp;any&nbsp;CF-Compliant&nbsp;Global&nbsp;Attributes&nbsp;to&nbsp;put&nbsp;them&nbsp;in&nbsp;the&nbsp;file.</tt></dd></dl>
74
75<hr>
76Methods inherited from <a href="products.html#Product">Product</a>:<br>
77<dl><dt><a name="DataFile-__init__"><strong>__init__</strong></a>(self, filenames, request)</dt></dl>
78
79<dl><dt><a name="DataFile-getParam"><strong>getParam</strong></a>(self)</dt><dd><tt>getParam&nbsp;method&nbsp;-&nbsp;uses&nbsp;the&nbsp;requests&nbsp;information&nbsp;and&nbsp;data/metadata&nbsp;files<br>
80to&nbsp;extract&nbsp;the&nbsp;data&nbsp;objects&nbsp;requested&nbsp;by&nbsp;the&nbsp;user.&nbsp;These&nbsp;are&nbsp;then&nbsp;stored&nbsp;in<br>
81the&nbsp;list&nbsp;self.<strong>variables</strong>.</tt></dd></dl>
82
83<hr>
84Methods inherited from <a href="extractMetadata.html#MetadataExtractor">extractMetadata.MetadataExtractor</a>:<br>
85<dl><dt><a name="DataFile-getFileList"><strong>getFileList</strong></a>(self)</dt><dd><tt>Method&nbsp;that&nbsp;returns&nbsp;the&nbsp;list&nbsp;of&nbsp;files&nbsp;associated&nbsp;with&nbsp;a&nbsp;particular<br>
86request.&nbsp;If&nbsp;more&nbsp;than&nbsp;one&nbsp;variable&nbsp;has&nbsp;been&nbsp;selected&nbsp;then&nbsp;the&nbsp;list<br>
87contains&nbsp;a&nbsp;concatenation&nbsp;of&nbsp;allVar1Files+allVar2Files.....+allVarNFiles.</tt></dd></dl>
88
89<dl><dt><a name="DataFile-getRequestSizeInBytes"><strong>getRequestSizeInBytes</strong></a>(self)</dt><dd><tt>Method&nbsp;to&nbsp;get&nbsp;the&nbsp;size&nbsp;of&nbsp;the&nbsp;request&nbsp;in&nbsp;bytes.</tt></dd></dl>
90
91<dl><dt><a name="DataFile-getTimeStepCount"><strong>getTimeStepCount</strong></a>(self)</dt><dd><tt>Method&nbsp;to&nbsp;return&nbsp;the&nbsp;number&nbsp;of&nbsp;time&nbsp;steps&nbsp;requested.</tt></dd></dl>
92
93<dl><dt><a name="DataFile-getTimeSteps"><strong>getTimeSteps</strong></a>(self, dset_num<font color="#909090">=1</font>)</dt><dd><tt>Method&nbsp;to&nbsp;return&nbsp;a&nbsp;list&nbsp;of&nbsp;tuples&nbsp;for&nbsp;all&nbsp;timesteps&nbsp;requested.</tt></dd></dl>
94
95</td></tr></table> <p>
96<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
97<tr bgcolor="#ffc8d8">
98<td colspan=3 valign=bottom>&nbsp;<br>
99<font color="#000000" face="helvetica, arial"><a name="Product">class <strong>Product</strong></a>(<a href="extractMetadata.html#MetadataExtractor">extractMetadata.MetadataExtractor</a>)</font></td></tr>
100   
101<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
102<td colspan=2><tt>Base&nbsp;class&nbsp;for&nbsp;extracting&nbsp;data&nbsp;from&nbsp;input&nbsp;files.&nbsp;Other&nbsp;sub-classes&nbsp;actually<br>
103write&nbsp;output&nbsp;to&nbsp;files.<br>&nbsp;</tt></td></tr>
104<tr><td>&nbsp;</td>
105<td width="100%">Methods defined here:<br>
106<dl><dt><a name="Product-__init__"><strong>__init__</strong></a>(self, filenames, request)</dt></dl>
107
108<dl><dt><a name="Product-getParam"><strong>getParam</strong></a>(self)</dt><dd><tt>getParam&nbsp;method&nbsp;-&nbsp;uses&nbsp;the&nbsp;requests&nbsp;information&nbsp;and&nbsp;data/metadata&nbsp;files<br>
109to&nbsp;extract&nbsp;the&nbsp;data&nbsp;objects&nbsp;requested&nbsp;by&nbsp;the&nbsp;user.&nbsp;These&nbsp;are&nbsp;then&nbsp;stored&nbsp;in<br>
110the&nbsp;list&nbsp;self.<strong>variables</strong>.</tt></dd></dl>
111
112<hr>
113Methods inherited from <a href="extractMetadata.html#MetadataExtractor">extractMetadata.MetadataExtractor</a>:<br>
114<dl><dt><a name="Product-getFileList"><strong>getFileList</strong></a>(self)</dt><dd><tt>Method&nbsp;that&nbsp;returns&nbsp;the&nbsp;list&nbsp;of&nbsp;files&nbsp;associated&nbsp;with&nbsp;a&nbsp;particular<br>
115request.&nbsp;If&nbsp;more&nbsp;than&nbsp;one&nbsp;variable&nbsp;has&nbsp;been&nbsp;selected&nbsp;then&nbsp;the&nbsp;list<br>
116contains&nbsp;a&nbsp;concatenation&nbsp;of&nbsp;allVar1Files+allVar2Files.....+allVarNFiles.</tt></dd></dl>
117
118<dl><dt><a name="Product-getRequestSizeInBytes"><strong>getRequestSizeInBytes</strong></a>(self)</dt><dd><tt>Method&nbsp;to&nbsp;get&nbsp;the&nbsp;size&nbsp;of&nbsp;the&nbsp;request&nbsp;in&nbsp;bytes.</tt></dd></dl>
119
120<dl><dt><a name="Product-getTimeStepCount"><strong>getTimeStepCount</strong></a>(self)</dt><dd><tt>Method&nbsp;to&nbsp;return&nbsp;the&nbsp;number&nbsp;of&nbsp;time&nbsp;steps&nbsp;requested.</tt></dd></dl>
121
122<dl><dt><a name="Product-getTimeSteps"><strong>getTimeSteps</strong></a>(self, dset_num<font color="#909090">=1</font>)</dt><dd><tt>Method&nbsp;to&nbsp;return&nbsp;a&nbsp;list&nbsp;of&nbsp;tuples&nbsp;for&nbsp;all&nbsp;timesteps&nbsp;requested.</tt></dd></dl>
123
124</td></tr></table></td></tr></table><p>
125<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
126<tr bgcolor="#55aa55">
127<td colspan=3 valign=bottom>&nbsp;<br>
128<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
129   
130<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
131<td width="100%"><strong>ADMIN_MAIL_ADDRESS</strong> = 'badc@rl.ac.uk'<br>
132<strong>ADMIN_NOTIFICATION</strong> = 0<br>
133<strong>BASEDIR</strong> = '/usr/local/dx_wv'<br>
134<strong>CDAT_BIN_PATH</strong> = '/usr/local/cdat/bin'<br>
135<strong>CF_METADATA_GLOBAL_ATTRIBUTES</strong> = {'comments': 'Created by test data extractor.'}<br>
136<strong>CGI_NAME</strong> = 'http://localhost/cgi-bin/dxui-0.1.1.py'<br>
137<strong>DATASETS</strong> = {'Test Data Group 1': (('Test Dataset 1', '/usr/local/dx_wv/testdata/testdata1.xml', 'dataset1-unused-code'),), 'Test Data Group 2': (('Test Dataset 2', '/usr/local/dx_wv/testdata/testdata2.xml', 'dataset2-unused-code'),), 'Test Data Group 3': (('Test Dataset 3', '/usr/local/dx_wv/testdata/testdata3.xml', 'dataset3-unused-code'),)}<br>
138<strong>DATASET_GROUPS</strong> = {'Test Data Group 1': None, 'Test Data Group 2': None, 'Test Data Group 3': None}<br>
139<strong>DEBUG</strong> = 1<br>
140<strong>DOMAIN_PARAMS</strong> = ('start_time', 'end_time', 'time_interval', 'horiz_domain', 'resolution', 'vertical_units', 'vertical_domain', 'output_type')<br>
141<strong>EXTRAS_DIR</strong> = '/dx_extra'<br>
142<strong>HORIZ_KEYS</strong> = ('northernExtent', 'easternExtent', 'southernExtent', 'westernExtent')<br>
143<strong>HTML_DIR</strong> = '/usr/local/dx_wv/html'<br>
144<strong>HTTP_HEADER</strong> = 'Content-Type: text/html<font color="#c040c0">\n\n</font>'<br>
145<strong>HTTP_OUTPUT_DIR</strong> = 'http://localhost/output'<br>
146<strong>LEFT_LOGO</strong> = 'dx_logo.jpg'<br>
147<strong>LOCAL_CGI_NAME</strong> = '/srv/www/cgi-bin/dxui-0.1.1.py'<br>
148<strong>LOCAL_MAIL_HOST</strong> = 'outbox.rl.ac.uk'<br>
149<strong>LOCAL_PYTHONPATH</strong> = ['/usr/local/badcdat/lib', '/usr/local/badcdat/lib/python', '/home/tornado/internal/badc/software/pythonlib/badc', '/usr/local/cdat/lib/python2.3', '/usr/local/cdat/lib/python2.3/site-packages', '/usr/local/cdat/lib/python2.3/site-packages/Numeric']<br>
150<strong>LOCAL_RULES</strong> = 0<br>
151<strong>LOGO_DIR</strong> = '/dx_extra/logos'<br>
152<strong>MAP_APPLET</strong> = '/dx_extra/LiveMap_30/extractorMap.html'<br>
153<strong>MESSAGE_TO_USERS</strong> = 'This is a test version of the Data Extractor so ...error occurs so that we can improve this service.'<br>
154<strong>OUTPUT_DIR</strong> = '/srv/www/htdocs/output'<br>
155<strong>OUTPUT_DIR_PERMISSION</strong> = 488<br>
156<strong>OUTPUT_FILE_GROUP</strong> = 'users'<br>
157<strong>OUTPUT_FILE_PERMISSION</strong> = 416<br>
158<strong>OUTPUT_FILE_USER</strong> = 'wwwrun'<br>
159<strong>OUTPUT_FORMATS</strong> = ['NetCDF']<br>
160<strong>PACKAGE_NAME</strong> = 'Data Extractor'<br>
161<strong>REGISTRATION_PAGE</strong> = 'http://badc.nerc.ac.uk/data/list_all_datasets.html?source=home'<br>
162<strong>REQUEST_DIR</strong> = '/usr/local/dx_wv/requests'<br>
163<strong>REQUEST_SIZE_LIMIT</strong> = 100<br>
164<strong>RESTRICTED_DATA</strong> = 0<br>
165<strong>RIGHT_LOGO</strong> = 'dx_logo.jpg'<br>
166<strong>STAGES</strong> = ['DatasetGroupPage', 'DatasetPage', 'VariablesPage', 'DomainPage', 'ResultsPage']<br>
167<strong>TIME_KEYS</strong> = ('year', 'month', 'day', 'hour', 'min', 'sec')<br>
168<strong>TIMING_SCALE_FACTOR</strong> = 0.001<br>
169<strong>USER_HOMEDIR</strong> = '/var/lib/wwwrun'<br>
170<strong>VISUALISOR_NAME</strong> = '/cgi-bin/splatui-0.1.1.py'<br>
171<strong>helpMessage</strong> = '<font color="#c040c0">\n\n</font>times.py<font color="#c040c0">\n</font>========<font color="#c040c0">\n\n</font>Holds the class DateTime th...00:00:00", "1999-01-22 12:00:00", (6, "hour"))<font color="#c040c0">\n\n\n</font>'</td></tr></table>
172</body></html>
Note: See TracBrowser for help on using the repository browser.