source: anuga_work/production/broome_2006/project.py @ 4228

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

(1) add building damage scripts for the study areas and update project.py (2) update report generation scripts (3) update Gantt chart (4) report updates to reflect URS input

File size: 6.0 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, is_inside_polygon, number_mesh_triangles
10#from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_points_from_latlon_to_utm
11from anuga.utilities.system_tools import get_user_name
12
13# file and system info
14#---------------------------------
15codename = 'project.py'
16
17home = getenv('INUNDATIONHOME') #Sandpit's parent dir   
18user = get_user_name()
19
20# INUNDATIONHOME is the inundation directory, not the data directory.
21home += sep +'data'
22
23#time stuff
24time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
25gtime = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
26build_time = time+'_build'
27run_time = time+'_run'
28print 'gtime: ', gtime
29
30tide = 0
31
32#Making assumptions about the location of scenario data
33state = 'western_australia'
34scenario_name = 'broome'
35scenario = 'broome_tsunami_scenario_2006'
36
37# onshore data provided by WA DLI
38onshore_name = 'dted2_z51' # original
39
40#island
41#island_name = 'rott_dli_ext' # original
42
43# offshore
44coast_name = 'coastline'
45offshore_name1 = 'XY100011610'
46offshore_name2 = 'XY100011611'
47offshore_name3 = 'XY100011613'
48offshore_name4 = 'XY100011614'
49offshore_name5 = 'XY100011616'
50offshore_name6 = 'XY100011617'
51offshore_name7 = 'XY100011618'
52offshore_name8 = 'XY100011621'
53offshore_name9 = 'XY100011623'
54offshore_name10 = 'XY100011745'
55offshore_name11 = 'XY100011746'
56offshore_name12 = 'XY100017530'
57offshore_name13 = 'XY100017532'
58offshore_name14 = 'XY100017538'
59offshore_name15 = 'XY100017540'
60offshore_name16 = 'XYBR66'
61offshore_name17 = 'XYBR70'
62offshore_name18 = 'XYBR80'
63offshore_name19 = 'XYBR88'
64offshore_name20 = 'XYBR93'
65offshore_name21 = 'XYBR0110'
66offshore_name22 = 'XYWADPI'
67
68#final topo name
69combined_name ='perth_combined_elevation'
70combined_smaller_name = 'perth_combined_elevation_smaller'
71
72
73topographies_in_dir = home+sep+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep
74topographies_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'topographies'+sep
75topographies_time_dir = topographies_dir+build_time+sep
76
77#input topo file location
78onshore_in_dir_name = topographies_in_dir + onshore_name
79island_in_dir_name = topographies_in_dir + island_name
80island_in_dir_name1 = topographies_in_dir + island_name1
81island_in_dir_name2 = topographies_in_dir + island_name2
82island_in_dir_name3 = topographies_in_dir + island_name3
83
84coast_in_dir_name = topographies_in_dir + coast_name
85offshore_in_dir_name = topographies_in_dir + offshore_name
86offshore1_in_dir_name = topographies_in_dir + offshore1_name
87
88onshore_dir_name = topographies_dir + onshore_name
89island_dir_name = topographies_dir + island_name
90island_dir_name1 = topographies_dir + island_name1
91island_dir_name2 = topographies_dir + island_name2
92island_dir_name3 = topographies_dir + island_name3
93
94coast_dir_name = topographies_dir + coast_name
95offshore_dir_name = topographies_dir + offshore_name
96
97#final topo files
98combined_dir_name = topographies_dir + combined_name
99combined_time_dir_name = topographies_time_dir + combined_name
100combined_smaller_name_dir = topographies_dir + combined_smaller_name
101#combined_time_dir_final_name = topographies_time_dir + combined_final_name
102
103meshes_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'meshes'+sep
104meshes_dir_name = meshes_dir + scenario_name
105
106polygons_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'polygons'+sep
107tide_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'tide_data'+sep
108
109
110boundaries_source = '????'
111#boundaries locations
112boundaries_in_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+boundaries_source+sep
113boundaries_in_dir_name = boundaries_in_dir + scenario_name
114boundaries_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep
115boundaries_dir_name = boundaries_dir + scenario_name
116#boundaries_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+build_time+sep
117#boundaries_time_dir_name = boundaries_time_dir + boundaries_name  #Used by post processing
118
119#output locations
120output_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep
121output_build_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep+build_time+sep
122output_run_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep+run_time+sep
123output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
124
125#gauges
126gauge_name = 'broome_gauges.csv'
127gauges_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'gauges'+sep
128gauges_dir_name = gauges_dir + gauge_name
129
130community_filename = gauges_dir + 'CHINS_v2.csv'
131community_broome = gauges_dir + 'community_broome.csv'
132
133#buildings_filename = gauges_dir + 'broome_res_nexis.csv'
134buildings_filename_damage_out = 'broome_res_nexis_modified.csv'
135
136###############################
137# Domain definitions
138###############################
139from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
140
141poly_all = read_polygon(polygons_dir+'extent.csv')
142res_poly_all = 100000
143
144###############################
145# Interior region definitions
146###############################
147
148poly_1 = read_polygon(polygons_dir+'Broome_Local_Polygon_update.csv')
149res_1 = 20000
150
151poly_2 = read_polygon(polygons_dir+'Broome_Close2_update.csv')
152res_2 = 1000
153
154poly_3 = read_polygon(polygons_dir+'Broome_Coast_update2.csv')
155res_3 = 1000
156#assert zone == refzone
157
158interior_regions = [[poly_1,res_1],[poly_2,res_2]
159                     ,[poly_3,res_3]]
160
161trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
162
163print 'min number triangles', trigs_min
164
165###################################################################
166# Clipping regions for export to asc and regions for clipping data
167###################################################################
168
169# exporting asc grid
170eastingmin = 406215.87
171eastingmax = 440208.78
172northingmin = 7983427.73
173northingmax = 8032834.52
174
175
176
Note: See TracBrowser for help on using the repository browser.