source: anuga_work/production/hobart_2009/For_DVD/project.py @ 7332

Last change on this file since 7332 was 7332, checked in by kristy, 15 years ago

rearranged order of paramaters

File size: 8.7 KB
Line 
1"""
2This file contains all your file and directory definitions
3for elevation, meshes and outputs.
4"""
5
6import os
7from anuga.utilities.system_tools import get_user_name, get_host_name
8from time import localtime, strftime, gmtime
9from os.path import join, exists
10
11#-------------------------------------------------------------------------------
12# Directory setup
13#-------------------------------------------------------------------------------
14
15# this section needs to be updated to reflect the modelled community.
16# Note, the user needs to set up the directory system accordingly
17state = 'tasmania'
18scenario_name = 'hobart'
19scenario_folder = 'hobart_tsunami_scenario_2009'
20
21#-------------------------------------------------------------------------------
22# Initial Conditions
23#-------------------------------------------------------------------------------
24
25# Model specific parameters.
26# One or all can be changed each time the run_model script is executed
27tide = 0                # difference between MSL and HAT in metres
28                        # Highest Astronomical Tide = 0.8 m for Hobart
29zone = 55               # specify UTM zone of model
30event_number = 58260    # 58280, 64477 the event number - See event_chosen.xls
31                        # in anuga/boundaries for more details
32alpha = 0.1             # smoothing parameter for mesh
33friction=0.01           # manning's friction coefficient
34starttime=0             # start time for simulation
35finaltime=65000         # final time for simulation
36
37setup = 'final'         # This can be one of three values
38                        #    trial - coarsest mesh, fast
39                        #    basic - coarse mesh
40                        #    final - fine mesh, slowest
41
42#-------------------------------------------------------------------------------
43# Output filename
44#
45# Your output filename should be unique between different runs on different data.
46# The list of items below will be used to create a file in your output directory.
47# Your user name and time+date will be automatically added.  For example,
48#     [setup, tide, event_number]
49# will result in a filename like
50#     20090212_091046_run_final_0_27283_rwilson
51#-------------------------------------------------------------------------------
52
53output_comment = [setup, tide, event_number]
54
55#-------------------------------------------------------------------------------
56# Input Data
57#-------------------------------------------------------------------------------
58
59# ELEVATION DATA
60# Used in build_elevation.py
61ascii_grid_filenames = []
62## Add csv header list to all files in point_filenames
63##headerlist = ['x', 'y', 'elevation']
64point_filenames = []
65
66
67# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
68# Used in build_elevation.py
69# Format for points easting,northing (no header)
70bounding_polygon_filename = 'bounding_polygon.csv'
71bounding_polygon_maxarea = 1000000
72
73# INTERIOR REGIONS -  for designing the mesh
74# Used in run_model.py
75# Single CSV file for each polygon
76# Format for points easting,northing (no header)                   
77interior_regions_data = [['aos1.csv', 1500], 
78                         ['aos2.csv', 1500],
79                         ['sw.csv', 30000]]
80# Single CSV file for multiple polygon
81# Format for points easting,northing,id,value (where id=polygon number and
82#                                                    value = maximum area)                   
83PriorityArea_filename = 'PriorityAreas.csv'
84   
85# LAND - used to set the initial stage/water to be offcoast only
86# Used in run_model.py.  Format for points easting,northing (no header)
87land_initial_conditions_filename = 'initial_conditions.csv'
88
89# FINAL BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
90# NOTE: when files are put together the points must be in sequence
91# For ease go clockwise!
92# Check the run_model.py for boundary_tags
93
94# Thinned ordering file from Hazard Map (geographic)
95# Format is index,latitude,longitude (with header)
96urs_order_filename = 'urs_order.csv'
97
98# Landward bounding points
99# Format easting,northing (no header)
100landward_boundary_filename = 'landward_boundary.csv'
101
102# GAUGES - for creating timeseries at a specific point
103# Used in get_timeseries.py. 
104# Format easting,northing,name,elevation (with header)
105gauges_filename = 'time_of_arrival_all.csv' #'TideGaugesPoints.csv'
106                                            #'tsunamipointsMGA.csv'
107
108#-------------------------------------------------------------------------------
109# Clipping regions for export to asc and regions for clipping data
110# Final inundation maps should only be created in regions of the finest mesh
111#-------------------------------------------------------------------------------
112
113# ASCII export grid for Hobart Communities
114xminHobart = 520000
115xmaxHobart = 545000
116yminHobart = 5230000
117ymaxHobart = 5260000
118
119# ASCII export grid for North West Communities
120xminNW = 548000
121xmaxNW = 561000
122yminNW = 5250000
123ymaxNW = 5258000
124
125# ASCII export grid for South Communities
126xminSouth = 523000
127xmaxSouth = 533300
128yminSouth = 5197000
129ymaxSouth = 5214000
130
131
132################################################################################
133################################################################################
134####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
135################################################################################
136################################################################################
137
138# Get system user and host names.
139# These values can be used to distinguish between two similar runs by two
140# different users or runs by the same user on two different machines.
141user = get_user_name()
142host = get_host_name()
143
144# Environment variable names.
145# The inundation directory, not the data directory.
146ENV_INUNDATIONHOME = 'INUNDATIONHOME'
147
148#-------------------------------------------------------------------------------
149# Output Elevation Data
150#-------------------------------------------------------------------------------
151
152# Output filename for elevation
153# this is a combination of all the data generated in build_elevation.py
154combined_elevation_basename = scenario_name + '_combined_elevation'
155
156#-------------------------------------------------------------------------------
157# Directory Structure
158#-------------------------------------------------------------------------------
159
160# determines time for setting up output directories
161time = strftime('%Y%m%d_%H%M%S', localtime()) 
162gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
163build_time = time + '_build'
164run_time = time + '_run_'
165
166# create paths generated from environment variables.
167home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
168   
169# check various directories/files that must exist
170anuga_folder = join(home, state, scenario_folder, 'anuga')
171topographies_folder = join(anuga_folder, 'topographies')
172polygons_folder = join(anuga_folder, 'polygons')
173boundaries_folder = join(anuga_folder, 'boundaries')
174output_folder = join(anuga_folder, 'outputs')
175gauges_folder = join(anuga_folder, 'gauges')
176event_folder = join(boundaries_folder, str(event_number))
177
178#-------------------------------------------------------------------------------
179# Location of input and output data
180#-------------------------------------------------------------------------------
181
182# Convert the user output_comment to a string for run_model.py
183output_comment = ('_'.join([str(x) for x in output_comment if x != user])
184                  + '_' + user)
185
186# The absolute pathname of the all elevation, generated in build_elevation.py
187combined_elevation = join(topographies_folder, combined_elevation_basename)
188
189# The pathname for the urs order points, used within build_urs_boundary.py
190if urs_order_filename:
191    urs_order = join(boundaries_folder, urs_order_filename)
192
193# The absolute pathname for the landward points of the bounding polygon,
194# Used within run_model.py)
195if landward_boundary_filename:
196    landward_boundary = join(boundaries_folder, landward_boundary_filename)
197
198# The absolute pathname for the .sts file, generated in build_boundary.py
199event_sts = join(event_folder, scenario_name)
200
201# The absolute pathname for the output folder names
202# Used for build_elevation.py
203output_build = join(output_folder, build_time) + '_' + str(user) 
204# Used for run_model.py
205output_run = join(output_folder, run_time) + output_comment
206# Used by post processing
207output_run_time = join(output_run, scenario_name) 
208
209# The absolute pathname of the mesh, generated in run_model.py
210meshes = join(output_run, scenario_name) + '.msh'
211
212# The absolute pathname for the gauges file
213# Used for get_timeseries.py
214if gauges_filename:
215    gauges = join(gauges_folder, gauges_filename)       
216
217#Multiple polygons in one CSV file to make internal polygons
218PriorityAreas = join(polygons_folder, PriorityArea_filename)
219
220
Note: See TracBrowser for help on using the repository browser.