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

Last change on this file since 7606 was 7606, checked in by jgriffin, 8 years ago

Added extra events for probabilistic run

File size: 11.4 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
10import sys
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 = 'new_south_wales'
20scenario_name = 'batemans_bay'
21scenario_folder = 'batemans_bay_tsunami_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
29tide = 0.0                # difference between MSL and HAT (1.0)
30
31# the event number or the mux file name
32##event_number = 58129     #1 in 200 yr Puyesgur
33##event_number = 58115     #1 in 500 yr Puysegur
34##event_number = 58226     #1 in 1000 yr Puysegur
35##event_number = 58284     #1 in 2000 yr Puysegur (Event 3)
36##event_number = 58286     #1 in 5000 yr Puysegur
37##event_number = 58346     #1 in 10000 yr Puysegur (Event 1)
38
39##event_number = 51077     #1 in 200 yr New Hebrides
40##event_number = 51378     #1 in 500 yr New Hebrides
41##event_number = 51347     #1 in 1000 yr New Hebrides
42##event_number = 51292     #1 in 2000 yr New Hebrides
43##event_number = 51424     #1 in 5000 yr New Hebrides
44##event_number = 51204     #1 in 10000 yr New Hebrides (Event 2)
45
46######event_number = 58368      #1 in 100 000 yr Puysegur
47######event_number = 51436      #1 in 100 000 yr New Hebrides
48######event_number = 58272      #1 in ~15000 yr Puysegur
49######event_number = 51445      #1 in ~15000 yr New Hebrides
50
51if len(sys.argv) > 1:
52    event_number = int(sys.argv[1])
53else:   
54    event_number = 58284
55##event_number_list = [31602,31714,31913] #7871,31583,#1.5-2.0m
56##event_number_list = [51375,51436,51452] #31997,51268, #1.5-2.0m
57##event_number_list =  [58318,58337,58350] #58176,58286,#1.5-2.0m
58##event_number_list = [31897,31961,31973]#31708,31831,#2.1-3.0m
59
60##event_number_list = [51328,51415,51460]#31981,51270,#2.1-3.0m
61##event_number_list = [58331,58348,58357,58360]#51470,58274,#2.1-3.0m
62   
63##event_number_list = [2009,2045,2060,5716] #1964,#0.3-1.0m
64##event_number_list = [5890,6017,6052,6143] #5867,#0.3-1.0m
65   
66##event_number_list = [6262,6360,6358,6464] #6157,#0.3-1.0m
67##event_number_list = [6512,7741,7771,7813] #6475,#0.3-1.0m
68##event_number_list = [15442,15491,15505,16964]#7865,#0.3-1.0m
69##event_number_list = [16990,17006,17020,20766]#16968,#0.3-1.0m
70
71##event_number_list = [20993,22691,22784,22847] #20902,#0.3-1.0m
72##event_number_list = [24300,24356,24382,28082] #24247,#0.3-1.0m
73##event_number_list = [30207,30379,30532,30541] #28084,#0.3-1.0m
74##event_number_list = [31012,31173,31177,31361] #30858,#0.3-1.0m
75##event_number_list = [31536,31593,31964,31803]#31441,#0.3-1.0m
76
77# Re-run those that didn't work first time
78event_number_list = [15442,5890,6017,6052]
79
80
81alpha = 0.1             # smoothing parameter for mesh
82friction=0.01           # manning's friction coefficient
83starttime=0             # start time for simulation
84finaltime=60000         # final time for simulation
85
86setup = 'final'         # This can be one of three values
87                        #    trial - coarsest mesh, fast
88                        #    basic - coarse mesh
89                        #    final - fine mesh, slowest
90
91#-------------------------------------------------------------------------------
92# Output filename
93#
94# Your output filename should be unique between different runs on different data.
95# The list of items below will be used to create a file in your output directory.
96# Your user name and time+date will be automatically added.  For example,
97#     [setup, tide, event_number]
98# will result in a filename like
99#     20090212_091046_run_final_0_27283_rwilson
100#-------------------------------------------------------------------------------
101
102output_comment = [setup, tide, event_number]
103
104#-------------------------------------------------------------------------------
105# Input Data
106#-------------------------------------------------------------------------------
107
108# ELEVATION DATA
109# Used in build_elevation.py
110# Format for ascii grids, as produced in ArcGIS + a projection file
111ascii_grid_filenames = []
112                   
113# Format for point is x,y,elevation (with header)
114point_filenames = []
115         
116
117### Add csv header list to all files in point_filenames
118##headerlist = ['x', 'y', 'elevation']
119##for f in point_filenames:
120##    add_csv_header(join(topographies_folder, f), headerlist)
121
122    # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
123# Used in build_elevation.py
124# Format for points easting,northing (no header)
125bounding_polygon_filename = 'bounding_polygon.csv'
126bounding_polygon_maxarea = 100000
127
128# INTERIOR REGIONS -  for designing the mesh
129# Used in run_model.py
130# Format for points easting,northing (no header)
131
132interior_regions_data = [['area_of_interest.csv', 500],
133                        ['area_of_significance.csv', 2500],
134                        ['shallow_water.csv', 10000]]
135
136
137# LAND - used to set the initial stage/water to be offcoast only
138# Used in run_model.py.  Format for points easting,northing (no header)
139land_initial_conditions_filename = [['initial_conditions.csv', 0]]
140                                 
141
142# GAUGES - for creating timeseries at a specific point
143# Used in get_timeseries.py. 
144# Format easting,northing,name,elevation (with header)
145gauges_filename = 'phase2_comp.csv'
146
147# BUILDINGS EXPOSURE - for identifying inundated houses
148# Used in run_building_inundation.py
149# Format latitude,longitude etc (geographic)
150building_exposure_filename = '' # from NEXIS
151
152# AREA OF IMAGES - Extent of each image to find out highest runup
153# Header - easting,northing,id,value
154# Used in get_runup.py
155images_filename = ''
156
157# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
158# NOTE: when files are put together the points must be in sequence
159# For ease go clockwise!
160# Check the run_model.py for boundary_tags
161
162# Thinned ordering file from Hazard Map (geographic)
163# Format is index,latitude,longitude (with header)
164urs_order_filename = 'urs_order.csv'
165
166# Landward bounding points
167# Format easting,northing (no header)
168landward_boundary_filename = 'landward_boundary.csv'
169
170# MUX input filename.
171# If a meta-file from EventSelection is used, set 'multi-mux' to True.
172# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
173##mux_input_filename = event_number # to be found in event_folder
174                                    # (ie boundaries/event_number/)
175##multi_mux = False
176mux_input_filename = 'event.list'
177multi_mux = True
178
179zone = 56
180#-------------------------------------------------------------------------------
181# Clipping regions for export to asc and regions for clipping data
182# Final inundation maps should only be created in regions of the finest mesh
183#-------------------------------------------------------------------------------
184
185# ASCII export grid for Batemans Bay
186##xminBatemans_Bay =
187##xmaxBatemans_Bay =
188##yminBatemans_Bay =
189##ymaxBatemans_Bay =
190
191
192
193################################################################################
194################################################################################
195####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
196################################################################################
197################################################################################
198
199# Get system user and host names.
200# These values can be used to distinguish between two similar runs by two
201# different users or runs by the same user on two different machines.
202user = get_user_name()
203host = get_host_name()
204
205# Environment variable names.
206# The inundation directory, not the data directory.
207ENV_INUNDATIONHOME = 'INUNDATIONHOME'
208
209# Path to MUX data
210ENV_MUXHOME = 'MUXHOME'
211
212#-------------------------------------------------------------------------------
213# Output Elevation Data
214#-------------------------------------------------------------------------------
215
216# Output filename for elevation
217# this is a combination of all the data generated in build_elevation.py
218combined_elevation_basename = scenario_name + '_combined_elevation'
219
220#-------------------------------------------------------------------------------
221# Directory Structure
222#-------------------------------------------------------------------------------
223
224# determines time for setting up output directories
225time = strftime('%Y%m%d_%H%M%S', localtime()) 
226gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
227build_time = time + '_build'
228run_time = time + '_run_'
229
230# create paths generated from environment variables.
231home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
232muxhome = os.getenv(ENV_MUXHOME)
233   
234# check various directories/files that must exist
235anuga_folder = join(home, state, scenario_folder, 'anuga')
236topographies_folder = join(anuga_folder, 'topographies')
237polygons_folder = join(anuga_folder, 'polygons')
238boundaries_folder = join(anuga_folder, 'boundaries')
239output_folder = join(anuga_folder, 'outputs')
240gauges_folder = join(anuga_folder, 'gauges')
241meshes_folder = join(anuga_folder, 'meshes')
242event_folder = join(boundaries_folder, str(event_number))
243
244# MUX data files
245# Directory containing the MUX data files to be used with EventSelection.
246mux_data_folder = join(muxhome, 'mux')
247
248#-------------------------------------------------------------------------------
249# Location of input and output data
250#-------------------------------------------------------------------------------
251
252# Convert the user output_comment to a string for run_model.py
253output_comment = ('_'.join([str(x) for x in output_comment if x != user])
254                  + '_' + user)
255
256# The absolute pathname of the all elevation, generated in build_elevation.py
257combined_elevation = join(topographies_folder, combined_elevation_basename)
258
259# The absolute pathname of the mesh, generated in run_model.py
260meshes = join(meshes_folder, scenario_name) + '.msh'
261
262# The pathname for the urs order points, used within build_urs_boundary.py
263urs_order = join(boundaries_folder, urs_order_filename)
264
265# The absolute pathname for the landward points of the bounding polygon,
266# Used within run_model.py)
267landward_boundary = join(boundaries_folder, landward_boundary_filename)
268
269# The absolute pathname for the .sts file, generated in build_boundary.py
270event_sts = join(event_folder, scenario_name)
271
272# The absolute pathname for the output folder names
273# Used for build_elevation.py
274output_build = join(output_folder, build_time) + '_' + str(user) 
275# Used for run_model.py
276output_run = join(output_folder, run_time) + output_comment
277# Used by post processing
278output_run_time = join(output_run, scenario_name) 
279
280# The absolute pathname for the gauges file
281# Used for get_timeseries.py
282gauges = join(gauges_folder, gauges_filename)       
283
284# The absolute pathname for the building file
285# Used for run_building_inundation.py
286building_exposure = join(gauges_folder, building_exposure_filename)
287
288# The absolute pathname for the image file
289# Used for get_runup.py
290if images_filename:
291    images = join(polygons_folder, images_filename)
292
293# full path to where MUX files (or meta-files) live
294mux_input = join(event_folder, mux_input_filename)
295
Note: See TracBrowser for help on using the repository browser.