source: production/onslow_2006/project.py @ 2624

Last change on this file since 2624 was 2624, checked in by nick, 19 years ago

fixed geospatial_data to not use point_dict in export and updated onslow run to use new geospatial_data methods

File size: 3.3 KB
Line 
1"""Common filenames and locations for topographic data, meshes and outputs.
2Also includes origin for slump scenario.
3"""
4
5from os import sep, environ
6from os.path import expanduser
7from utilities.polygon import read_polygon
8import sys
9
10from pmesh.create_mesh import convert_points_from_latlon_to_utm
11
12from coordinate_transforms.redfearn import degminsec2decimal_degrees
13
14from time import localtime, strftime
15
16from os import getcwd
17               
18#Making assumptions about the location of scenario data
19scenario_dir_name = 'onslow_tsunami_scenario_2006'
20
21# 250m data to be provided
22coarsename = 'onsl_bathydem250' # get from Neil/Ingo (DEM or topo data)
23
24# 30m data to be provided
25onshore_name = 'onslow_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data)
26
27offshore_name = 'onslow_offshore_points'
28
29boundary_basename = 'SU-AU'
30
31#swollen/ all data output
32basename = 'source'
33
34codename = 'project.py'
35
36if sys.platform == 'win32':
37    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
38else:   
39    home = expanduser('~')
40
41#Derive subdirectories and filenames
42timedir = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
43outputdir = home+sep+scenario_dir_name+sep+'output'+sep+timedir+sep
44meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep
45datadir = home+sep+scenario_dir_name+sep+'topographies'+sep
46
47polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep
48boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep
49print'bound', boundarydir
50
51# boundary source data
52MOST_dir = 'f:'+sep+'3'+sep+'ehn'+sep+'users'+sep+'davidb'+sep+'tsunami'+sep+'WA_project'+sep+'SU-AU_90'+sep+'most_2'+sep+'detailed'+sep
53
54codedir = getcwd()+sep
55                               
56codedirname = codedir + 'project.py'
57
58meshname = meshdir + basename
59
60coarsedemname = datadir + coarsename
61
62onshore_dem_name = datadir + onshore_name
63
64offshore_dem_name = datadir + offshore_name
65
66combined_dem_name = datadir + 'onslow_combined_elevation'
67
68outputname = outputdir + basename  #Used by post processing
69
70#!gauge_filename = outputdir + 'onslow_gauges.xya'
71#!gauge_outname = outputdir + 'gauges_max_output.xya'
72
73# clipping region for fine elevation data
74eastingmin = 250000
75eastingmax = 330000
76northingmin = 7580000
77northingmax = 7635000
78
79south = degminsec2decimal_degrees(-22,00,0)
80north = degminsec2decimal_degrees(-21,10,0)
81west = degminsec2decimal_degrees(114,30,0)
82east = degminsec2decimal_degrees(115,30,0)
83
84# region for visualisation
85eminviz = 260000
86emaxviz = 320000
87nminviz = 7590000
88nmaxviz = 7630000
89
90#Georeferencing
91from coordinate_transforms.redfearn import degminsec2decimal_degrees
92
93refzone = 50
94
95#Main Domain of Onslow: first run NB 21/2/06
96d0 = [305000, 7635000]
97d1 = [280000, 7635000]
98d2 = [250000, 7615000]
99d3 = [250000, 7590000]
100d4 = [310000, 7580000]
101d5 = [330000, 7610000]
102
103polyAll = [d0, d1, d2, d3, d4, d5]
104
105#Interior region - Onslow town
106
107i0 = [304000, 7608000]
108i1 = [302000, 7605000]
109i2 = [303000, 7602000]
110i3 = [305000, 7601000]
111i4 = [309000, 7603000]
112i5 = [307000, 7606500]
113
114poly_onslow = [i0, i1, i2, i3, i4, i5]
115
116#Thevenard Island
117j0 = [294000, 7629000]
118j1 = [285000, 7625000]
119j2 = [294000, 7621000]
120j3 = [299000, 7625000]
121
122poly_thevenard = [j0, j1, j2, j3]
123
124# Direction Is
125k0 = [309000, 7619000]
126k1 = [304000, 7619000]
127k2 = [304000, 7616500]
128k3 = [309000, 7616500]
129
130poly_direction = [k0, k1, k2, k3]
131
Note: See TracBrowser for help on using the repository browser.