source: anuga_work/production/gosford/project.py @ 6684

Last change on this file since 6684 was 6684, checked in by kristy, 16 years ago

added Gosford

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# Fitting Scenario
13#-------------------------------------------------------------------------------
14
15extent = 'aoi1' #None
16extent_maxarea = 15000
17
18#-------------------------------------------------------------------------------
19# Directory setup
20#-------------------------------------------------------------------------------
21
22# this section needs to be updated to reflect the modelled community.
23# Note, the user needs to set up the directory system accordingly
24state = 'new_south_wales'
25scenario_name = 'gosford'
26scenario_folder = 'gosford_tsunami_scenario_2009'
27
28#-------------------------------------------------------------------------------
29# Initial Conditions
30#-------------------------------------------------------------------------------
31
32# Model specific parameters.
33# One or all can be changed each time the run_model script is executed
34tide = 0                # difference between MSL and HAT in metres
35zone = 56               # specify zone of model
36event_number = 31891    # the event number or the mux file name
37alpha = 0.1             # smoothing parameter for mesh
38friction=0.01           # manning's friction coefficient
39starttime=0             # start time for simulation
40finaltime=1000         # final time for simulation
41
42setup = 'final'         # This can be one of three values
43                        #    trial - coarsest mesh, fast
44                        #    basic - coarse mesh
45                        #    final - fine mesh, slowest
46
47#-------------------------------------------------------------------------------
48# Output filename
49#
50# Your output filename should be unique between different runs on different data.
51# The list of items below will be used to create a file in your output directory.
52# Your user name and time+date will be automatically added.  For example,
53#     [setup, tide, event_number]
54# will result in a filename like
55#     20090212_091046_run_final_0_27283_rwilson
56#-------------------------------------------------------------------------------
57
58output_comment = [setup, tide, event_number]
59
60#-------------------------------------------------------------------------------
61# Input Data
62#-------------------------------------------------------------------------------
63
64# ELEVATION DATA
65# Used in build_elevation.py
66# Format for ascii grids, as produced in ArcGIS + a projection file
67ascii_grid_filenames = ['e151_s33_clip0',   # SRTM
68                        'e151_s34_clip0',
69                        'e151_s35_clip0'] 
70
71# Format for point is x,y,elevation (with header)
72point_filenames = ['hydro.txt',     # AHO data
73                   'estuaries.txt', # From DPI NSW
74                   'AUS197.txt']    #
75
76### Add csv header list to all files in point_filenames
77##headerlist = ['x', 'y', 'elevation']
78##for f in point_filenames:
79##    add_csv_header(join(topographies_folder, f), headerlist)
80
81# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
82# Used in build_elevation.py
83# Format for points easting,northing (no header)
84bounding_polygon_filename = 'bounding_polygon.csv'
85bounding_polygon_maxarea = 100000
86
87# INTERIOR REGIONS -  for designing the mesh
88# Used in run_model.py
89# Format for points easting,northing (no header)                   
90if extent == None:
91    interior_regions_data = [['aoi1.csv', 500],
92                             ['aoi2.csv', 500]]
93else:
94    interior_regions_data = []
95
96# LAND - used to set the initial stage/water to be offcoast only
97# Used in run_model.py.  Format for points easting,northing (no header)
98land_initial_conditions_filename = [['initial_conditions0.csv', 0]]
99
100# GAUGES - for creating timeseries at a specific point
101# Used in get_timeseries.py. 
102# Format easting,northing,name,elevation (with header)
103gauges_filename = 'gauges.csv'
104
105# BUILDINGS EXPOSURE - for identifying inundated houses
106# Used in run_building_inundation.py
107# Format latitude,longitude etc (geographic)
108building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
109
110# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
111# NOTE: when files are put together the points must be in sequence
112# For ease go clockwise!
113# Check the run_model.py for boundary_tags
114
115# Thinned ordering file from Hazard Map (geographic)
116# Format is index,latitude,longitude (with header)
117urs_order_filename = 'urs_order.csv'
118
119# Landward bounding points
120# Format easting,northing (no header)
121landward_boundary_filename = 'landward_boundary.csv'
122
123# MUX input filename.
124# If a meta-file from EventSelection is used, set 'multi-mux' to True.
125# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
126##mux_input_filename = event_number # to be found in event_folder
127                                    # (ie boundaries/event_number/)
128##multi_mux = False
129mux_input_filename = 'event.list'
130multi_mux = True
131
132#-------------------------------------------------------------------------------
133# Clipping regions for export to asc and regions for clipping data
134# Final inundation maps should only be created in regions of the finest mesh
135#-------------------------------------------------------------------------------
136
137# ASCII export grid for Busselton
138xminBusselton = 340000
139xmaxBusselton = 352000
140yminBusselton = 6271500
141ymaxBusselton = 6280000
142
143# ASCII export grid for Bunbury
144xminBunbury = 369000
145xmaxBunbury = 381000
146yminBunbury = 6308000
147ymaxBunbury = 6316500
148
149################################################################################
150################################################################################
151####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
152################################################################################
153################################################################################
154
155# Get system user and host names.
156# These values can be used to distinguish between two similar runs by two
157# different users or runs by the same user on two different machines.
158user = get_user_name()
159host = get_host_name()
160
161# Environment variable names.
162# The inundation directory, not the data directory.
163ENV_INUNDATIONHOME = 'INUNDATIONHOME'
164
165# Path to MUX data
166ENV_MUXHOME = 'MUXHOME'
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
188muxhome = os.getenv(ENV_MUXHOME)
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_number))
198
199# MUX data files
200# Directory containing the MUX data files to be used with EventSelection.
201mux_data_folder = join(muxhome, 'mux')
202
203#-------------------------------------------------------------------------------
204# Location of input and output data
205#-------------------------------------------------------------------------------
206
207# Convert the user output_comment to a string for run_model.py
208output_comment = ('_'.join([str(x) for x in output_comment if x != user])
209                  + '_' + user)
210
211# The absolute pathname of the all elevation, generated in build_elevation.py
212if extent == None:
213    combined_elevation = join(topographies_folder, combined_elevation_basename)
214else:
215    combined_elevation = join(topographies_folder, 'original',
216                              combined_elevation_basename)
217
218
219# The pathname for the urs order points, used within build_urs_boundary.py
220if urs_order_filename:
221    urs_order = join(boundaries_folder, urs_order_filename)
222
223# The absolute pathname for the landward points of the bounding polygon,
224# Used within run_model.py)
225if landward_boundary_filename:
226    landward_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 of the mesh, generated in run_model.py
240meshes = join(output_run, scenario_name) + '.msh'
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# full path to where MUX files (or meta-files) live
253mux_input = join(event_folder, mux_input_filename)
254
Note: See TracBrowser for help on using the repository browser.