source: anuga_work/production/busselton/2006/project.py @ 5786

Last change on this file since 5786 was 4995, checked in by nick, 17 years ago

updates to busselton

File size: 4.9 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'
28#print 'gtime: ', gtime
29
30tide = 0.6
31
32#Making assumptions about the location of scenario data
33state = 'western_australia'
34scenario_name = 'busselton'
35scenario = 'busselton_tsunami_scenario_2006'
36
37# onshore data provided by WA DLI
38onshore_name = 'DLI_orthophoto_DEM' # original
39#islands
40
41# AHO + DPI data
42coast_name = '100k_coastline'
43offshore_name = 'Bathymetry'
44
45#final topo name
46combined_name ='busselton_combined_elevation'
47combined_smaller_name = 'busselton_combined_elevation_smaller'
48
49
50topographies_in_dir = home+sep+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep
51topographies_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'topographies'+sep
52topographies_time_dir = topographies_dir+build_time+sep
53
54#input topo file location
55onshore_in_dir_name = topographies_in_dir + onshore_name
56#island_in_dir_name = topographies_in_dir + island_name
57
58coast_in_dir_name = topographies_in_dir + coast_name
59offshore_in_dir_name = topographies_in_dir + offshore_name
60
61onshore_dir_name = topographies_dir + onshore_name
62#island_dir_name = topographies_dir + island_name
63
64coast_dir_name = topographies_dir + coast_name
65offshore_dir_name = topographies_dir + offshore_name
66
67#final topo files
68combined_dir_name = topographies_dir + combined_name
69combined_time_dir_name = topographies_time_dir + combined_name
70combined_smaller_dir_name = topographies_dir + combined_smaller_name
71
72meshes_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'meshes'+sep
73meshes_dir_name = meshes_dir + scenario_name
74
75polygons_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'polygons'+sep
76tide_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'tide_data'+sep
77
78boundaries_source = '????'
79#boundaries locations
80boundaries_in_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+boundaries_source+sep
81boundaries_in_dir_name = boundaries_in_dir + scenario_name
82boundaries_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep
83boundaries_dir_name = boundaries_dir + scenario_name
84#boundaries_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+build_time+sep
85#boundaries_time_dir_name = boundaries_time_dir + boundaries_name  #Used by post processing
86
87#output locations
88output_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep
89output_build_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep+build_time+sep
90output_run_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep+run_time+sep
91output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
92
93#gauges
94gauge_name = '???.csv'
95gauges_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'gauges'+sep
96gauges_dir_name = gauges_dir + gauge_name
97
98buildings_filename = gauges_dir + 'Busselton_res_Project.csv'
99buildings_filename_out = 'Busselton_res_Project_modified.csv'
100
101###############################
102# Domain definitions
103###############################
104
105# bounding box for clipping MOST/URS output (much bigger than study area)
106
107# bounding polygon for study area
108poly_all = read_polygon(polygons_dir+'poly_all.csv')
109res_poly_all = 100000
110
111###################################################################
112# Clipping regions for export to asc and regions for clipping data
113###################################################################
114
115# exporting asc grid
116eastingmin = 406215.87
117eastingmax = 440208.78
118northingmin = 7983427.73
119northingmax = 8032834.52
120
121###############################
122# Interior region definitions
123###############################
124
125#digitized polygons
126poly_busselton1 = read_polygon(polygons_dir+'neg20_pos10_polygon.csv')
127res_busselton1 = 10000
128poly_busselton2 = read_polygon(polygons_dir+'neg5_pos5_poly_.csv')
129res_busselton2 = 500
130
131#plot_polygons([polyAll,poly_broome1,poly_broome2,poly_broome3],figname='boundingpoly2',verbose=False)
132
133interior_regions = [[poly_busselton1,res_busselton1],[poly_busselton2,res_busselton2]]
134
135trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
136
137print 'min number triangles', trigs_min
138
139
Note: See TracBrowser for help on using the repository browser.