source: DVD_images/extra_files/BatemansBay/project/project.py @ 7357

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