source: anuga_work/production/perth_2006/project.py @ 4856

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

rename plot_polygons_points to original name of plot_polygons

File size: 5.6 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.6
31
32#Making assumptions about the location of scenario data
33state = 'western_australia'
34scenario_name = 'perth'
35scenario = 'perth_tsunami_scenario_2006'
36
37# onshore data provided by WA DLI
38onshore_name = 'perth_dli_ext' # original
39#island
40island_name = 'rott_dli_ext' # original
41island_name1 = 'gard_dli_ext'
42island_name2 = 'carnac_island_dted'
43island_name3 = 'penguin_dted'
44
45# AHO + DPI data + colin French coastline
46coast_name = 'waterline'
47offshore_name = 'perth_bathymetry'
48offshore1_name = 'missing_fairsheets'
49
50#final topo name
51combined_name ='perth_combined_elevation'
52combined_smaller_name = 'perth_combined_elevation_smaller'
53
54
55topographies_in_dir = home+sep+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep
56topographies_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'topographies'+sep
57topographies_time_dir = topographies_dir+build_time+sep
58
59# input topo file location
60onshore_in_dir_name = topographies_in_dir + onshore_name
61island_in_dir_name = topographies_in_dir + island_name
62island_in_dir_name1 = topographies_in_dir + island_name1
63island_in_dir_name2 = topographies_in_dir + island_name2
64island_in_dir_name3 = topographies_in_dir + island_name3
65
66coast_in_dir_name = topographies_in_dir + coast_name
67offshore_in_dir_name = topographies_in_dir + offshore_name
68offshore1_in_dir_name = topographies_in_dir + offshore1_name
69
70onshore_dir_name = topographies_dir + onshore_name
71island_dir_name = topographies_dir + island_name
72island_dir_name1 = topographies_dir + island_name1
73island_dir_name2 = topographies_dir + island_name2
74island_dir_name3 = topographies_dir + island_name3
75
76coast_dir_name = topographies_dir + coast_name
77offshore_dir_name = topographies_dir + offshore_name
78
79#final topo files
80combined_dir_name = topographies_dir + combined_name
81combined_time_dir_name = topographies_time_dir + combined_name
82combined_smaller_name_dir = topographies_dir + combined_smaller_name
83#combined_time_dir_final_name = topographies_time_dir + combined_final_name
84
85
86
87meshes_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'meshes'+sep
88meshes_dir_name = meshes_dir + scenario_name
89
90polygons_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'polygons'+sep
91tide_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'tide_data'+sep
92
93
94boundaries_source = '????'
95#boundaries locations
96boundaries_in_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+boundaries_source+sep
97boundaries_in_dir_name = boundaries_in_dir + scenario_name
98boundaries_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep
99boundaries_dir_name = boundaries_dir + scenario_name
100#boundaries_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+build_time+sep
101#boundaries_time_dir_name = boundaries_time_dir + boundaries_name  #Used by post processing
102
103#output locations
104output_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep
105output_build_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep+build_time+sep
106output_run_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep+run_time+sep
107output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
108
109#gauges
110gauge_name = 'perth.csv'
111gauges_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'gauges'+sep
112gauges_dir_name = gauges_dir + gauge_name
113
114buildings_filename = gauges_dir + 'Perth_res_Project.csv'
115buildings_filename_out = 'Perth_res_Project_modified.csv'
116
117###############################
118# Domain definitions
119###############################
120from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
121
122poly_all = read_polygon(polygons_dir+'bounding_poly.csv')
123res_poly_all = 100000
124
125refzone = 50 
126
127
128###############################
129# Interior region definitions
130###############################
131
132#poly_pos20_neg20 = read_polygon(polygons_dir+'pos20_neg20pts.csv')
133poly_pos20_neg20 = read_polygon(polygons_dir+'pos20_neg20_new_pts.csv')
134res_pos20_neg20 = 20000
135
136#poly_cbd = read_polygon(polygons_dir+'cbd_pts.csv')
137poly_cbd = read_polygon(polygons_dir+'cbd_new_pts.csv')
138res_cbd = 1000
139
140poly_penguin = read_polygon(polygons_dir+'penguin_pts.csv')
141res_penguin = 1000
142#assert zone == refzone
143
144interior_regions = [[poly_pos20_neg20,res_pos20_neg20],[poly_cbd,res_cbd]
145                     ,[poly_penguin,res_penguin]]
146
147trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
148
149print 'min number triangles', trigs_min
150
151###################################################################
152# Clipping regions for export to asc and regions for clipping data
153###################################################################
154
155# exporting asc grid
156eastingmin = 406215.87
157eastingmax = 440208.78
158northingmin = 7983427.73
159northingmax = 8032834.52
160
161
162
Note: See TracBrowser for help on using the repository browser.