source: production/pt_hedland_2006/project.py @ 3272

Last change on this file since 3272 was 3272, checked in by sexton, 19 years ago

updates for pt hedland script

File size: 4.8 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, getenv, getcwd
6from os.path import expanduser, basename
7from utilities.polygon import read_polygon
8import sys
9from pmesh.create_mesh import convert_points_from_latlon_to_utm
10from coordinate_transforms.redfearn import degminsec2decimal_degrees
11from time import localtime, strftime
12from geospatial_data import *
13
14#Making assumptions about the location of scenario data
15state = 'western_australia'
16scenario_dir_name = 'pt_hedland_tsunami_scenario_2006'
17
18# onshore data from 30m DTED level 2
19onshore_name_dted = 'pt_hedland_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data)
20onshore_name_dli = 'pt_hedland_onshore_20m_dli' # get from Neil/Ingo (DEM or topo data)
21
22# offshore data from GA digitised charts
23offshore_name1 = 'pt_hedland_offshore_points'
24
25# offshore data from AHO fairsheets
26offshore_name2 = 'pt_hedland_offshore_points_fairsheet'
27
28# coastline developed from 30m DTED
29coast_name = 'pt_hedland_coastline_points.xya'
30
31boundary_basename = 'SU-AU_clip'
32
33#swollen/ all data output
34basename = 'source'
35
36codename = 'project.py'
37
38if sys.platform == 'win32':
39    home = getenv('INUNDATIONHOME') #Sandpit's parent dir
40#    python_home = getenv('PWD')     
41    #user = basename(getenv('USERPROFILE'))
42    #print 'USER:', user
43else:
44    # original
45    #home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation')
46    # update to perlite 2
47    home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'2'+sep+'cit'+sep+'inundation'+sep+'data')     
48    user = getenv('LOGNAME')
49
50#Derive subdirectories and filenames
51time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
52outputtimedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep+time+sep
53
54#print 'outputtimedir', outputtimedir
55#meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep
56#datadir = home+sep+scenario_dir_name+sep+'topographies'+sep
57#gaugedir = home+sep+scenario_dir_name+sep+'gauges'+sep
58#polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep
59#boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep
60#outputdir = home+sep+scenario_dir_name+sep+'outputs'+sep
61#tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep
62
63meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
64datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
65gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
66polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
67boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
68outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
69tidedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'tide_data'+sep
70
71gauge_filename = gaugedir + 'gauge_location_port_hedland.csv'
72buildings_filename = gaugedir + 'pt_hedland_res.csv'
73community_filename = gaugedir + 'CHINS_v2.csv'
74community_scenario = gaugedir + 'community_pt_hedland.csv'
75tidal_filename = tidedir + 'pt_hedland_tide.txt'
76coast_filename = datadir + coast_name
77
78meshname = meshdir + basename
79onshore_dem_name = datadir + onshore_name_dted
80offshore_dem_name1 = datadir + offshore_name1
81offshore_dem_name2 = datadir + offshore_name2
82combined_dem_name = datadir + 'pt_hedland_combined_elevation'
83outputname = outputtimedir + basename  #Used by post processing
84
85# clipping region to make DEM (pts file) from onshore data
86eastingmin = 594000
87eastingmax = 715000
88northingmin = 7720000
89northingmax = 7880000
90
91# for ferret2sww
92south = degminsec2decimal_degrees(-20,30,0)
93north = degminsec2decimal_degrees(-17,10,0)
94west = degminsec2decimal_degrees(117,00,0)
95east = degminsec2decimal_degrees(120,00,0)
96
97# region to export (used from export_results.py)
98e_min_area = 633000
99e_max_area = 690000
100n_min_area = 7740000
101n_max_area = 7761000
102
103refzone = 50 
104
105# bounding polygon provided by Hamish
106#d0 = [818732.55, 8062768.27]
107"""
108old
109d0 = [755000.0, 8025000.0]
110d1 = [708940.32, 7750510.33]
111d2 = [656561.15, 7732615.11]
112d3 = [604415.81, 7733013.56]
113d4 = [517682.34, 7899310.22]
114"""
115
116d0 = [763852.0, 7934358.0]
117d1 = [710987.0, 7925797.0]
118d2 = [658264.0, 7926314.0]
119d3 = [552686.0, 7871580.0]
120#d4 = [604415.81, 7733013.56]
121d4 = [638000.0, 7733013.56]
122#d5 = [656561.15, 7732615.11]
123d5 = [662000.0, 7732615.11]
124#d6 = [708940.32, 7750510.33]
125d6 = [690000.0, 7740510.33]
126
127polyAll = [d0, d1, d2, d3, d4, d5, d6]
128
129#Interior region - Pt Hedland town
130i0 = [668000, 7757000]
131i1 = [659000, 7755000]
132i2 = [660000, 7749000]
133i3 = [667000, 7746000]
134i4 = [678000, 7751000]
135
136poly_pt_hedland = [i0, i1, i2, i3, i4]
137
138#Are there other significant features?
139j0 = [670000, 7760000]
140j1 = [633000, 7745000]
141j2 = [665000, 7743000]
142j3 = [690000, 7755000]
143
144poly_region = [j0, j1, j2, j3]
Note: See TracBrowser for help on using the repository browser.