source: anuga_work/production/australia_ph2/hobart/project.py @ 6476

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

running final models for various events

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