source: anuga_work/production/mandurah_storm_surge_2009/project.py @ 7647

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

updates to mandurah and bunbury storm surge models

File size: 11.8 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 = 'western_australia'
19#scenario_name = 'case_a'
20scenario_name = 'alby_waves'
21scenario_folder = 'mandurah_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_waves'
35#event = 'case_a'        # case_a - baseline historic TC Alby event
36                        # case_b - worst case scenarion current climate (current coastline)
37                        # case_c - worst case 1.1m SLR current climate (current coastline)
38                        # case_d - worst case 0.8m SLR current climate (current coastline)
39                        # case_e - worst case 0.5m SLR current climate (current coastline)
40tide = 0                # Mean Sea Level = 0,
41                                                # Highest Astronomical Tide = 0.6 m for Bunbury - CHECK THIS!
42alpha = 0.1             # smoothing parameter for mesh
43friction = 0.01           # manning's friction coefficient
44starttime = 0             # start time for simulation
45finaltime = 86400         # final time for simulation - 24 hours for TC Alby
46
47setup = 'storm_surge_final'         # This can be one of four values
48                                                #    trial - coarsest mesh, fast
49                                                #    basic - coarse mesh
50                                                #    final - fine mesh, slowest
51                                                #    storm_surge_final - as 'final' but with a longer yieldstep (12 mins)
52
53#-------------------------------------------------------------------------------
54# Output filename
55#
56# Your output filename should be unique between different runs on different data.
57# The list of items below will be used to create a file in your output directory.
58# Your user name and time+date will be automatically added.  For example,
59#     [setup, tide, event_number]
60# will result in a filename like
61#     20090212_091046_run_final_0_27283_rwilson
62#-------------------------------------------------------------------------------
63
64output_comment = [setup, tide, event]    # event_number will have to
65                                                                                                # change to something relevent
66                                                                                                # for storm surge
67
68#-------------------------------------------------------------------------------
69# Input Data
70#-------------------------------------------------------------------------------
71
72# ELEVATION DATA
73# Used in build_elevation.py
74# Format for ascii grids, as produced in ArcGIS + a projection file
75
76# This set of ascii files is utilising the original input data, not the GEMS elevation model
77ascii_grid_filenames = ['m_peel_aoi',           # Original 1m lidar for PEEL, clipped to AOI
78                        'ph10m_ss']             # Mosiaced PEEL-HARVEY Lidar, resampled to 10m,
79                                                # clipped to bounding polygon
80 
81# This set of ascii files utilises the GEMS elevation model - for comparison with GEMS inundation
82# ascii_grid_filenames = ['Man_25m',            # this is the latest 25m DEM from GEMS
83                                                                # 'ph10m_ss']   # this is to fill in areas not covered by the
84                                                                # GEMS grid and is derived from the 10m resampled LiDAR from DoT
85
86# Format for point is x,y,elevation (with header)
87# Don't use these for comparison with GEMS inundation
88point_filenames = ['DpiU1A03_ss.csv',           # Bathymetric LiDAR data from DPI, clipped to bounding polygon
89                  'MA-46893-SNDS_AHD.csv',      # These files contain inf-fill bathymetry for
90                  'MS0205HY_AHD.csv',           # the Peel & Harvey estuaries, as well as around
91                  'MS0404_AHD.csv',             # the canals
92                  'YU0403HY_AHD.csv',
93                  'original_data_ss.csv']       # This data is from what we had available for the 2007
94                                                # tsunami simulations for SW WA, clipped to bounding polygon
95
96# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
97# Used in build_elevation.py & run_model.py
98# Format for points easting,northing (no header)
99bounding_polygon_filename = 'bounding_polygon_ss.csv'
100bounding_polygon_maxarea = 50000
101
102# INTERIOR REGIONS -  for designing the mesh
103# Used in run_model.py
104# Format for points easting,northing (no header)                   
105interior_regions_data = [['intermediate.csv', 2500],
106                                                ['area_of_interest.csv', 100],
107                        ['canals_nth_2.csv', 100],  # Canal regions used to force mesh to fit canals
108                        ['canals_nth_3.csv', 100],   
109                        ['canals_nth_4.csv', 100], 
110                        ['canals_nth_5.csv', 100],
111                        ['canals_nth_6.csv', 100], 
112                        ['canals_nth_7.csv', 100],
113                        ['canals_nth_8.csv', 100], 
114                        ['canals_nth_9.csv', 100],
115                        ['canals_nth_10.csv', 100], 
116                        ['canals_nth_11.csv', 100],
117                        ['canals_nth_12.csv', 100], 
118                        ['canals_sth_1.csv', 100],
119                        ['canals_sth_2.csv', 100], 
120                        ['canals_sth_3.csv', 100],
121                        ['canals_sth_4.csv', 100], 
122                        ['canals_sth_5.csv', 100],
123                        ['canals_sth_6.csv', 100]]
124                       
125# LAND - used to set the initial stage/water to be offcoast only
126# Used in run_model.py.  Format for points easting,northing (no header)
127land_initial_conditions_filename = [['initial_conditions.csv', 0]]
128
129# GEMS order filename
130# Format is index,northing, easting, elevation (without header)
131gems_order_filename = 'gems_boundary_order_thinned.csv'
132
133# GAUGES - for creating timeseries at a specific point
134# Used in get_timeseries.py. 
135# Format easting,northing,name,elevation (with header)
136gauges_filename = 'gauges_mandurah_edited.csv'
137
138# BUILDINGS EXPOSURE - for identifying inundated houses
139# Used in run_building_inundation.py
140# Format latitude,longitude etc (geographic)
141building_exposure_filename = '' # from NEXIS
142
143# Landward bounding points
144# Format easting,northing (no header)
145landward_boundary_filename = 'landward_boundary.csv'
146
147### MUX input filename.
148### If a meta-file from EventSelection is used, set 'multi-mux' to True.
149### If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
150####mux_input_filename = event_number # to be found in event_folder
151##                                    # (ie boundaries/event_number/)
152####multi_mux = False
153##mux_input_filename = 'event.list'
154##multi_mux = True
155
156#-------------------------------------------------------------------------------
157# Clipping regions for export to asc and regions for clipping data
158# Final inundation maps should only be created in regions of the finest mesh
159#-------------------------------------------------------------------------------
160
161# Elevation clip box - used when there are multiple overlapping datasets and you want to use
162# one over another in an area of overlap
163#elevation_clip_box_filename = 'gems_elevation_clip_box.csv'
164elevation_clip_box_filename = 'area_of_interest.csv'
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 = 'INUNDATIONHOME'
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')
210event_folder = join(boundaries_folder, str(event))
211
212#-------------------------------------------------------------------------------
213# Location of input and output data
214#-------------------------------------------------------------------------------
215
216# Convert the user output_comment to a string for run_model.py
217output_comment = ('_'.join([str(x) for x in output_comment if x != user])
218                                  + '_' + user)
219
220# The absolute pathname of the all elevation, generated in build_elevation.py
221combined_elevation = join(topographies_folder, combined_elevation_basename)
222
223
224# The pathname for the GEMS order points
225if gems_order_filename:
226        gems_order = join(boundaries_folder, gems_order_filename)
227
228# The absolute pathname for the landward points of the bounding polygon,
229# Used within run_model.py)
230if landward_boundary_filename:
231        landward_boundary = join(boundaries_folder, landward_boundary_filename)
232
233# The absolute pathname for the .sts file, generated in build_boundary.py
234event_sts = join(event_folder, scenario_name)
235
236# The absolute pathname for the output folder names
237# Used for build_elevation.py
238output_build = join(output_folder, build_time) + '_' + str(user) 
239# Used for run_model.py
240output_run = join(output_folder, run_time) + output_comment
241# Used by post processing
242output_run_time = join(output_run, scenario_name) 
243
244# The absolute pathname of the mesh, generated in run_model.py
245meshes = join(output_run, scenario_name) + '.msh'
246
247# The absolute pathname for the gauges file
248# Used for get_timeseries.py
249if gauges_filename:
250        gauges = join(gauges_folder, gauges_filename)       
251
252# The absolute pathname for the building file
253# Used for run_building_inundation.py
254if building_exposure_filename:
255        building_exposure = join(gauges_folder, building_exposure_filename)
256
257### The absolute pathname for the image file
258### Used for get_runup.py
259##if images_filename:
260##    images = join(polygons_folder, images_filename)
261
262### full path to where MUX files (or meta-files) live
263##mux_input = join(event_folder, mux_input_filename)
264
265
Note: See TracBrowser for help on using the repository browser.