source: anuga_work/production/australia_ph2/darwin/project.py @ 6532

Last change on this file since 6532 was 6532, checked in by myall, 15 years ago

redefining Darwin model area - original too large

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