source: DVD_images/extra_files/GoldCoast/project/project.py @ 7363

Last change on this file since 7363 was 7363, checked in by Leharne, 15 years ago

changes to gold coast html files

  • Property svn:executable set to *
File size: 8.8 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#-------------------------------------------------------------------------------
13# Directory setup
14#-------------------------------------------------------------------------------
15
16# this section needs to be updated to reflect the modelled community.
17# Note, the user needs to set up the directory system accordingly
18state = 'queensland'
19scenario_name = 'gold_coast'
20scenario_folder = 'gold_coast_tsunami_scenario_2009'
21
22#-------------------------------------------------------------------------------
23# Initial Conditions
24#-------------------------------------------------------------------------------
25
26# Model specific parameters.
27# One or all can be changed each time the run_model script is executed
28tide = 0                # Mean Sea Level = 0,
29                        # Highest Astronomical Tide = 1.1 m for Gold Coast
30zone = 56               # Specify UTM zone of model
31event_number = 51469    # See details below
32alpha = 0.1             # smoothing parameter for mesh
33friction = 0.01         # manning's friction coefficient
34starttime = 0           # start time for simulation
35finaltime = 80000       # 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# Event Details:
42# Event 1 (51469)
43# Source Zone = New Hebrides
44# Return Period = 10 000 years
45# Wave height at 100 m = 2.3 m
46#
47# Event 2 (51392)
48# Source Zone = New Hebrides
49# Return Period = 5000 years
50# Wave height at 100 m = 1.7 m
51#
52# Event 3 (50863)
53# Source Zone = New Hebrides
54# Return Period = 200 years
55# Wave height at 100 m = 0.3 m
56
57#-------------------------------------------------------------------------------
58# Output filename
59#
60# Your output filename should be unique between different runs on different data.
61# The list of items below will be used to create a file in your output directory.
62# Your user name and time+date will be automatically added.  For example,
63#     [setup, tide, event_number]
64# will result in a filename like
65#     20090212_091046_run_final_0_27283_rwilson
66#-------------------------------------------------------------------------------
67
68output_comment = [setup, tide, event_number]
69
70#-------------------------------------------------------------------------------
71# Input Datayieldstep
72#-------------------------------------------------------------------------------
73
74# ELEVATION DATA
75# Used in build_elevation.py
76# Format for ascii grids, as produced in ArcGIS + a projection file
77ascii_grid_filenames = []
78
79# Format for point is x,y,elevation (with header)
80point_filenames = []
81
82# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
83# Used in build_elevation.py
84# Format for points easting,northing (no header)
85bounding_polygon_filename = 'bounding_polygon.csv'
86bounding_polygon_maxarea = 125000
87
88# INTERIOR REGIONS -  for designing the mesh
89# Used in run_model.py
90# Format for points easting,northing (no header)                   
91interior_regions_data = [['area_of_interest.csv', 500],
92                         ['intermediate.csv', 25000]]
93# If there are several priority areas of interest these can be defined
94# in a single .csv file with headers 'easting, northing, id, value' where
95# id defines each polygon, and the value is the mesh resolution
96PriorityArea_filename = None
97
98# LAND - used to set the initial stage/water to be offcoast only
99# Used in run_model.py.  Format for points easting,northing (no header)
100land_initial_conditions_filename = [['initial_conditions.csv', 0]]
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 = 'gauges.csv'
106
107# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
108# NOTE: when files are put together the points must be in sequence
109# For ease go clockwise!
110# Check the run_model.py for boundary_tags
111
112# Thinned ordering file from Hazard Map (geographic)
113# Format is index,latitude,longitude (with header)
114urs_order_filename = 'urs_order.csv'
115
116# Landward bounding points
117# Format easting,northing (no header)
118landward_boundary_filename = 'landward_boundary.csv'
119
120#-------------------------------------------------------------------------------
121# Clipping regions for export to asc and regions for clipping data
122# Final inundation maps should only be created in regions of the finest mesh
123#-------------------------------------------------------------------------------
124
125
126
127
128################################################################################
129################################################################################
130####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
131################################################################################
132################################################################################
133
134# Get system user and host names.
135# These values can be used to distinguish between two similar runs by two
136# different users or runs by the same user on two different machines.
137user = get_user_name()
138host = get_host_name()
139
140# Environment variable names.
141# The inundation directory, not the data directory.
142ENV_INUNDATIONHOME = 'ANUGADATA'
143
144#-------------------------------------------------------------------------------
145# Output Elevation Data
146#-------------------------------------------------------------------------------
147
148# Output filename for elevation
149# this is a combination of all the data generated in build_elevation.py
150combined_elevation_basename = scenario_name + '_combined_elevation'
151
152#-------------------------------------------------------------------------------
153# Directory Structure
154#-------------------------------------------------------------------------------
155
156# determines time for setting up output directories
157time = strftime('%Y%m%d_%H%M%S', localtime()) 
158gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
159build_time = time + '_build'
160run_time = time + '_run_'
161
162# create paths generated from environment variables.
163home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
164   
165# check various directories/files that must exist
166anuga_folder = join(home, state, scenario_folder, 'anuga')
167topographies_folder = join(anuga_folder, 'topographies')
168polygons_folder = join(anuga_folder, 'polygons')
169boundaries_folder = join(anuga_folder, 'boundaries')
170output_folder = join(anuga_folder, 'outputs')
171gauges_folder = join(anuga_folder, 'gauges')
172event_folder = join(boundaries_folder, str(event_number))
173
174#-------------------------------------------------------------------------------
175# Location of input and output data
176#-------------------------------------------------------------------------------
177
178# Convert the user output_comment to a string for run_model.py
179output_comment = ('_'.join([str(x) for x in output_comment if x != user])
180                  + '_' + user)
181
182# The absolute pathname of the all elevation, generated in build_elevation.py
183combined_elevation = join(topographies_folder, combined_elevation_basename)
184
185
186# The pathname for the urs order points, used within build_urs_boundary.py
187if urs_order_filename:
188    urs_order = join(boundaries_folder, urs_order_filename)
189
190# The absolute pathname for the landward points of the bounding polygon,
191# Used within run_model.py)
192if landward_boundary_filename:
193    landward_boundary = join(boundaries_folder, landward_boundary_filename)
194
195# The absolute pathname for the .sts file, generated in build_boundary.py
196event_sts = join(event_folder, scenario_name)
197
198# The absolute pathname for the output folder names
199# Used for build_elevation.py
200output_build = join(output_folder, build_time) + '_' + str(user) 
201# Used for run_model.py
202output_run = join(output_folder, run_time) + output_comment
203# Used by post processing
204output_run_time = join(output_run, scenario_name) 
205
206# The absolute pathname of the mesh, generated in run_model.py
207meshes = join(output_run, scenario_name) + '.msh'
208
209# The absolute pathname for the gauges file
210# Used for get_timeseries.py
211if gauges_filename:
212    gauges = join(gauges_folder, gauges_filename)       
213
214# The absolute pathname for the building file
215# Used for run_building_inundation.py
216if building_exposure_filename:
217    building_exposure = join(gauges_folder, building_exposure_filename)
218
219# The absolute pathname for the image file
220# Used for get_runup.py
221if images_filename:
222    images = join(polygons_folder, images_filename)
223
224
225
Note: See TracBrowser for help on using the repository browser.