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

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