source: anuga_work/production/gold_coast_2009/project.py @ 6741

Last change on this file since 6741 was 6657, checked in by Leharne, 16 years ago

improvements to gold coast tsunami scenario

File size: 9.6 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
28
29model_description = 'small_v2'
30
31tide = 0                # difference between MSL and HAT in metres
32zone = 56               # specify zone of model
33##event_number = 51469    # the event number or the mux file name with:
34                          # 2.32m waveheight
35##event_number = 51423    # 1.5m waveheight
36##event_number= 51348    # 1.0m waveheight
37##event_number = 51253    # 0.5m wavheight
38##event_number = 50863    # 0.3m wavheight from New Hebridies
39event_number = 62833    # 0.3m waveheight from SE Solomons
40alpha = 0.1             # smoothing parameter for mesh
41friction=0.01           # manning's friction coefficient
42starttime=0             # start time for simulation
43finaltime=80000         # final time for simulation
44
45setup = 'final'         # This can be one of three values
46                        #    trial - coarsest mesh, fast
47                        #    basic - coarse mesh
48                        #    final - fine mesh, slowest
49
50#-------------------------------------------------------------------------------
51# Output filename
52#
53# Your output filename should be unique between different runs on different data.
54# The list of items below will be used to create a file in your output directory.
55# Your user name and time+date will be automatically added.  For example,
56#     [setup, tide, event_number]
57# will result in a filename like
58#     20090212_091046_run_final_0_27283_rwilson
59#-------------------------------------------------------------------------------
60
61output_comment = [setup, tide, model_description, event_number]
62
63#-------------------------------------------------------------------------------
64# Input Datayieldstep
65#-------------------------------------------------------------------------------
66
67# ELEVATION DATA
68# Used in build_elevation.py
69# Format for ascii grids, as produced in ArcGIS + a projection file
70ascii_grid_filenames = ['GC_DTM_30m',   # Supplied DTM
71                        'grid250m'] # Supplemented data from 2005 250m grid
72
73# Format for point is x,y,elevation (with header)
74point_filenames = []
75
76### Add csv header list to all files in point_filenames
77##headerlist = ['x', 'y', 'elevation']
78##for f in point_filenames:
79##    add_csv_header(join(topographies_folder, f), headerlist)
80
81# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
82# Used in build_elevation.py
83# Format for points easting,northing (no header)
84bounding_polygon_filename = 'bounding_polygon_sml_v2.csv'
85bounding_polygon_maxarea = 125000
86
87# INTERIOR REGIONS -  for designing the mesh
88# Used in run_model.py
89# Format for points easting,northing (no header)                   
90interior_regions_data = [['buffer_3km_simplify_sml_v2.csv', 500]]
91
92# LAND - used to set the initial stage/water to be offcoast only
93# Used in run_model.py.  Format for points easting,northing (no header)
94land_initial_conditions_filename = [['initial_conditions_sml_v2.csv', 0]]
95
96# GAUGES - for creating timeseries at a specific point
97# Used in get_timeseries.py. 
98# Format easting,northing,name,elevation (with header)
99gauges_filename = 'gauges.csv'
100
101# BUILDINGS EXPOSURE - for identifying inundated houses
102# Used in run_building_inundation.py
103# Format latitude,longitude etc (geographic)
104building_exposure_filename = 'gold_coast_res_clip.csv' # from NEXIS
105
106# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
107# NOTE: when files are put together the points must be in sequence
108# For ease go clockwise!
109# Check the run_model.py for boundary_tags
110
111# Thinned ordering file from Hazard Map (geographic)
112# Format is index,latitude,longitude (with header)
113urs_order_filename = 'urs_order_sml_v2.csv'
114
115# Landward bounding points
116# Format easting,northing (no header)
117landward_boundary_filename = 'landward_boundary_sml_v2.csv'
118
119# MUX input filename.
120# If a meta-file from EventSelection is used, set 'multi-mux' to True.
121# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
122##mux_input_filename = event_number # to be found in event_folder
123                                    # (ie boundaries/event_number/)
124##multi_mux = False
125mux_input_filename = 'event.list'
126multi_mux = True
127
128#-------------------------------------------------------------------------------
129# Clipping regions for export to asc and regions for clipping data
130# Final inundation maps should only be created in regions of the finest mesh
131#-------------------------------------------------------------------------------
132
133# ASCII export grid for Gold Coast
134xminGold_Coast = 541500
135xmaxGold_Coast = 546000
136yminGold_Coast = 6893500
137ymaxGold_Coast = 6898500
138
139# ASCII export grid for dune study
140xminDune = 536710
141xmaxDune = 556150
142yminDune = 6881125
143ymaxDune = 6926860
144
145################################################################################
146################################################################################
147####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
148################################################################################
149################################################################################
150
151# Get system user and host names.
152# These values can be used to distinguish between two similar runs by two
153# different users or runs by the same user on two different machines.
154user = get_user_name()
155host = get_host_name()
156
157# Environment variable names.
158# The inundation directory, not the data directory.
159ENV_INUNDATIONHOME = 'INUNDATIONHOME'
160
161# Path to MUX data
162ENV_MUXHOME = 'MUXHOME'
163
164#-------------------------------------------------------------------------------
165# Output Elevation Data
166#-------------------------------------------------------------------------------
167
168# Output filename for elevation
169# this is a combination of all the data generated in build_elevation.py
170combined_elevation_basename = scenario_name + '_combined_elevation'
171
172#-------------------------------------------------------------------------------
173# Directory Structure
174#-------------------------------------------------------------------------------
175
176# determines time for setting up output directories
177time = strftime('%Y%m%d_%H%M%S', localtime()) 
178gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
179build_time = time + '_build'
180run_time = time + '_run_'
181
182# create paths generated from environment variables.
183home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
184muxhome = os.getenv(ENV_MUXHOME)
185   
186# check various directories/files that must exist
187anuga_folder = join(home, state, scenario_folder, 'anuga')
188topographies_folder = join(anuga_folder, 'topographies')
189polygons_folder = join(anuga_folder, 'polygons')
190boundaries_folder = join(anuga_folder, 'boundaries')
191output_folder = join(anuga_folder, 'outputs')
192gauges_folder = join(anuga_folder, 'gauges')
193event_folder = join(boundaries_folder, str(event_number))
194
195# MUX data files
196# Directory containing the MUX data files to be used with EventSelection.
197mux_data_folder = join(muxhome, 'mux')
198
199#-------------------------------------------------------------------------------
200# Location of input and output data
201#-------------------------------------------------------------------------------
202
203# Convert the user output_comment to a string for run_model.py
204output_comment = ('_'.join([str(x) for x in output_comment if x != user])
205                  + '_' + user)
206
207# The absolute pathname of the all elevation, generated in build_elevation.py
208combined_elevation = join(topographies_folder, combined_elevation_basename)
209
210
211# The pathname for the urs order points, used within build_urs_boundary.py
212if urs_order_filename:
213    urs_order = join(boundaries_folder, urs_order_filename)
214
215# The absolute pathname for the landward points of the bounding polygon,
216# Used within run_model.py)
217if landward_boundary_filename:
218    landward_boundary = join(boundaries_folder, landward_boundary_filename)
219
220# The absolute pathname for the .sts file, generated in build_boundary.py
221event_sts = join(event_folder, scenario_name)
222
223# The absolute pathname for the output folder names
224# Used for build_elevation.py
225output_build = join(output_folder, build_time) + '_' + str(user) 
226# Used for run_model.py
227output_run = join(output_folder, run_time) + output_comment
228# Used by post processing
229output_run_time = join(output_run, scenario_name) 
230
231# The absolute pathname of the mesh, generated in run_model.py
232meshes = join(output_run, scenario_name) + '.msh'
233
234# The absolute pathname for the gauges file
235# Used for get_timeseries.py
236if gauges_filename:
237    gauges = join(gauges_folder, gauges_filename)       
238
239# The absolute pathname for the building file
240# Used for run_building_inundation.py
241if building_exposure_filename:
242    building_exposure = join(gauges_folder, building_exposure_filename)
243
244# full path to where MUX files (or meta-files) live
245mux_input = join(event_folder, mux_input_filename)
246
Note: See TracBrowser for help on using the repository browser.