source: anuga_work/production/west_tas_2008/project_smf.py @ 7855

Last change on this file since 7855 was 5245, checked in by sexton, 17 years ago

(1) update of production processes document (2) test for generating points for URS output (3) update of graduate proposal

File size: 3.6 KB
Line 
1# -*- coding: cp1252 -*-
2"""Common filenames and locations for topographic data, meshes and outputs.
3"""
4
5from os import sep, environ, getenv, getcwd
6from os.path import expanduser
7import sys
8from time import localtime, strftime, gmtime
9from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
10
11if sys.platform == 'win32':
12    home = getenv('INUNDATIONHOME')
13    user = getenv('USERPROFILE')
14
15else:   
16    home = getenv('INUNDATIONHOME', sep+'d'+sep+'xrd'+sep+'gem'+sep+'2'+sep+'ramp'+sep+'risk_assessment_methods_project'+sep+'inundation')     
17    user = getenv('LOGNAME')
18    print 'USER:', user
19
20# INUNDATIONHOME is the inundation directory, not the data directory.
21home += sep +'data'
22
23#Making assumptions about the location of scenario data
24state = 'tasmania'
25scenario_dir_name = 'smf_scenario_2008'
26
27# onshore data sourced from 250m grid
28onshore_name250 = 'bathyland250'
29
30# coastline from GA
31coast_line_name = 'aus_cst'
32
33# survey data
34offshore_name1 = 'S_Tasman_Rise_150m_EN_Interp'
35offshore_name2 = 'Sorell_Basin_150m_EN_Interp'
36offshore_name3 = 'West_Tas_EastNorth_z'
37
38#swollen/ all data output
39basename = 'source'
40codename = 'project_slide.py'
41
42#Derive subdirectories and filenames
43local_time = strftime('%Y%m%d_%H%M%S',gmtime()) 
44meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
45datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
46gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
47polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
48boundarydir = home+sep+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
49outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
50outputtimedir = outputdir + local_time + sep
51polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
52
53gauge_filename = gaugedir + 'west_tas_gauges.csv'
54codedir = getcwd()+sep                           
55codedirname = codedir + 'project_smf.py'
56meshname = outputtimedir + 'mesh_' + basename
57
58# Necessary if using point datasets, rather than grid
59onshore_250_dem_name = datadir + onshore_name250
60offshore_dem_name1 = datadir + offshore_name1
61offshore_dem_name2 = datadir + offshore_name2
62offshore_dem_name3 = datadir + offshore_name3
63coast_line = datadir + coast_line_name
64
65combined_dem_name   = datadir + 'west_tas_combined_elevation'
66
67###############################
68# Domain definitions
69###############################
70
71# bounding polygon for study area
72polyAll = read_polygon(polygondir+'domain.csv')
73
74print 'Area of bounding polygon', polygon_area(polyAll)/1000000.0
75
76###############################
77# Interior region definitions
78###############################
79
80# sydney digitized polygons
81poly_local = read_polygon(polygondir+'local.csv')
82poly_region = read_polygon(polygondir+'region.csv')
83
84print 'Area of region polygon', polygon_area(poly_region)/1000000.0
85print 'Area of coastal polygon', polygon_area(poly_local)/1000000.0
86
87###################################################################
88# Clipping regions for export to asc and regions for clipping data
89###################################################################
90
91# exporting asc grid
92eastingmin = 333000
93eastingmax = 354000
94northingmin = 6244800
95northingmax = 6274550
96
97
98###################################################################
99# Slide characteristics
100###################################################################
101
102# historical slides
103slide_origin = [338270.5407, 5217273.89]
104
105depth = 1750.0
106length = 25000.0
107thickness = 400.0
108width = 50000.0
109density = 1.46
110slope = 4.0
111alpha = 126.0 - 90.0
112
Note: See TracBrowser for help on using the repository browser.