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

Last change on this file since 4294 was 4294, checked in by sexton, 18 years ago

slide report updates and gold coast hypothetical

File size: 2.7 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, 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#swollen/ all data output
31basename = 'source'
32codename = 'project.py'
33
34#Derive subdirectories and filenames
35local_time = strftime('%Y%m%d_%H%M%S',gmtime()) 
36meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
37datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
38gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
39polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
40boundarydir = home+sep+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
41outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
42outputtimedir = outputdir + local_time + sep
43polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
44
45#gauge_filename = gaugedir + 'sydney_slide_gauges.csv'
46codedir = getcwd()+sep                           
47codedirname = codedir + 'project.py'
48meshname = outputtimedir + 'mesh_' + basename
49
50# Necessary if using point datasets, rather than grid
51gc_dem_name = datadir + gc250
52combined_dem_name   = datadir + 'gc_elevation'
53
54###############################
55# Domain definitions
56###############################
57
58# bounding polygon for study area
59polyAll = read_polygon(polygondir+'extent.csv')
60
61print 'Area of bounding polygon', polygon_area(polyAll)/1000000.0
62
63###############################
64# Interior region definitions
65###############################
66
67# digitized polygons
68poly_int = read_polygon(polygondir+'surfers.csv')
69
70print 'Area of local polygon', polygon_area(poly_int)/1000000.0
71
72###################################################################
73# Clipping regions for export to asc and regions for clipping data
74###################################################################
75
76# exporting asc grid
77eastingmin = 538450
78eastingmax = 546775
79northingmin = 6890540
80northingmax = 6902925
Note: See TracBrowser for help on using the repository browser.