source: anuga_work/production/new_south_wales/batemans_bay/project.py @ 6427

Last change on this file since 6427 was 6427, checked in by jgriffin, 15 years ago

updated batemans bay scripts

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 = '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                # difference between MSL and HAT
29event_number = 31821    # the event number or the mux file name
30alpha = 0.1             # smoothing parameter for mesh
31friction=0.01           # manning's friction coefficient
32starttime=0             # start time for simulation
33finaltime=1000         # 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 = ['1a',# Topographic data
61                        '1b',
62                        '2b',
63                        '2a_3',
64                        '3b',
65                        '3a',
66                        '4a_2',
67                        '4b',]
68                   
69# Format for point is x,y,elevation (with header)
70point_filenames = ['Batemans_BBHD_MGA_1995.csv',
71                   'SD100015374_MGA.csv',
72                   'SD100016502_MGA.csv',
73                   'SD100016517_MGA.csv',
74                   'SD100031996_batemans_mga_clip_written.csv',
75                   'tomaga_offshore_AHD_MGA_1997.csv']
76         
77
78### Add csv header list to all files in point_filenames
79##headerlist = ['x', 'y', 'elevation']
80##for f in point_filenames:
81##    add_csv_header(join(topographies_folder, f), headerlist)
82
83    # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
84# Used in build_elevation.py
85# Format for points easting,northing (no header)
86bounding_polygon_filename = 'bounding_polygon.csv'
87bounding_polygon_maxarea = 100000
88
89# INTERIOR REGIONS -  for designing the mesh
90# Used in run_model.py
91# Format for points easting,northing (no header)
92
93interior_regions_data = [['area_of_interest.csv', 500],
94                        ['area_of_significance.csv', 2500],
95                        ['shallow_water.csv', 10000]]
96
97
98# LAND - used to set the initial stage/water to be offcoast only
99# Used in run_model.py.  Format for points easting,northing (no header)
100land_initial_conditions_filename = [['initial_condition_extend.csv', 0]]
101                                 
102
103# GAUGES - for creating timeseries at a specific point
104# Used in get_timeseries.py. 
105# Format easting,northing,name,elevation (with header)
106##gauges_filename = 'gauges.csv'
107
108# BUILDINGS EXPOSURE - for identifying inundated houses
109# Used in run_building_inundation.py
110# Format latitude,longitude etc (geographic)
111##building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
112
113# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
114# NOTE: when files are put together the points must be in sequence
115# For ease go clockwise!
116# Check the run_model.py for boundary_tags
117
118# Thinned ordering file from Hazard Map (geographic)
119# Format is index,latitude,longitude (with header)
120urs_order_filename = 'thinned_boundary_ordering_extend.csv'
121
122# Landward bounding points
123# Format easting,northing (no header)
124landward_boundary_filename = 'landward_boundary_extend.csv'
125
126# MUX input filename.
127# If a meta-file from EventSelection is used, set 'multi-mux' to True.
128# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
129##mux_input_filename = event_number # to be found in event_folder
130                                    # (ie boundaries/event_number/)
131##multi_mux = False
132mux_input_filename = 'event.list'
133multi_mux = True
134
135#-------------------------------------------------------------------------------
136# Clipping regions for export to asc and regions for clipping data
137# Final inundation maps should only be created in regions of the finest mesh
138#-------------------------------------------------------------------------------
139
140# ASCII export grid for Busselton
141xminBusselton = 340000
142xmaxBusselton = 352000
143yminBusselton = 6271500
144ymaxBusselton = 6280000
145
146# ASCII export grid for Bunbury
147xminBunbury = 369000
148xmaxBunbury = 381000
149yminBunbury = 6308000
150ymaxBunbury = 6316500
151
152################################################################################
153################################################################################
154####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
155################################################################################
156################################################################################
157
158# Get system user and host names.
159# These values can be used to distinguish between two similar runs by two
160# different users or runs by the same user on two different machines.
161user = get_user_name()
162host = get_host_name()
163
164# Environment variable names.
165# The inundation directory, not the data directory.
166ENV_INUNDATIONHOME = 'INUNDATIONHOME'
167
168# Path to MUX data
169ENV_MUXHOME = 'MUXHOME'
170
171#-------------------------------------------------------------------------------
172# Output Elevation Data
173#-------------------------------------------------------------------------------
174
175# Output filename for elevation
176# this is a combination of all the data generated in build_elevation.py
177combined_elevation_basename = scenario_name + '_combined_elevation'
178
179#-------------------------------------------------------------------------------
180# Directory Structure
181#-------------------------------------------------------------------------------
182
183# determines time for setting up output directories
184time = strftime('%Y%m%d_%H%M%S', localtime()) 
185gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
186build_time = time + '_build'
187run_time = time + '_run_'
188
189# create paths generated from environment variables.
190home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
191muxhome = os.getenv(ENV_MUXHOME)
192   
193# check various directories/files that must exist
194anuga_folder = join(home, state, scenario_folder, 'anuga')
195topographies_folder = join(anuga_folder, 'topographies')
196polygons_folder = join(anuga_folder, 'polygons')
197boundaries_folder = join(anuga_folder, 'boundaries')
198output_folder = join(anuga_folder, 'outputs')
199gauges_folder = join(anuga_folder, 'gauges')
200meshes_folder = join(anuga_folder, 'meshes')
201event_folder = join(boundaries_folder, str(event_number))
202
203# MUX data files
204# Directory containing the MUX data files to be used with EventSelection.
205mux_data_folder = join(muxhome, 'mux')
206
207#-------------------------------------------------------------------------------
208# Location of input and output data
209#-------------------------------------------------------------------------------
210
211# Convert the user output_comment to a string for run_model.py
212output_comment = ('_'.join([str(x) for x in output_comment if x != user])
213                  + '_' + user)
214
215# The absolute pathname of the all elevation, generated in build_elevation.py
216combined_elevation = join(topographies_folder, combined_elevation_basename)
217
218# The absolute pathname of the mesh, generated in run_model.py
219meshes = join(meshes_folder, scenario_name) + '.msh'
220
221# The pathname for the urs order points, used within build_urs_boundary.py
222urs_order = join(boundaries_folder, urs_order_filename)
223
224# The absolute pathname for the landward points of the bounding polygon,
225# Used within run_model.py)
226landward_boundary = join(boundaries_folder, landward_boundary_filename)
227
228# The absolute pathname for the .sts file, generated in build_boundary.py
229event_sts = join(event_folder, scenario_name)
230
231# The absolute pathname for the output folder names
232# Used for build_elevation.py
233output_build = join(output_folder, build_time) + '_' + str(user) 
234# Used for run_model.py
235output_run = join(output_folder, run_time) + output_comment
236# Used by post processing
237output_run_time = join(output_run, scenario_name) 
238
239# The absolute pathname for the gauges file
240# Used for get_timeseries.py
241##gauges = join(gauges_folder, gauges_filename)       
242
243# The absolute pathname for the building file
244# Used for run_building_inundation.py
245##building_exposure = join(gauges_folder, building_exposure_filename)
246
247# full path to where MUX files (or meta-files) live
248mux_input = join(event_folder, mux_input_filename)
249
Note: See TracBrowser for help on using the repository browser.