source: anuga_work/production/new_south_wales/batemans_bay/project.py @ 6699

Last change on this file since 6699 was 6699, checked in by ole, 15 years ago

Comment on event

File size: 10.2 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 = 'new_south_wales'
19scenario_name = 'batemans_bay'
20scenario_folder = 'batemans_bay_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                # difference between MSL and HAT (1.0)
29
30# the event number or the mux file name
31##event_number = 58129  #1 in 200 yr Puyesgur
32##event_number = 58115    #1 in 500 yr
33##event_number = 58226    #1 in 1000 yr
34##event_number = 58284    #1 in 2000 yr
35##event_number = 58286    #1 in 5000 yr
36##event_number = 58242    #1 in 10000 yr Puysegur
37event_number = 58368    #1 in 10000 yr Puysegur
38##event_number = 51436    #1 in 10000 yr New Hebrides
39
40alpha = 0.1             # smoothing parameter for mesh
41friction=0.01           # manning's friction coefficient
42starttime=0             # start time for simulation
43finaltime=10000         # 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, event_number, 'viz']
62
63#-------------------------------------------------------------------------------
64# Input Data
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 = ['1a',# Topographic data
71                        '1b',
72                        '2b',
73                        '2a_3',
74                        '3b',
75                        '3a',
76                        '4a_2',
77                        '4b',
78                        'off1',
79                        'off2',
80                        'off3',
81                        'bbhd',
82                        'sd100031996_p',
83                        'sd100031996_p2',
84                        'sd100031996_p3',
85                        'sd100031996_p4']
86                   
87# Format for point is x,y,elevation (with header)
88point_filenames = ['SD100031996_jgriffin_clip.csv',
89                   'tomaga_offshore_AHD_MGA_1997.csv',
90                   'Batemans_BBHD_MGA_1995.csv',
91                   'moruya_AHD_MGA_2000.csv']
92         
93
94### Add csv header list to all files in point_filenames
95##headerlist = ['x', 'y', 'elevation']
96##for f in point_filenames:
97##    add_csv_header(join(topographies_folder, f), headerlist)
98
99    # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
100# Used in build_elevation.py
101# Format for points easting,northing (no header)
102bounding_polygon_filename = 'bounding_polygon.csv'
103bounding_polygon_maxarea = 100000
104
105# INTERIOR REGIONS -  for designing the mesh
106# Used in run_model.py
107# Format for points easting,northing (no header)
108
109interior_regions_data = [['area_of_interest.csv', 500],
110                        ['area_of_significance.csv', 2500],
111                        ['shallow_water.csv', 10000]]
112
113
114# LAND - used to set the initial stage/water to be offcoast only
115# Used in run_model.py.  Format for points easting,northing (no header)
116land_initial_conditions_filename = [['initial_condition_extend.csv', 0]]
117                                 
118
119# GAUGES - for creating timeseries at a specific point
120# Used in get_timeseries.py. 
121# Format easting,northing,name,elevation (with header)
122gauges_filename = 'gauges.csv'
123
124# BUILDINGS EXPOSURE - for identifying inundated houses
125# Used in run_building_inundation.py
126# Format latitude,longitude etc (geographic)
127##building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
128
129# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
130# NOTE: when files are put together the points must be in sequence
131# For ease go clockwise!
132# Check the run_model.py for boundary_tags
133
134# Thinned ordering file from Hazard Map (geographic)
135# Format is index,latitude,longitude (with header)
136urs_order_filename = 'thinned_boundary_ordering_extend.csv'
137
138# Landward bounding points
139# Format easting,northing (no header)
140landward_boundary_filename = 'landward_boundary_extend.csv'
141
142# MUX input filename.
143# If a meta-file from EventSelection is used, set 'multi-mux' to True.
144# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
145##mux_input_filename = event_number # to be found in event_folder
146                                    # (ie boundaries/event_number/)
147##multi_mux = False
148mux_input_filename = 'event.list'
149multi_mux = True
150
151zone = 56
152#-------------------------------------------------------------------------------
153# Clipping regions for export to asc and regions for clipping data
154# Final inundation maps should only be created in regions of the finest mesh
155#-------------------------------------------------------------------------------
156
157# ASCII export grid for Busselton
158xminBusselton = 340000
159xmaxBusselton = 352000
160yminBusselton = 6271500
161ymaxBusselton = 6280000
162
163# ASCII export grid for Bunbury
164xminBunbury = 369000
165xmaxBunbury = 381000
166yminBunbury = 6308000
167ymaxBunbury = 6316500
168
169################################################################################
170################################################################################
171####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
172################################################################################
173################################################################################
174
175# Get system user and host names.
176# These values can be used to distinguish between two similar runs by two
177# different users or runs by the same user on two different machines.
178user = get_user_name()
179host = get_host_name()
180
181# Environment variable names.
182# The inundation directory, not the data directory.
183ENV_INUNDATIONHOME = 'INUNDATIONHOME'
184
185# Path to MUX data
186ENV_MUXHOME = 'MUXHOME'
187
188#-------------------------------------------------------------------------------
189# Output Elevation Data
190#-------------------------------------------------------------------------------
191
192# Output filename for elevation
193# this is a combination of all the data generated in build_elevation.py
194combined_elevation_basename = scenario_name + '_combined_elevation'
195
196#-------------------------------------------------------------------------------
197# Directory Structure
198#-------------------------------------------------------------------------------
199
200# determines time for setting up output directories
201time = strftime('%Y%m%d_%H%M%S', localtime()) 
202gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
203build_time = time + '_build'
204run_time = time + '_run_'
205
206# create paths generated from environment variables.
207home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
208muxhome = os.getenv(ENV_MUXHOME)
209   
210# check various directories/files that must exist
211anuga_folder = join(home, state, scenario_folder, 'anuga')
212topographies_folder = join(anuga_folder, 'topographies')
213polygons_folder = join(anuga_folder, 'polygons')
214boundaries_folder = join(anuga_folder, 'boundaries')
215output_folder = join(anuga_folder, 'outputs')
216gauges_folder = join(anuga_folder, 'gauges')
217meshes_folder = join(anuga_folder, 'meshes')
218event_folder = join(boundaries_folder, str(event_number))
219
220# MUX data files
221# Directory containing the MUX data files to be used with EventSelection.
222mux_data_folder = join(muxhome, 'mux')
223
224#-------------------------------------------------------------------------------
225# Location of input and output data
226#-------------------------------------------------------------------------------
227
228# Convert the user output_comment to a string for run_model.py
229output_comment = ('_'.join([str(x) for x in output_comment if x != user])
230                  + '_' + user)
231
232# The absolute pathname of the all elevation, generated in build_elevation.py
233combined_elevation = join(topographies_folder, combined_elevation_basename)
234
235# The absolute pathname of the mesh, generated in run_model.py
236meshes = join(meshes_folder, scenario_name) + '.msh'
237
238# The pathname for the urs order points, used within build_urs_boundary.py
239urs_order = join(boundaries_folder, urs_order_filename)
240
241# The absolute pathname for the landward points of the bounding polygon,
242# Used within run_model.py)
243landward_boundary = join(boundaries_folder, landward_boundary_filename)
244
245# The absolute pathname for the .sts file, generated in build_boundary.py
246event_sts = join(event_folder, scenario_name)
247
248# The absolute pathname for the output folder names
249# Used for build_elevation.py
250output_build = join(output_folder, build_time) + '_' + str(user) 
251# Used for run_model.py
252output_run = join(output_folder, run_time) + output_comment
253# Used by post processing
254output_run_time = join(output_run, scenario_name) 
255
256# The absolute pathname for the gauges file
257# Used for get_timeseries.py
258gauges = join(gauges_folder, gauges_filename)       
259
260# The absolute pathname for the building file
261# Used for run_building_inundation.py
262##building_exposure = join(gauges_folder, building_exposure_filename)
263
264# full path to where MUX files (or meta-files) live
265mux_input = join(event_folder, mux_input_filename)
266
Note: See TracBrowser for help on using the repository browser.