source: production/broome_2006/project.py @ 3514

Last change on this file since 3514 was 3514, checked in by duncan, 18 years ago

Hi all,
I'm doing a change in the anuga structure, moving the code to

\anuga_core\source\anuga

After you have done an svn update, the PYTHONPATH has to be changed to;
PYTHONPATH = anuga_core/source/

This is part of changes required to make installation of anuga quicker and reducing the size of our sandpits.

If any imports are broken, try fixing them. With adding anuga. to them for example. If this seems to have really broken things, email/phone me.

Cheers
Duncan

File size: 5.3 KB
Line 
1"""Common filenames and locations for topographic data, meshes and outputs.
2"""
3
4from os import sep, environ, getenv, getcwd
5from os.path import expanduser, basename
6#from anuga.utilities.polygon import read_polygon
7import sys
8from pmesh.create_mesh import convert_points_from_latlon_to_utm
9from coordinate_transforms.redfearn import degminsec2decimal_degrees
10from time import localtime, strftime
11from anuga.geospatial_data.geospatial_data import *
12
13#Making assumptions about the location of scenario data
14state = 'western_australia'
15scenario_dir_name = 'broome_tsunami_scenario_2006'
16
17# all data to be delivered by National Mapping
18# onshore data from 30m DTED level 2
19onshore_name_dted = 'broome_onshore_30m_dted' 
20onshore_name_dli = 'broome_onshore_20m_dli' 
21
22# offshore data from GA digitised charts
23offshore_name1 = 'broome_offshore_points'
24
25# offshore data from AHO fairsheets
26offshore_name2 = 'broome_offshore_points_fairsheet'
27
28# coastline developed from aerial photography and 1.5m DLI contour
29coast_name = 'broome_coastline_points'
30
31boundary_basename = 'SU-AU_clip'
32
33#swollen/ all data output
34basename = 'source'
35codename = 'project.py'
36
37if sys.platform == 'win32':
38    home = getenv('INUNDATIONHOME') #Sandpit's parent dir     
39    user = getenv('USERPROFILE')
40else:
41    # update to perlite 2
42    home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'2'+sep+'cit'+sep+'inundation'+sep+'data')     
43    user = getenv('LOGNAME')
44
45#Derive subdirectories and filenames
46time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
47outputtimedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep+time+sep
48
49meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
50datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
51gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
52polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
53boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
54outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
55tidedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'tide_data'+sep
56
57gauge_filename = gaugedir + 'gauge_location_broome.csv'
58buildings_filename = gaugedir + 'broome_res.csv'
59buildings_filename_out = 'broome_res_modified.csv'
60buildings_filename_damage_out = 'broome_res_modified_damage.csv'
61community_filename = gaugedir + 'CHINS_v2.csv'
62community_scenario = gaugedir + 'community_pt_hedland.csv'
63tidal_filename = tidedir + 'pt_hedland_tide.txt'
64
65meshname = meshdir + basename
66onshore_dem_name = datadir + onshore_name_dli
67offshore_dem_name1 = datadir + offshore_name1
68offshore_dem_name2 = datadir + offshore_name2
69coast_dem_name = datadir + coast_name
70combined_dem_name = datadir + 'broome_combined_elevation'
71outputname = outputtimedir + basename  #Used by post processing
72
73# for ferret2sww
74south = degminsec2decimal_degrees(-20,30,0)
75north = degminsec2decimal_degrees(-17,10,0)
76west = degminsec2decimal_degrees(117,00,0)
77east = degminsec2decimal_degrees(120,00,0)
78
79# region to export (used from export_results.py)
80e_min_area = 648000
81e_max_area = 675000
82n_min_area = 7745000
83n_max_area = 7761000
84
85export_region = [[e_min_area,n_min_area],[e_min_area,n_max_area],[e_max_area,n_max_area],[e_max_area,n_min_area]]
86                 
87refzone = 50 
88
89from coordinate_transforms.redfearn import redfearn
90# boundary up to 50 m contour
91lat1_50 = degminsec2decimal_degrees(-19,20,0)
92lat2_50 = degminsec2decimal_degrees(-19,30,0)
93lat3_50 = degminsec2decimal_degrees(-19,45,0)
94lon1_50 = degminsec2decimal_degrees(119,05,0)
95lon2_50 = degminsec2decimal_degrees(118,20,0)
96lon3_50 = degminsec2decimal_degrees(117,45,0)
97z, easting, northing = redfearn(lat1_50, lon1_50)
98d0_50 = [easting, northing]
99z, easting, northing = redfearn(lat2_50, lon2_50)
100d1_50 = [easting, northing]
101z, easting, northing= redfearn(lat3_50, lon3_50)
102d2_50 = [easting, northing]
103
104d4_50 = [285000, 7585000]
105d6_50 = [330000, 7605000]
106#bounding_poly50 = [p0_50, p1_50, p2_50, d6_50, d5, d4_50]
107
108d0 = [763852.0, 7934358.0]
109d1 = [710987.0, 7925797.0]
110d2 = [658264.0, 7926314.0]
111d3 = [552686.0, 7871580.0]
112#d4 = [604415.81, 7733013.56]
113d4 = [638000.0, 7733013.56]
114#d5 = [656561.15, 7732615.11]
115d5 = [662000.0, 7732615.11]
116#d6 = [708940.32, 7750510.33]
117d6 = [690000.0, 7740510.33]
118#polyAll = [d0, d1, d2, d3, d4, d5, d6]
119#polyAll = [d0_50, d1_50, d2_50, d4, d5, d6]
120# from Hamish
121h0=[629262.17, 7747205.47]
122h1=[552686.00, 7871579.99] #d3
123h2=[658264.00, 7926314.00] #d2
124h3=[710986.99, 7925796.99] #d1
125h4=[763851.99, 7934357.99] #d0
126h5=[701485.21, 7770656.86]
127h6=[698273.75, 7762227.38]
128h7=[698194.23, 7762018.65]
129h8=[691627.41, 7744781.98]
130h9=[679220.75, 7743604.59]
131h10=[653512.59, 7740528.56]
132h11=[634777.71, 7738247.17]
133h12=[629443.86, 7746910.37]
134h13=[629396.84, 7746986.75]
135h14=[629352.32, 7747059.06]
136h15=[629276.24, 7747182.63]
137h16=[629262.17, 7747205.47] #repeat of h0
138# using Hamish's new bounding polygon
139#polyAll = [d0_50, d1_50, d2_50, h16,h15,h14,h13,h12,h11,h10,h9,h8,h7,h6,h5]
140polyAll = [d0_50, d1_50, d2_50, h16,h11,h8,h6, h5]
141
142#Interior region - Broome centre
143i0 = [668000, 7757000]
144i1 = [659000, 7755000]
145i2 = [660000, 7749000]
146i3 = [667000, 7746000]
147i4 = [678000, 7751000]
148
149poly_broome = [i0, i1, i2, i3, i4]
150
151#Are there other significant features?
152j0 = [670000, 7760000]
153j1 = [633000, 7745000]
154j2 = [665000, 7743000]
155j3 = [690000, 7755000]
156
157poly_region = [j0, j1, j2, j3]
Note: See TracBrowser for help on using the repository browser.