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

Last change on this file since 4358 was 4358, checked in by nick, 18 years ago

update to broome

File size: 5.4 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 = 'Broome_topography_DLI' # original
39
40#island
41#island_name = 'rott_dli_ext' # original
42
43# offshore
44coast_name = 'Broome_coastline'
45
46offshore_name = 'Broome_Bathymetry'
47offshore_name1 = 'inferred_north'
48offshore_name2 = 'inferred_south'
49
50#final topo name
51combined_name ='broome_combined_elevation'
52combined_small_name = 'broome_combined_elevation_small'
53
54topographies_in_dir = home+sep+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep+'Feb07'+sep
55topographies_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'topographies'+sep
56topographies_time_dir = topographies_dir+build_time+sep
57
58#input topo file location
59onshore_in_dir_name = topographies_in_dir + onshore_name
60#island_in_dir_name = topographies_in_dir + island_name
61
62coast_in_dir_name = topographies_in_dir + coast_name
63
64offshore_in_dir_name = topographies_in_dir + offshore_name
65offshore_in_dir_name1 = topographies_in_dir + offshore_name1
66offshore_in_dir_name2 = topographies_in_dir + offshore_name2
67
68onshore_dir_name = topographies_dir + onshore_name
69
70#island_dir_name = topographies_dir + island_name
71
72coast_dir_name = topographies_dir + coast_name
73
74offshore_dir_name = topographies_dir + offshore_name
75offshore_dir_name1 = topographies_dir + offshore_name1
76offshore_dir_name2 = topographies_dir + offshore_name2
77
78#final topo files
79combined_dir_name = topographies_dir + combined_name
80combined_small_name_dir = topographies_dir + combined_small_name
81
82meshes_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'meshes'+sep
83meshes_dir_name = meshes_dir + scenario_name
84
85polygons_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'polygons'+sep
86tide_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'tide_data'+sep
87
88
89boundaries_source = '????'
90#boundaries locations
91boundaries_in_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+boundaries_source+sep
92boundaries_in_dir_name = boundaries_in_dir + scenario_name
93boundaries_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep
94boundaries_dir_name = boundaries_dir + scenario_name
95#boundaries_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+build_time+sep
96#boundaries_time_dir_name = boundaries_time_dir + boundaries_name  #Used by post processing
97
98#output locations
99output_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep
100output_build_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep+build_time+sep
101output_run_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep+run_time+sep
102output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
103
104#gauges
105gauge_name = 'broome_gauges.csv'
106gauges_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'gauges'+sep
107gauges_dir_name = gauges_dir + gauge_name
108
109community_filename = gauges_dir + 'CHINS_v2.csv'
110community_broome = gauges_dir + 'community_broome.csv'
111
112#buildings_filename = gauges_dir + 'broome_res_nexis.csv'
113buildings_filename_damage_out = 'broome_res_nexis_modified.csv'
114
115###############################
116# Domain definitions
117###############################
118from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
119
120poly_all = read_polygon(polygons_dir+'extent.csv')
121res_poly_all = 150000
122
123###############################
124# Interior region definitions
125###############################
126
127poly_0 = read_polygon(polygons_dir+'neg20_coast_contour_pts.csv')
128res_0 = 10000
129poly_1 = read_polygon(polygons_dir+'broome_north_coast_inside_extent.csv')
130res_1 = 5000
131
132poly_2 = read_polygon(polygons_dir+'broome_south_coast_inside_extent.csv')
133res_2 = 5000
134
135poly_3 = read_polygon(polygons_dir+'Broome_town_pts.csv')
136res_3 = 2000
137
138poly_4 = read_polygon(polygons_dir+'Broome_inner_town_pts.csv')
139res_4 = 500
140#assert zone == refzone
141
142interior_regions = [[poly_0,res_0],[poly_1,res_1],[poly_2,res_2]
143                     ,[poly_3,res_3],[poly_4,res_4]]
144
145trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
146
147print 'min number triangles', trigs_min
148
149###################################################################
150# Clipping regions for export to asc and regions for clipping data
151###################################################################
152
153# exporting asc grid
154eastingmin = 406215.87
155eastingmax = 440208.78
156northingmin = 7983427.73
157northingmax = 8032834.52
158
159
160
Note: See TracBrowser for help on using the repository browser.