source: anuga_work/production/busselton_2006/project.py @ 4282

Last change on this file since 4282 was 4228, checked in by sexton, 18 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: 4.9 KB
RevLine 
[3908]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
[4132]9from anuga.utilities.polygon import read_polygon, plot_polygons, is_inside_polygon, number_mesh_triangles
[4094]10#from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_points_from_latlon_to_utm
11from anuga.utilities.system_tools import get_user_name
[3908]12
[4094]13# file and system info
14#---------------------------------
15codename = 'project.py'
[3908]16
[4094]17home = getenv('INUNDATIONHOME') #Sandpit's parent dir   
18user = get_user_name()
[3908]19
20# INUNDATIONHOME is the inundation directory, not the data directory.
21home += sep +'data'
22
[4094]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'
[4132]28#print 'gtime: ', gtime
[4094]29
30tide = 0.6
31
[3908]32#Making assumptions about the location of scenario data
33state = 'western_australia'
[4094]34scenario_name = 'busselton'
35scenario = 'busselton_tsunami_scenario_2006'
[3908]36
37# onshore data provided by WA DLI
[4094]38onshore_name = 'DLI_orthophoto_DEM' # original
39#islands
[3908]40
41# AHO + DPI data
[4094]42coast_name = '100k_coastline'
43offshore_name = 'Bathymetry'
[3908]44
[4094]45#final topo name
46combined_name ='busselton_combined_elevation'
47combined_smaller_name = 'busselton_combined_elevation_smaller'
[3908]48
49
[4094]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
[3908]53
[4094]54#input topo file location
55onshore_in_dir_name = topographies_in_dir + onshore_name
56#island_in_dir_name = topographies_in_dir + island_name
[3908]57
[4094]58coast_in_dir_name = topographies_in_dir + coast_name
59offshore_in_dir_name = topographies_in_dir + offshore_name
[3908]60
[4094]61onshore_dir_name = topographies_dir + onshore_name
62#island_dir_name = topographies_dir + island_name
[3908]63
[4094]64coast_dir_name = topographies_dir + coast_name
65offshore_dir_name = topographies_dir + offshore_name
[3908]66
[4094]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
[3908]71
[4094]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
[4228]98#buildings_filename = gauges_dir + 'busselton_res_nexis.csv'
99buildings_filename_damage_out = 'busselton_res_nexis_modified.csv'
[4094]100
[3908]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
[4094]108poly_all = read_polygon(polygons_dir+'poly_all.csv')
[4143]109res_poly_all = 100000
[3908]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
[4132]125#digitized polygons
126poly_busselton1 = read_polygon(polygons_dir+'neg20_pos10_polygon.csv')
[4143]127res_busselton1 = 10000
[4132]128poly_busselton2 = read_polygon(polygons_dir+'neg5_pos5_poly_.csv')
[4143]129res_busselton2 = 500
[3908]130
[4094]131#plot_polygons([polyAll,poly_broome1,poly_broome2,poly_broome3],'boundingpoly2',verbose=False)
[3908]132
[4132]133interior_regions = [[poly_busselton1,res_busselton1],[poly_busselton2,res_busselton2]]
[3908]134
[4094]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.