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