source: anuga_work/production/gold_coast_2009/For_DVD/project.py @ 7306

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

Scripts to be included on Gold Coast DVD with AGD's report

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#-------------------------------------------------------------------------------
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]]
93PriorityArea_filename = 'PriorityAreas.csv'
94
95# LAND - used to set the initial stage/water to be offcoast only
96# Used in run_model.py.  Format for points easting,northing (no header)
97land_initial_conditions_filename = [['initial_conditions.csv', 0]]
98
99# GAUGES - for creating timeseries at a specific point
100# Used in get_timeseries.py. 
101# Format easting,northing,name,elevation (with header)
102gauges_filename = 'gauges.csv'
103
104# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
105# NOTE: when files are put together the points must be in sequence
106# For ease go clockwise!
107# Check the run_model.py for boundary_tags
108
109# Thinned ordering file from Hazard Map (geographic)
110# Format is index,latitude,longitude (with header)
111urs_order_filename = 'urs_order.csv'
112
113# Landward bounding points
114# Format easting,northing (no header)
115landward_boundary_filename = 'landward_boundary.csv'
116
117#-------------------------------------------------------------------------------
118# Clipping regions for export to asc and regions for clipping data
119# Final inundation maps should only be created in regions of the finest mesh
120#-------------------------------------------------------------------------------
121
122
123
124
125################################################################################
126################################################################################
127####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
128################################################################################
129################################################################################
130
131# Get system user and host names.
132# These values can be used to distinguish between two similar runs by two
133# different users or runs by the same user on two different machines.
134user = get_user_name()
135host = get_host_name()
136
137# Environment variable names.
138# The inundation directory, not the data directory.
139ENV_INUNDATIONHOME = 'INUNDATIONHOME'
140
141#-------------------------------------------------------------------------------
142# Output Elevation Data
143#-------------------------------------------------------------------------------
144
145# Output filename for elevation
146# this is a combination of all the data generated in build_elevation.py
147combined_elevation_basename = scenario_name + '_combined_elevation'
148
149#-------------------------------------------------------------------------------
150# Directory Structure
151#-------------------------------------------------------------------------------
152
153# determines time for setting up output directories
154time = strftime('%Y%m%d_%H%M%S', localtime()) 
155gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
156build_time = time + '_build'
157run_time = time + '_run_'
158
159# create paths generated from environment variables.
160home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
161muxhome = os.getenv(ENV_MUXHOME)
162   
163# check various directories/files that must exist
164anuga_folder = join(home, state, scenario_folder, 'anuga')
165topographies_folder = join(anuga_folder, 'topographies')
166polygons_folder = join(anuga_folder, 'polygons')
167boundaries_folder = join(anuga_folder, 'boundaries')
168output_folder = join(anuga_folder, 'outputs')
169gauges_folder = join(anuga_folder, 'gauges')
170event_folder = join(boundaries_folder, str(event_number))
171
172#-------------------------------------------------------------------------------
173# Location of input and output data
174#-------------------------------------------------------------------------------
175
176# Convert the user output_comment to a string for run_model.py
177output_comment = ('_'.join([str(x) for x in output_comment if x != user])
178                  + '_' + user)
179
180# The absolute pathname of the all elevation, generated in build_elevation.py
181combined_elevation = join(topographies_folder, combined_elevation_basename)
182
183
184# The pathname for the urs order points, used within build_urs_boundary.py
185if urs_order_filename:
186    urs_order = join(boundaries_folder, urs_order_filename)
187
188# The absolute pathname for the landward points of the bounding polygon,
189# Used within run_model.py)
190if landward_boundary_filename:
191    landward_boundary = join(boundaries_folder, landward_boundary_filename)
192
193# The absolute pathname for the .sts file, generated in build_boundary.py
194event_sts = join(event_folder, scenario_name)
195
196# The absolute pathname for the output folder names
197# Used for build_elevation.py
198output_build = join(output_folder, build_time) + '_' + str(user) 
199# Used for run_model.py
200output_run = join(output_folder, run_time) + output_comment
201# Used by post processing
202output_run_time = join(output_run, scenario_name) 
203
204# The absolute pathname of the mesh, generated in run_model.py
205meshes = join(output_run, scenario_name) + '.msh'
206
207# The absolute pathname for the gauges file
208# Used for get_timeseries.py
209if gauges_filename:
210    gauges = join(gauges_folder, gauges_filename)       
211
212# The absolute pathname for the building file
213# Used for run_building_inundation.py
214if building_exposure_filename:
215    building_exposure = join(gauges_folder, building_exposure_filename)
216
217# The absolute pathname for the image file
218# Used for get_runup.py
219if images_filename:
220    images = join(polygons_folder, images_filename)
221
222
223
Note: See TracBrowser for help on using the repository browser.