source: anuga_work/production/bunbury_storm_surge_2009/project.py @ 7658

Last change on this file since 7658 was 7658, checked in by fountain, 13 years ago

updates to bunbury storm surge model

File size: 11.5 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
40finaltime = 172800         # final time for simulation - 24 hours for TC Alby
41
42setup = 'storm_surge_final'      # This can be one of four values
43                                                #    trial - coarsest mesh, fast
44                                                #    basic - coarse mesh
45                                                #    final - fine mesh, slowest
46                                                #    storm_surge_final - as 'final' but with a longer yieldstep (12 mins)
47                                               
48
49#-------------------------------------------------------------------------------
50# Output filename
51#
52# Your output filename should be unique between different runs on different data.
53# The list of items below will be used to create a file in your output directory.
54# Your user name and time+date will be automatically added.  For example,
55#     [setup, tide, event_number]
56# will result in a filename like
57#     20090212_091046_run_final_0_27283_rwilson
58#-------------------------------------------------------------------------------
59
60output_comment = [setup, tide, event]    # event_number will have to
61                                                                                                # change to something relevent
62                                                                                                # for storm surge
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 = ['swwa_10m_IC',                  # LiDAR mosaiced and resampled to 10m, clipped to IC to remove values in water
72                                                'bunbury_5m_IC']        # Bunbury LiDar grid resampled to 5 m (1m data caused memory errors)
73                                            # and clipped to Initial Conditions (to remove values in water)
74                                                # 'bunbury_nth_a',      # 1m LiDAR from WA Dot - nothern quarter (file split as too large for dem2pts)
75                                                # 'bunbury_nth_b',      # 1m LiDAR from WA Dot - 2nd northmost quarter (file split as too large for dem2pts)
76                                                # 'bunbury_sth_a',      # 1m LiDAR from WA Dot - 2nd southmost quarter (file split as too large for dem2pts)
77                                                # 'bunbury_sth_b']      # 1m LiDAR from WA Dot - southern quarter (file split as too large for dem2pts)
78                                                # 'bunbury_aoi']                # 1m LiDAR from WA DoT - clipped to area_of_interest.csv
79                                                # 'bunbury_nth',                # 1m LiDAR from WA Dot - nothern half (file split as too large for dem2pts)
80                                                # 'bunbury_sth']                # 1m LiDAR data from WA DoT - southern half
81                                               
82               
83# Format for point is x,y,elevation (with header)
84point_filenames = ['DPI.txt',                                                   # Bathymetry data from DPI
85                   'Busselton_Chart_Clip_ss.txt',               # Clipped from Busselton_Chart  - see Busselton Tsunami Scenario 2009
86                   'Busselton_NavyFinal_Clip_ss.txt',   # Clipped from Busselton_NavyFinal - see Busselton Tsunami Scenario 2009
87                   'DPI5U1A02_01a_edited_v2.txt',          # Bathymetric LiDAR from DPI - split into manageable pieces and edited so
88                   'DPI5U1A02_01b_edited_v2.txt',               # depths below 0 m are negative, and all soundings on land (ie positive)
89                   'DPI5U1A02_01c_edited_v2.txt',          # are removed as these are not corrected to "bare earth".
90                   'DPI5U1A02_01d_edited_v2.txt',
91                   'DPI5U1A02_01e_edited_v2.txt']
92#                   'Leschenault_TIN.txt']               # TIN created over the Leschenault Estuary and Inlet]                                 
93
94# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
95# Used in build_elevation.py & run_model.py
96# Format for points easting,northing (no header)
97bounding_polygon_filename = 'bounding_polygon_ss.csv'
98bounding_polygon_maxarea = 50000
99
100# INTERIOR REGIONS -  for designing the mesh
101# Used in run_model.py
102# Format for points easting,northing (no header)                   
103interior_regions_data = [['intermediate.csv', 2500],
104                         ['area_of_interest.csv', 100],
105                         ['storm_gate_area.csv', 1],
106                         ['stormgates.csv', 1]]
107
108# LAND - used to set the initial stage/water to be offcoast only
109# Used in run_model.py.  Format for points easting,northing (no header)
110land_initial_conditions_filename = [['initial_conditions.csv', 0]]
111
112# GEMS order filename
113# Format is index,northing, easting, elevation (without header)
114gems_order_filename = 'gems_boundary_order_thinned.csv'
115
116# Storm gate filename
117# Format is as for a building file to be read by csv2building_polygons,
118# easting, northing, id, floors (with header)
119storm_gate_filename = 'storm_gates.csv'
120
121# GAUGES - for creating timeseries at a specific point
122# Used in get_timeseries.py. 
123# Format easting,northing,name,elevation (with header)
124gauges_filename = 'gauges.csv'
125
126# BUILDINGS EXPOSURE - for identifying inundated houses
127# Used in run_building_inundation.py
128# Format latitude,longitude etc (geographic)
129building_exposure_filename = '' # from NEXIS
130
131# Landward bounding points
132# Format easting,northing (no header)
133landward_boundary_filename = 'landward_boundary.csv'
134
135### MUX input filename.
136### If a meta-file from EventSelection is used, set 'multi-mux' to True.
137### If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
138####mux_input_filename = event_number # to be found in event_folder
139##                                    # (ie boundaries/event_number/)
140####multi_mux = False
141##mux_input_filename = 'event.list'
142##multi_mux = True
143
144#-------------------------------------------------------------------------------
145# Clipping regions for export to asc and regions for clipping data
146# Final inundation maps should only be created in regions of the finest mesh
147#-------------------------------------------------------------------------------
148
149# Elevation clip box - used when there are multiple overlapping datasets and you want to use
150# one over another in an area of overlap
151elevation_clip_box_filename = 'elevation_clip_box.csv'
152
153################################################################################
154################################################################################
155####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
156################################################################################
157################################################################################
158
159# Get system user and host names.
160# These values can be used to distinguish between two similar runs by two
161# different users or runs by the same user on two different machines.
162user = get_user_name()
163host = get_host_name()
164
165# Environment variable names.
166# The inundation directory, not the data directory.
167ENV_INUNDATIONHOME = 'INUNDATIONHOME'
168
169#-------------------------------------------------------------------------------
170# Output Elevation Data
171#-------------------------------------------------------------------------------
172
173# Output filename for elevation
174# this is a combination of all the data generated in build_elevation.py
175combined_elevation_basename = scenario_name + '_combined_elevation'
176
177#-------------------------------------------------------------------------------
178# Directory Structure
179#-------------------------------------------------------------------------------
180
181# determines time for setting up output directories
182time = strftime('%Y%m%d_%H%M%S', localtime()) 
183gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
184build_time = time + '_build'
185run_time = time + '_run_'
186
187# create paths generated from environment variables.
188home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
189       
190# check various directories/files that must exist
191anuga_folder = join(home, state, scenario_folder, 'anuga')
192topographies_folder = join(anuga_folder, 'topographies')
193polygons_folder = join(anuga_folder, 'polygons')
194boundaries_folder = join(anuga_folder, 'boundaries')
195output_folder = join(anuga_folder, 'outputs')
196gauges_folder = join(anuga_folder, 'gauges')
197event_folder = join(boundaries_folder, str(event))
198
199#-------------------------------------------------------------------------------
200# Location of input and output data
201#-------------------------------------------------------------------------------
202
203# Convert the user output_comment to a string for run_model.py
204output_comment = ('_'.join([str(x) for x in output_comment if x != user])
205                                  + '_' + user)
206
207# The absolute pathname of the all elevation, generated in build_elevation.py
208combined_elevation = join(topographies_folder, combined_elevation_basename)
209
210
211# The pathname for the GEMS order points
212if gems_order_filename:
213        gems_order = join(boundaries_folder, gems_order_filename)
214
215# The absolute pathname for the landward points of the bounding polygon,
216# Used within run_model.py)
217if landward_boundary_filename:
218        landward_boundary = join(boundaries_folder, landward_boundary_filename)
219
220# The absolute pathname for the .sts file, generated in build_boundary.py
221event_sts = join(event_folder, scenario_name)
222
223# The absolute pathname for the output folder names
224# Used for build_elevation.py
225output_build = join(output_folder, build_time) + '_' + str(user) 
226# Used for run_model.py
227output_run = join(output_folder, run_time) + output_comment
228# Used by post processing
229output_run_time = join(output_run, scenario_name) 
230
231# The absolute pathname of the mesh, generated in run_model.py
232meshes = join(output_run, scenario_name) + '.msh'
233
234# Log file name
235#log.log_filename = join(output_run, scenario_name) + '.log'
236
237# The absolute pathname for the storm gate file
238# Used for run_model.py
239if storm_gate_filename:
240        storm_gate = join(polygons_folder, storm_gate_filename) 
241
242# The absolute pathname for the gauges file
243# Used for get_timeseries.py
244if gauges_filename:
245        gauges = join(gauges_folder, gauges_filename)       
246
247# The absolute pathname for the building file
248# Used for run_building_inundation.py
249if building_exposure_filename:
250        building_exposure = join(gauges_folder, building_exposure_filename)
251
252### The absolute pathname for the image file
253### Used for get_runup.py
254##if images_filename:
255##    images = join(polygons_folder, images_filename)
256
257### full path to where MUX files (or meta-files) live
258##mux_input = join(event_folder, mux_input_filename)
259
260
Note: See TracBrowser for help on using the repository browser.