source: anuga_work/production/australia_ph2/dampier/project.py @ 6460

Last change on this file since 6460 was 6460, checked in by kristy, 15 years ago

Changed all files for new wave input

File size: 8.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
10from os import sep
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 = 'australia_ph2'
20scenario_name = 'dampier'
21scenario_folder = scenario_name
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                # difference between MSL and HAT
30zone = 50               # specify zone of model
31event_number = 70028    # the event number or the mux file name
32alpha = 0.1             # smoothing parameter for mesh
33friction=0.01           # manning's friction coefficient
34starttime=0             # start time for simulation
35finaltime=80000          # final time for simulation
36
37# index is only used when wave = Tb
38index = 1203            # index from the PTHA
39wave = 'Tb'             # Bf (sts wave) Tb (index wave)
40
41setup = 'trial'         # This can be one of three values
42                        #    trial - coarsest mesh, fast
43                        #    basic - coarse mesh
44                        #    final - fine mesh, slowest
45
46#-------------------------------------------------------------------------------
47# Output filename
48#
49# Your output filename should be unique between different runs on different data.
50# The list of items below will be used to create a file in your output directory.
51# Your user name and time+date will be automatically added.  For example,
52#     [setup, tide, event_number]
53# will result in a filename like
54#     20090212_091046_run_final_0_27283_rwilson
55#-------------------------------------------------------------------------------
56
57output_comment = [setup, tide, event_number, index, wave]
58
59#-------------------------------------------------------------------------------
60# Input Data
61#-------------------------------------------------------------------------------
62
63# ELEVATION DATA
64# Used in build_elevation.py
65# Format for ascii grids, as produced in ArcGIS + a projection file
66ascii_grid_filenames = [] # 250m grid 2005
67
68# Format for point is x,y,elevation (with header)
69point_filenames = ['grid250m.txt'] # 250m grid 2005
70
71### Add csv header list to all files in point_filenames
72##headerlist = ['x', 'y', 'elevation']
73##for f in point_filenames:
74##    add_csv_header(join(topographies_folder, f), headerlist)
75
76    # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
77# Used in build_elevation.py
78# Format for points easting,northing (no header)
79bounding_polygon_filename = 'bounding_polygon.csv'
80bounding_polygon_maxarea = 100000
81
82# INTERIOR REGIONS -  for designing the mesh
83# Used in run_model.py
84# Format for points easting,northing (no header)                   
85interior_regions_data = []
86
87# LAND - used to set the initial stage/water to be offcoast only
88# Used in run_model.py.  Format for points easting,northing (no header)
89land_initial_conditions_filename = []
90
91# GAUGES - for creating timeseries at a specific point
92# Used in get_timeseries.py. 
93# Format easting,northing,name,elevation (with header)
94gauges_filename = 'gauges.csv'
95
96# BUILDINGS EXPOSURE - for identifying inundated houses
97# Used in run_building_inundation.py
98# Format latitude,longitude etc (geographic)
99building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
100
101# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
102# NOTE: when files are put together the points must be in sequence
103# For ease go clockwise!
104# Check the run_model.py for boundary_tags
105
106# Thinned ordering file from Hazard Map (geographic)
107# Format is index,latitude,longitude (with header)
108urs_order_filename = 'urs_order.csv'
109
110# Landward bounding points
111# Format easting,northing (no header)
112landward_boundary_filename = 'landward_boundary.csv'
113
114# MUX input filename.
115# If a meta-file from EventSelection is used, set 'multi-mux' to True.
116# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
117##mux_input_filename = event_number # to be found in event_folder
118                                    # (ie boundaries/event_number/)
119##multi_mux = False
120mux_input_filename = 'event.list'
121multi_mux = True
122
123
124
125
126################################################################################
127################################################################################
128####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
129################################################################################
130################################################################################
131
132# Get system user and host names.
133# These values can be used to distinguish between two similar runs by two
134# different users or runs by the same user on two different machines.
135user = get_user_name()
136host = get_host_name()
137
138# Environment variable names.
139# The inundation directory, not the data directory.
140ENV_INUNDATIONHOME = 'INUNDATIONHOME'
141
142# Path to MUX data
143ENV_MUXHOME = 'MUXHOME'
144
145#-------------------------------------------------------------------------------
146# Output Elevation Data
147#-------------------------------------------------------------------------------
148
149# Output filename for elevation
150# this is a combination of all the data generated in build_elevation.py
151combined_elevation_basename = scenario_name + '_combined_elevation'
152
153#-------------------------------------------------------------------------------
154# Directory Structure
155#-------------------------------------------------------------------------------
156
157# determines time for setting up output directories
158time = strftime('%Y%m%d_%H%M%S', localtime()) 
159gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
160build_time = time + '_build'
161run_time = time + '_run_'
162
163# create paths generated from environment variables.
164home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
165muxhome = os.getenv(ENV_MUXHOME)
166   
167# check various directories/files that must exist
168anuga_folder = join(home, state, scenario_folder, 'anuga')
169topographies_folder = join(anuga_folder, 'topographies')
170polygons_folder = join(anuga_folder, 'polygons')
171boundaries_folder = join(anuga_folder, 'boundaries')
172output_folder = join(anuga_folder, 'outputs')
173gauges_folder = join(anuga_folder, 'gauges')
174meshes_folder = join(anuga_folder, 'meshes')
175event_folder = join(boundaries_folder, str(event_number))
176
177# MUX data files
178# Directory containing the MUX data files to be used with EventSelection.
179mux_data_folder = join(muxhome, 'mux')
180
181#-------------------------------------------------------------------------------
182# Location of input and output data
183#-------------------------------------------------------------------------------
184
185# Convert the user output_comment to a string for run_model.py
186output_comment = ('_'.join([str(x) for x in output_comment if x != user])
187                  + '_' + user)
188
189# The absolute pathname of the all elevation, generated in build_elevation.py
190combined_elevation = join(topographies_folder, combined_elevation_basename)
191
192# The absolute pathname of the mesh, generated in run_model.py
193meshes = join(meshes_folder, scenario_name) + '.msh'
194
195# The pathname for the urs order points, used within build_urs_boundary.py
196urs_order = join(boundaries_folder, urs_order_filename)
197
198# The absolute pathname for the landward points of the bounding polygon,
199# Used within run_model.py)
200landward_boundary = join(boundaries_folder, landward_boundary_filename)
201
202# The absolute pathname for the .sts file, generated in build_boundary.py
203event_sts = join(event_folder, scenario_name)
204
205# The absolute pathname for the output folder names
206# Used for build_elevation.py
207output_build = join(output_folder, build_time) + '_' + str(user) 
208# Used for run_model.py
209output_run = join(output_folder, run_time) + output_comment
210# Used by post processing
211output_run_time = join(output_run, scenario_name) 
212
213# The absolute pathname for the gauges file
214# Used for get_timeseries.py
215gauges = join(gauges_folder, gauges_filename)       
216
217# The absolute pathname for the building file
218# Used for run_building_inundation.py
219building_exposure = join(gauges_folder, building_exposure_filename)
220
221# full path to where MUX files (or meta-files) live
222mux_input = join(event_folder, mux_input_filename)
223
224boundary_csv = event_folder + sep + 'sts_gauge_' + str(index) +'.csv'
Note: See TracBrowser for help on using the repository browser.