source: branches/anuga_1_1/anuga_work/production/bunbury_storm_surge_2009/project.py @ 7678

Last change on this file since 7678 was 7678, checked in by fountain, 14 years ago

updates to bunbury storm surge model

File size: 12.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#import anuga.utilities.log as log
11
12
13#-------------------------------------------------------------------------------
14# Directory setup
15#-------------------------------------------------------------------------------
16
17# this section needs to be updated to reflect the modelled community.
18# Note, the user needs to set up the directory system accordingly
19state = 'western_australia'
20scenario_name = 'alby_coarse'
21scenario_folder = 'bunbury_storm_surge_scenario_2009'
22
23#-------------------------------------------------------------------------------
24# Initial Conditions
25#-------------------------------------------------------------------------------
26
27# Model specific parameters.
28# One or all can be changed each time the run_model script is executed
29
30
31central_meridian = None # Central meridian for projection (optional)
32zone = 50               # UTM zone for projection
33
34event = 'alby_coarse'
35tide = 0                # Mean Sea Level = 0,
36                                                # Highest Astronomical Tide = 0.6 m for Bunbury - CHECK THIS!
37alpha = 0.1             # smoothing parameter for mesh
38friction = 0.01           # manning's friction coefficient
39starttime = 86400          # start time for simulation - -equivalent to 0000h 4 April 1978
40duration = 86400
41#finaltime = 172800         # final time for simulation - 24 hours for TC Alby
42
43setup = 'storm_surge_final'      # This can be one of four values
44                                                #    trial - coarsest mesh, fast
45                                                #    basic - coarse mesh
46                                                #    final - fine mesh, slowest
47                                                #    storm_surge_final - as 'final' but with a longer yieldstep (12 mins)
48                                               
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]    # event_number will have to
62                                                                                                # change to something relevent
63                                                                                                # for storm surge
64
65#-------------------------------------------------------------------------------
66# Input Data
67#-------------------------------------------------------------------------------
68
69# ELEVATION DATA
70# Used in build_elevation.py
71# Format for ascii grids, as produced in ArcGIS + a projection file
72ascii_grid_filenames = ['swwa_10m_IC',                  # LiDAR mosaiced and resampled to 10m, clipped to IC to remove values in water
73                                                'bunbury_5m_IC']        # Bunbury LiDar grid resampled to 5 m (1m data caused memory errors)
74                                            # and clipped to Initial Conditions (to remove values in water)
75                                                # 'bunbury_nth_a',      # 1m LiDAR from WA Dot - nothern quarter (file split as too large for dem2pts)
76                                                # 'bunbury_nth_b',      # 1m LiDAR from WA Dot - 2nd northmost quarter (file split as too large for dem2pts)
77                                                # 'bunbury_sth_a',      # 1m LiDAR from WA Dot - 2nd southmost quarter (file split as too large for dem2pts)
78                                                # 'bunbury_sth_b']      # 1m LiDAR from WA Dot - southern quarter (file split as too large for dem2pts)
79                                                # 'bunbury_aoi']                # 1m LiDAR from WA DoT - clipped to area_of_interest.csv
80                                                # 'bunbury_nth',                # 1m LiDAR from WA Dot - nothern half (file split as too large for dem2pts)
81                                                # 'bunbury_sth']                # 1m LiDAR data from WA DoT - southern half
82                                               
83               
84# Format for point is x,y,elevation (with header)
85point_filenames = ['DPI.txt',                                                   # Bathymetry data from DPI
86                   'Busselton_Chart.txt',                       # see Busselton Tsunami Scenario 2009
87                   'Busselton_NavyFinal.txt',           # see Busselton Tsunami Scenario 2009
88                   'Busselton_250m.txt',                # see Busselton Tsunami Scenario 2009
89                   'DPI5U1A02_01a_edited_v2.txt',       # Bathymetric LiDAR from DPI - split into manageable pieces and edited so
90                   'DPI5U1A02_01b_edited_v2.txt',           # depths below 0 m are negative, and all soundings on land (ie positive)
91                   'DPI5U1A02_01c_edited_v2.txt',       # are removed as these are not corrected to "bare earth".
92                   'DPI5U1A02_01d_edited_v2.txt',
93                   'DPI5U1A02_01e_edited_v2.txt',
94                   'Bunbury_2010_shoalest.csv',         # Multibeam infill for areas not captured in the Bathy LiDAR
95                   # 'bu0506hy_cut.csv',                  # Hydro survey of Leschenault Inlet and Estuary, extra colums cut
96                   'Leschenault_TIN.txt']               # TIN created over the Leschenault Estuary and Inlet]                                   
97
98# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
99# Used in build_elevation.py & run_model.py
100# Format for points easting,northing (no header)
101bounding_polygon_filename = 'bounding_polygon_GEMS.csv' #'bounding_polygon_ss.csv'
102bounding_polygon_maxarea = 50000
103
104
105# INTERIOR REGIONS -  for designing the mesh
106# Used in run_model.py
107# Format for points easting,northing (no header)                   
108interior_regions_data = [['intermediate.csv', 2500],
109                         #['aoi_small.csv',200],
110                         ['area_of_interest.csv', 200],
111                         ['storm_gate_area.csv', 20]]
112                         # ['stormgates.csv', 1]]
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_conditions.csv', 0]]
117
118# GEMS order filename - should be in same direction as landward boundary points ie clockwise or anti-clockwise
119# Format is northing, easting (without header)
120gems_order_filename = 'gems_boundary_order_thinned.csv'
121
122# Storm gate filename
123# Format is as for a building file to be read by csv2building_polygons,
124# easting, northing, id, floors (with header)
125storm_gate_filename = 'storm_gates_large.csv' #'storm_gates.csv'
126
127# GAUGES - for creating timeseries at a specific point
128# Used in get_timeseries.py. 
129# Format easting,northing,name,elevation (with header)
130gauges_filename = 'gauges.csv'
131
132# BUILDINGS EXPOSURE - for identifying inundated houses
133# Used in run_building_inundation.py
134# Format latitude,longitude etc (geographic)
135building_exposure_filename = '' # from NEXIS
136
137# Landward bounding points
138# Format easting,northing (no header) - should be in same direction as GEMS order filename ie clockwise or anti-clockwise
139landward_boundary_filename = 'landward_boundary.csv'
140
141### MUX input filename.
142### If a meta-file from EventSelection is used, set 'multi-mux' to True.
143### If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
144####mux_input_filename = event_number # to be found in event_folder
145##                                    # (ie boundaries/event_number/)
146####multi_mux = False
147##mux_input_filename = 'event.list'
148##multi_mux = True
149
150#-------------------------------------------------------------------------------
151# Clipping regions for export to asc and regions for clipping data
152# Final inundation maps should only be created in regions of the finest mesh
153#-------------------------------------------------------------------------------
154
155# Elevation clip box - used when there are multiple overlapping datasets and you want to use
156# one over another in an area of overlap
157elevation_clip_box_filename = 'elevation_clip_box.csv'
158
159################################################################################
160################################################################################
161####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
162################################################################################
163################################################################################
164
165# Get system user and host names.
166# These values can be used to distinguish between two similar runs by two
167# different users or runs by the same user on two different machines.
168user = get_user_name()
169host = get_host_name()
170
171# Environment variable names.
172# The inundation directory, not the data directory.
173ENV_INUNDATIONHOME = 'INUNDATIONHOME'
174
175#-------------------------------------------------------------------------------
176# Output Elevation Data
177#-------------------------------------------------------------------------------
178
179# Output filename for elevation
180# this is a combination of all the data generated in build_elevation.py
181combined_elevation_basename = scenario_name + '_combined_elevation'
182
183#-------------------------------------------------------------------------------
184# Directory Structure
185#-------------------------------------------------------------------------------
186
187# determines time for setting up output directories
188time = strftime('%Y%m%d_%H%M%S', localtime()) 
189gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
190build_time = time + '_build'
191run_time = time + '_run_'
192
193# create paths generated from environment variables.
194home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
195       
196# check various directories/files that must exist
197anuga_folder = join(home, state, scenario_folder, 'anuga')
198topographies_folder = join(anuga_folder, 'topographies')
199polygons_folder = join(anuga_folder, 'polygons')
200boundaries_folder = join(anuga_folder, 'boundaries')
201output_folder = join(anuga_folder, 'outputs')
202gauges_folder = join(anuga_folder, 'gauges')
203event_folder = join(boundaries_folder, str(event))
204
205#-------------------------------------------------------------------------------
206# Location of input and output data
207#-------------------------------------------------------------------------------
208
209# Convert the user output_comment to a string for run_model.py
210output_comment = ('_'.join([str(x) for x in output_comment if x != user])
211                                  + '_' + user)
212
213# The absolute pathname of the all elevation, generated in build_elevation.py
214combined_elevation = join(topographies_folder, combined_elevation_basename)
215
216
217# The pathname for the GEMS order points
218if gems_order_filename:
219        gems_order = join(boundaries_folder, gems_order_filename)
220
221# The absolute pathname for the landward points of the bounding polygon,
222# Used within run_model.py)
223if landward_boundary_filename:
224        landward_boundary = join(boundaries_folder, landward_boundary_filename)
225
226# The absolute pathname for the .sts file, generated in build_boundary.py
227event_sts = join(event_folder, scenario_name)
228
229# The absolute pathname for the output folder names
230# Used for build_elevation.py
231output_build = join(output_folder, build_time) + '_' + str(user) 
232# Used for run_model.py
233output_run = join(output_folder, run_time) + output_comment
234# Used by post processing
235output_run_time = join(output_run, scenario_name) 
236
237# The absolute pathname of the mesh, generated in run_model.py
238meshes = join(output_run, scenario_name) + '.msh'
239
240# Log file name
241#log.log_filename = join(output_run, scenario_name) + '.log'
242
243# The absolute pathname for the storm gate file
244# Used for run_model.py
245if storm_gate_filename:
246        storm_gate = join(polygons_folder, storm_gate_filename) 
247
248# The absolute pathname for the gauges file
249# Used for get_timeseries.py
250if gauges_filename:
251        gauges = join(gauges_folder, gauges_filename)       
252
253# The absolute pathname for the building file
254# Used for run_building_inundation.py
255if building_exposure_filename:
256        building_exposure = join(gauges_folder, building_exposure_filename)
257
258### The absolute pathname for the image file
259### Used for get_runup.py
260##if images_filename:
261##    images = join(polygons_folder, images_filename)
262
263### full path to where MUX files (or meta-files) live
264##mux_input = join(event_folder, mux_input_filename)
265
266# Areas for export of results
267# Used in export_results_max.py
268
269# Storm gate area:
270xminStorm_gate=373515
271xmaxStorm_gate=373582
272yminStorm_gate=6312314
273ymaxStorm_gate=6312358
Note: See TracBrowser for help on using the repository browser.