source: anuga_work/production/busselton/standardised_version/project.py @ 6335

Last change on this file since 6335 was 6335, checked in by rwilson, 15 years ago

Final save (except for moving build_urs_boundary.py somewhere).

File size: 9.7 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'
19scenario_name = 'busselton'
20scenario_folder = 'busselton_tsunami_scenario'
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                # difference between MSL and HAT
29event_number = 27197    # the event number
30alpha = 0.1             # smoothing parameter for mesh
31friction=0.01           # manning's friction coefficient
32starttime=0             # start time for simulation
33finaltime=80000         # final time for simulation
34
35setup = 'final'         # This can be one of three values
36                        #    trial - coarsest mesh, fast
37                        #    basic - coarse mesh
38                        #    final - fine mesh, slowest
39
40#-------------------------------------------------------------------------------
41# Output filename
42#
43# Your output filename should be unique between different runs on different data.
44# The list of items below will be used to create a file in your output directory.
45# Your user name and time+date will be automatically added.  For example,
46#     [setup, tide, event_number]
47# will result in a filename like
48#     20090212_091046_run_final_0_27283_rwilson
49#-------------------------------------------------------------------------------
50
51output_comment = [setup, tide, event_number]
52
53#-------------------------------------------------------------------------------
54# Input Data
55#-------------------------------------------------------------------------------
56
57# ELEVATION DATA
58# Used in build_elevation.py
59# Format for ascii grids, as produced in ArcGIS + a projection file
60ascii_grid_filenames = ['busselton_v2',   # Topo
61                        'grid_250m_clip'] # Busselton Topo
62
63# Format for point is x,y,elevation (with header)
64point_filenames = ['Busselton_Contour0.txt',    # Coastline
65                   'Busselton_BeachSurvey.txt', # Beach survey
66                   'Busselton_NavyFinal.txt',   # Bathymetry
67                   'Busselton_Chart.txt',       # Bathymetry Charts
68                   'Busselton_Digitised.txt',   # Digitised Fairsheet
69                   'Busselton_250m.txt',        # 250m
70                   'Bunbury_TIN.txt',           # Bunbury aoi TIN'd in ArcGIS
71                   'Busselton_TIN.txt',         # Busselton aoi TIN'd in ArcGIS
72                   'XYAHD_clip.txt']            # To extend boundary
73
74# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
75# Used in build_elevation.py
76# Format for points easting,northing (no header)
77bounding_polygon_filename = 'bounding_polygon.csv'
78bounding_polygon_maxarea = 100000
79
80# INTERIOR REGIONS -  for designing the mesh
81# Used in run_model.py
82# Format for points easting,northing (no header)                   
83interior_regions_data = [['busselton_1km.csv', 500],
84                         ['bunbury_1km.csv', 500],
85                         ['busselton_2km.csv', 10000],
86                         ['bunbury_2km.csv', 10000],
87                         ['island1.csv', 10000],
88                         ['island2.csv', 10000],
89                         ['coast_5km_d20m.csv', 40000]]
90
91# LAND - used to set the initial stage/water to be offcoast only
92# Used in run_model.py.  Format for points easting,northing (no header)
93land_initial_conditions_filename = [['initial_condition_extend.csv', 0],
94                                    ['initial_condition_marina.csv', 0]]
95
96# GAUGES - for creating timeseries at a specific point
97# Used in get_timeseries.py. 
98# Format easting,northing,name,elevation (with header)
99gauges_filename = 'gauges.csv'
100
101# BUILDINGS EXPOSURE - for identifying inundated houses
102# Used in run_building_inundation.py
103# Format latitude,longitude etc (geographic)
104building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
105
106# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
107# NOTE: when files are put together the points must be in sequence
108# For ease go clockwise!
109# Check the run_model.py for boundary_tags
110
111# Thinned ordering file from Hazard Map (geographic)
112# Format is index,latitude,longitude (with header)
113urs_order_filename = 'thinned_boundary_ordering_extend.csv'
114
115# Landward bounding points
116# Format easting,northing (no header)
117landward_boundary_filename = 'landward_boundary_extend.csv'
118
119# MUX input filename.
120# If a meta-file from EventSelection is used, set 'multi-mux' to True.
121# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
122mux_input_filename = 'Java-0016-z.grd'
123multi_mux = False
124##mux_input_filename = 'event_027197.list'
125##multi_mux = True
126
127#-------------------------------------------------------------------------------
128# Clipping regions for export to asc and regions for clipping data
129# Final inundation maps should only be created in regions of the finest mesh
130#-------------------------------------------------------------------------------
131
132# ASCII export grid for Busselton
133xminBusselton = 340000
134xmaxBusselton = 352000
135yminBusselton = 6271500
136ymaxBusselton = 6280000
137
138# ASCII export grid for Bunbury
139xminBunbury = 369000
140xmaxBunbury = 381000
141yminBunbury = 6308000
142ymaxBunbury = 6316500
143
144################################################################################
145################################################################################
146####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
147################################################################################
148################################################################################
149
150# Get system user and host names.
151# These values can be used to distinguish between two similar runs by two
152# different users or runs by the same user on two different machines.
153user = get_user_name()
154host = get_host_name()
155
156# Environment variable names.
157# The inundation directory, not the data directory.
158ENV_INUNDATIONHOME = 'INUNDATIONHOME'
159
160# Path to MUX data
161ENV_MUXHOME = 'MUXHOME'
162
163#-------------------------------------------------------------------------------
164# Output Elevation Data
165#-------------------------------------------------------------------------------
166
167# Output filename for elevation
168# this is a combination of all the data generated in build_elevation.py
169combined_elevation_basename = scenario_name + '_combined_elevation'
170
171#-------------------------------------------------------------------------------
172# Directory Structure
173#-------------------------------------------------------------------------------
174
175# determines time for setting up output directories
176time = strftime('%Y%m%d_%H%M%S', localtime()) 
177gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
178build_time = time + '_build'
179run_time = time + '_run_'
180
181# create paths generated from environment variables.
182home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
183muxhome = os.getenv(ENV_MUXHOME)
184   
185# check various directories/files that must exist
186anuga_folder = join(home, state, scenario_folder, 'anuga')
187topographies_folder = join(anuga_folder, 'topographies')
188polygons_folder = join(anuga_folder, 'polygons')
189boundaries_folder = join(anuga_folder, 'boundaries')
190output_folder = join(anuga_folder, 'outputs')
191gauges_folder = join(anuga_folder, 'gauges')
192meshes_folder = join(anuga_folder, 'meshes')
193event_folder = join(boundaries_folder, str(event_number))
194
195# MUX data files
196# Directory containing the MUX data files to be used with EventSelection.
197mux_data_folder = join(muxhome, 'mux')
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# The absolute pathname of the mesh, generated in run_model.py
211meshes = join(meshes_folder, scenario_name) + '.msh'
212
213# The pathname for the urs order points, used within build_urs_boundary.py
214urs_order = join(boundaries_folder, urs_order_filename)
215
216# The absolute pathname for the landward points of the bounding polygon,
217# Used within run_model.py)
218landward_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 for the gauges file
232# Used for get_timeseries.py
233gauges = join(gauges_folder, gauges_filename)       
234
235# The absolute pathname for the building file
236# Used for run_building_inundation.py
237building_exposure = join(gauges_folder, building_exposure_filename)
238
239# full path to where MUX files (or meta-files) live
240mux_input = join(boundaries_folder, mux_input_filename)
241
Note: See TracBrowser for help on using the repository browser.