source: anuga_work/production/gold_coast_2007/project.py @ 4853

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

reflecting updated function in other files

File size: 3.1 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_points, polygon_area, is_inside_polygon
10
11if sys.platform == 'win32':
12    home = getenv('INUNDATIONHOME')
13    user = getenv('USERPROFILE')
14
15else:   
16    home = getenv('INUNDATIONHOME', sep+'d'+sep+'xrd'+sep+'gem'+sep+'2'+sep+'ramp'+sep+'risk_assessment_methods_project'+sep+'inundation')     
17    user = getenv('LOGNAME')
18    print 'USER:', user
19
20# INUNDATIONHOME is the inundation directory, not the data directory.
21home += sep +'data'
22
23#Making assumptions about the location of scenario data
24state = 'queensland'
25scenario_dir_name = 'gold_coast_hypothetical'
26
27# 250K product
28gc250 = 'dem_250'
29
30# better DEM
31gc5 = 'dem_5m_ascii'
32offshore = 'xy_AHD'
33coastline = 'coastline'
34
35#swollen/ all data output
36basename = 'source'
37codename = 'project.py'
38
39#Derive subdirectories and filenames
40local_time = strftime('%Y%m%d_%H%M%S',gmtime()) 
41meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
42datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
43gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
44polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
45boundarydir = home+sep+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
46outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
47outputtimedir = outputdir + local_time + sep
48polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
49alex_datadir = home+sep+state+sep+scenario_dir_name+sep+'elevation_final'+sep+'points'+sep
50
51codedir = getcwd()+sep                           
52codedirname = codedir + 'project.py'
53meshname = outputtimedir + 'mesh_' + basename
54
55# Necessary if using point datasets, rather than grid
56gc_dem_name = alex_datadir + gc5
57offshore_name = datadir + offshore
58coast_name = datadir + coastline
59combined_dem_name   = datadir + 'gc_elevation'
60
61gauge_name = gaugedir + 'gc_gauges.csv'
62buildings_filename = gaugedir + 'gc_nexis.csv'
63buildings_filename_out = 'gc_nexis_modified.csv'
64###############################
65# Domain definitions
66###############################
67
68# bounding polygon for study area
69polyAll = read_polygon(polygondir+'extentv2.csv')
70
71print 'Area of bounding polygon', polygon_area(polyAll)/1000000.0
72
73###############################
74# Interior region definitions
75###############################
76
77# digitized polygons
78poly_int = read_polygon(polygondir+'surfers.csv')
79
80print 'Area of local polygon', polygon_area(poly_int)/1000000.0
81
82poly_bathy = read_polygon(polygondir+'mainland_only.csv')
83
84###################################################################
85# Clipping regions for export to asc and regions for clipping data
86###################################################################
87
88# exporting asc grid
89eastingmin = 534300
90eastingmax = 546775
91northingmin = 6890000
92northingmax = 6912925
Note: See TracBrowser for help on using the repository browser.