source: TI04-geosplat/trunk/pygss/serverConfig.py.bak @ 1660

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI04-geosplat/trunk/pygss/serverConfig.py.bak@6809
Revision 1660, 7.2 KB checked in by astephen, 14 years ago (diff)

Version with overlay of trajectories on top of model fields draft version working before any rigourous testing.

  • Property svn:executable set to *
Line 
1#   Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ).
2#   This software may be distributed under the terms of the
3#   Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt
4
5"""
6serverConfig.py
7===============
8
9Holds the main configuration details that must be set up in order
10for a version of the package to run on a new machine.
11
12Each option below is documented to guide the user through setting
13up the interface.
14
15All these global variables are used in various parts of the
16package. For consistency they are all CAPITALISED.
17
18Some setup instructions follow:
19===============================
20
211. You will need to copy the PCMDI_GRAPHICS folder to the home directory
22of your web user account. This is the directory defined as USER_HOMEDIR
23below.
24
252. In order to allow plotting via the web you must allow your x-server to
26let anyone connect to it. To do this you must run the following command:
27
28xhost +
29
30Note that this might be a security hole. Luckily I don't know too much
31about security.
32
333. The mailing facility is currently switched off using the ERROR_NOTIFICATION
34variable set to 0. If you want the system to mail the administrator when
35an error has occurred then set this variable to 1.
36
37"""
38
39
40# Import python modules
41import os   # used to combine paths in variables below
42
43# DEBUG:
44# Set to 1 if you want to be in DEBUG mode. This reports CGI errors
45# directly to the browser.
46DEBUG=1
47
48# RESTRICTED_DATA:
49# Do you want security on (1) or off (0)?
50# Note that there is no in-built security implementation in
51# gs, just a set of hooks under which your security system
52# can be called.
53RESTRICTED_DATA=0
54
55# PACKAGE_NAME:
56# This will appear as the main title displayed
57# on the web interface.
58PACKAGE_NAME="GeoSPlAT - GeoSpatial Plotting and Animation Tool"
59
60# LOCAL_RULES:
61# Do you want local rules switched on or off (1 or 0)?
62# This will apply to any parts of the code where local
63# modifications have been made and wrapped in an if clause.
64LOCAL_RULES=0
65
66# UNRESTRICTED_CREDIT:
67# Flag on whether there are any resource limits applied.
68# Value of 1 means no restrictions.
69UNRESTRICTED_CREDIT=1
70
71# CREDIT_LIMIT:
72# Limit on the number of credits allowed on any job
73CREDIT_LIMIT=2
74
75# TOKEN_VALID_LIFETIME:
76# Period before security token should expire (in seconds)
77TOKEN_VALID_LIFETIME=60*60*8   # 8 hours
78
79# REGISTRATION_PAGE:
80# For restricted datasets, this is the web page from which users
81# can find registration details.
82REGISTRATION_PAGE="http://yourhost/your_link.html"
83
84# REQUEST_SIZE_LIMIT:
85# A limit in the number of Megabytes for any user requests.
86REQUEST_SIZE_LIMIT=200 # MB
87
88# MAX_FILE_SIZE:
89# A limit on the size of each output file
90# (cannot be greater than REQUEST_SIZE_LIMIT)
91MAX_FILE_SIZE=200 # MB
92if MAX_FILE_SIZE>REQUEST_SIZE_LIMIT:
93    MAX_FILE_SIZE=REQUEST_SIZE_LIMIT
94
95# TIMING_SCALE_FACTOR:
96# Since every system will run at a different speed this scale
97# factor can be adjusted to improve the estimated duration of
98# requests.
99TIMING_SCALE_FACTOR=0.00001
100
101# ADMIN_MAIL_ADDRESS:
102# The e-mail address of the adminstrator for this version. 
103ADMIN_MAIL_ADDRESS="as56@yourhost"
104
105# LOCAL_MAIL_HOST:
106# The outgoing mail box address for the host machine.
107# On many systems you can just use "localhost".
108LOCAL_MAIL_HOST="localhost"
109
110# ADMIN_NOTIFICATION:
111# Set this to 1 if you want to be notified by e-mail when an error has
112# occurred.
113ADMIN_NOTIFICATION=1
114
115# SOAP_SERVER_PORT:
116# Port over which the Web Service (or first method)  will run.
117SOAP_SERVER_PORT=8407
118
119# BASEDIR:
120# Full path to the main package location.
121# "/usr/local/gss" is recommended but you can change it as
122# you wish.
123BASEDIR="/home/as56/abstractWebService/gss"
124
125# OUTPUT_DIR:
126# The full path on the local machine of the output directory.
127OUTPUT_DIR="/srv/www/htdocs/output"
128
129# OUTPUT_DIR_URL:
130# URL path to output directory.
131OUTPUT_DIR_URL="http://localhost/output"
132
133# SESSION_OBJECT_DIR:
134# Location of persistent session objects saved during a session.
135# These are saved as Python module
136SESSION_OBJECT_DIR=os.path.join(BASEDIR, "sessionObjects")
137
138# OUTPUT_FILE_USER:
139# Unix owner (user) for output files
140OUTPUT_FILE_USER="as56"
141
142# OUTPUT_FILE_GROUP:
143# Unix group for output files
144OUTPUT_FILE_GROUP="users"
145
146# OUTPUT_DIR_PERMISSION:
147# Unix permission for access to output directories
148OUTPUT_DIR_PERMISSION=0755
149
150# OUTPUT_FILE_PERMISSION:
151# Unix permission for access to output files
152OUTPUT_FILE_PERMISSION=0644 
153
154# USER_HOMEDIR:
155# Required home directory for CDAT to run.
156# NOTE: This may not be needed for non-graphical applications.
157# However, if you do need it you must copy/create a
158# PCMDI_GRAPHICS sub-directory within this directory in order
159# for CDAT to run.
160USER_HOMEDIR="/var/lib/wwwrun"
161
162# OUTPUT_FORMATS:
163# List of available output formats.
164OUTPUT_FORMATS=["NetCDF", "NASA Ames"]
165
166# LOCAL_PYTHONPATH:
167# Python list of required directories that need to be added
168# to the PYTHONPATH environment variable to access all parts of
169# CDAT and NUMERIC packages.
170LOCAL_PYTHONPATH=['YOUR_CDAT/lib/python2.4',
171    'YOUR_CDAT/lib/python2.4/site-packages',
172    'YOUR_CDAT/cdat/lib/python2.4/site-packages/Numeric',
173    'YOUR_CDAT/lib/python2.3',
174    'YOUR_CDAT/lib/python2.3/site-packages',
175    'YOUR_CDAT/cdat/lib/python2.3/site-packages/Numeric']
176   
177# OUTPUT_FORMATS:
178# List of available output formats.
179OUTPUT_FORMATS=["GIF", "Postscript", "CGM"]
180
181# VCS_TEMPLATES:
182# A dictionary of template names used by the GeoSPlAT package
183VCS_TEMPLATES={"with_levels":"GEOSPLAT_001",
184               "no_levels":"GEOSPLAT_002"}
185
186# SOURCE_NAME:
187# String to appear on plots.
188SOURCE_NAME="Source: British Atmospheric Data Centre (http://badc.nerc.ac.uk)"
189
190# CDAT_BIN_PATH:
191# The bin directory that holds the cdat executable on your system.
192CDAT_BIN_PATH="/usr/local/cdat/bin"
193
194# MESSAGE_TO_USERS:
195# A message that will be written at the top of all web pages underneath
196# the main header.
197MESSAGE_TO_USERS="""This is a test version of the %s so it may contain bugs. Please contact <A HREF="mailto:%s">%s</A> if an error occurs so that we can improve this service.""" % (PACKAGE_NAME, ADMIN_MAIL_ADDRESS, ADMIN_MAIL_ADDRESS)
198
199# PROCESS_LIST_DIR
200# The directory in which GS should store the list of processes
201# currently running jobs. This directory holds a database that is
202# checked and added to each time another GS job is started. If the
203# user is already running a job then they are told there is no
204# resource currently available to them.
205PROCESS_LIST_DIR=os.path.join(BASEDIR, "processes")
206
207# CF_METADATA_GLOBAL_ATTRIBUTES
208# Define a set of core Climate and Forecasts (CF) Metadata Standards
209# for NetCDF compliant global file attributes to put in all files.
210CF_METADATA_GLOBAL_ATTRIBUTES={"comments":"Created by test data extractor."}
211
212# LOG_DIR:
213# Location of log directory.
214LOG_DIR=os.path.join(BASEDIR, "logs")
215
216# ERROR_LOG
217# Location of the error log.
218ERROR_LOG=os.path.join(LOG_DIR, "errors")
219
220# REQUEST_LOG
221# Location of completed request log.
222# Note that requests are only logged if a user has asked to create some
223# data and it has extracted successfully.
224REQUEST_LOG=os.path.join(LOG_DIR, "requests")
225
Note: See TracBrowser for help on using the repository browser.