source: DVD_images/extra_files/BatemansBay/project/project.py @ 7360

Last change on this file since 7360 was 7360, checked in by jgriffin, 15 years ago
  • Property svn:executable set to *
File size: 9.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 = '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.0                # difference between MSL and HAT (1.0)
29
30# the event number or the mux file name
31##event_number = 58129     #1 in 200 yr Puyesgur
32##event_number = 58115     #1 in 500 yr Puysegur
33##event_number = 58226     #1 in 1000 yr Puysegur
34##event_number = 58284     #1 in 2000 yr Puysegur (Event 3)
35##event_number = 58286     #1 in 5000 yr Puysegur
36event_number = 58346     #1 in 10000 yr Puysegur (Event 1)
37
38##event_number = 51077     #1 in 200 yr New Hebrides
39##event_number = 51378     #1 in 500 yr New Hebrides
40##event_number = 51347     #1 in 1000 yr New Hebrides
41##event_number = 51292     #1 in 2000 yr New Hebrides
42##event_number = 51424     #1 in 5000 yr New Hebrides
43##event_number = 51204     #1 in 10000 yr New Hebrides (Event 2)
44
45######event_number = 58368      #1 in 100 000 yr Puysegur
46######event_number = 51436      #1 in 100 000 yr New Hebrides
47######event_number = 58272      #1 in ~15000 yr Puysegur
48######event_number = 51445      #1 in ~15000 yr New Hebrides
49
50alpha = 0.1             # smoothing parameter for mesh
51friction=0.01           # manning's friction coefficient
52starttime=0             # start time for simulation
53finaltime=60000         # final time for simulation
54
55setup = 'final'         # This can be one of three values
56                        #    trial - coarsest mesh, fast
57                        #    basic - coarse mesh
58                        #    final - fine mesh, slowest
59
60#-------------------------------------------------------------------------------
61# Output filename
62#
63# Your output filename should be unique between different runs on different data.
64# The list of items below will be used to create a file in your output directory.
65# Your user name and time+date will be automatically added.  For example,
66#     [setup, tide, event_number]
67# will result in a filename like
68#     20090212_091046_run_final_0_27283_rwilson
69#-------------------------------------------------------------------------------
70
71output_comment = [setup, tide, event_number]
72
73#-------------------------------------------------------------------------------
74# Input Data
75#-------------------------------------------------------------------------------
76
77# ELEVATION DATA
78# Used in build_elevation.py
79# Format for ascii grids, as produced in ArcGIS + a projection file
80ascii_grid_filenames = []
81                   
82# Format for point is x,y,elevation (with header)
83point_filenames = []
84         
85# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
86# Used in build_elevation.py
87# Format for points easting,northing (no header)
88bounding_polygon_filename = 'bounding_polygon.csv'
89bounding_polygon_maxarea = 100000
90
91# INTERIOR REGIONS -  for designing the mesh
92# Used in run_model.py
93# Format for points easting,northing (no header)
94interior_regions_data = [['area_of_interest.csv', 500],
95                        ['area_of_significance.csv', 2500],
96                        ['shallow_water.csv', 10000]]
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_conditions.csv', 0]]
101                               
102# GAUGES - for creating timeseries at a specific point
103# Used in get_timeseries.py. 
104# Format easting,northing,name,elevation (with header)
105gauges_filename = 'gauges.csv'
106
107# BUILDINGS EXPOSURE - for identifying inundated houses
108# Used in run_building_inundation.py
109# Format latitude,longitude etc (geographic)
110##building_exposure_filename = '' # from NEXIS
111
112# AREA OF IMAGES - Extent of each image to find out highest runup
113# Header - easting,northing,id,value
114# Used in get_runup.py
115images_filename = ''
116
117# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
118# NOTE: when files are put together the points must be in sequence
119# For ease go clockwise!
120# Check the run_model.py for boundary_tags
121
122# Thinned ordering file from Hazard Map (geographic)
123# Format is index,latitude,longitude (with header)
124urs_order_filename = 'thinned_boundary_ordering_extend.csv'
125
126# Landward bounding points
127# Format easting,northing (no header)
128landward_boundary_filename = 'landward_boundary_extend.csv'
129
130# MUX input filename.
131# If a meta-file from EventSelection is used, set 'multi-mux' to True.
132# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
133##mux_input_filename = event_number # to be found in event_folder
134                                    # (ie boundaries/event_number/)
135##multi_mux = False
136mux_input_filename = 'event.list'
137multi_mux = True
138
139zone = 56
140#-------------------------------------------------------------------------------
141# Clipping regions for export to asc and regions for clipping data
142# Final inundation maps should only be created in regions of the finest mesh
143#-------------------------------------------------------------------------------
144
145# ASCII export grid for Batemans Bay
146##xminBatemans_Bay =
147##xmaxBatemans_Bay =
148##yminBatemans_Bay =
149##ymaxBatemans_Bay =
150
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 = 'ANUGADATA'
167
168#-------------------------------------------------------------------------------
169# Output Elevation Data
170#-------------------------------------------------------------------------------
171
172# Output filename for elevation
173# this is a combination of all the data generated in build_elevation.py
174combined_elevation_basename = scenario_name + '_combined_elevation'
175
176#-------------------------------------------------------------------------------
177# Directory Structure
178#-------------------------------------------------------------------------------
179
180# determines time for setting up output directories
181time = strftime('%Y%m%d_%H%M%S', localtime()) 
182gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
183build_time = time + '_build'
184run_time = time + '_run_'
185
186# create paths generated from environment variables.
187home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
188   
189# check various directories/files that must exist
190anuga_folder = join(home, state, scenario_folder, 'anuga')
191topographies_folder = join(anuga_folder, 'topographies')
192polygons_folder = join(anuga_folder, 'polygons')
193boundaries_folder = join(anuga_folder, 'boundaries')
194output_folder = join(anuga_folder, 'outputs')
195gauges_folder = join(anuga_folder, 'gauges')
196meshes_folder = join(anuga_folder, 'meshes')
197event_folder = join(boundaries_folder, str(event_number))
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
237##building_exposure = join(gauges_folder, building_exposure_filename)
238
239# The absolute pathname for the image file
240# Used for get_runup.py
241if images_filename:
242    images = join(polygons_folder, images_filename)
243
244# full path to where MUX files (or meta-files) live
245mux_input = join(event_folder, mux_input_filename)
246
Note: See TracBrowser for help on using the repository browser.