source: anuga_work/development/boxingday08/project.py @ 5370

Last change on this file since 5370 was 5247, checked in by jakeman, 17 years ago

First commit of 2008 Boxing day validation files

File size: 2.6 KB
Line 
1"""Common filenames and locations for topographic data, meshes and outputs.
2Author: John Jakeman, The Australian National University (2008)
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, \
10                                    polygon_area, is_inside_polygon
11from anuga.coordinate_transforms.redfearn import convert_from_latlon_to_utm
12from time import localtime, strftime
13
14def convert_arcgis_latlon_list_to_utm(points):
15     #Used because arc gis produced csv files put lat lon in
16     #reverse order to those accpeted by convert_latlon_to_utm()
17     
18     from anuga.coordinate_transforms.geo_reference import Geo_reference
19     from anuga.coordinate_transforms.redfearn import redfearn
20     old_geo = Geo_reference() 
21     utm_points = []
22     for point in points:
23         zone, easting, northing = redfearn(float(point[1]),float(point[0]))
24         new_geo = Geo_reference(zone)
25         old_geo.reconcile_zones(new_geo) 
26         utm_points.append([easting,northing])
27
28     return utm_points, old_geo.get_zone()
29
30###############################
31# Domain definitions
32###############################
33
34# Bathymetry and topography filenames
35dir='data'
36
37time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
38poor_combined_dir_name = dir+sep+'poor_phuket_bathymetry'
39good_combined_dir_name = dir+sep+'good_phuket_bathymetry'
40meshname = 'phuket_mesh'
41mesh_elevname = 'phuket_mesh_elev'
42boundary_most_in = dir+sep+'out'
43boundary_most_out = dir+sep+'most_boundary_condition'
44
45dir='mesh_polygons'
46#extent = 'extent.csv'
47extent = 'boundary_new_pts.csv'
48# bounding polygon for study area
49bounding_polygon = read_polygon(dir+sep+extent)
50patong_bay_polygon = read_polygon(dir+sep+'patong_bay_polygon.csv')
51
52###############################
53# Interior region definitions
54###############################
55
56island_south = read_polygon(dir+sep+'south_island.csv')
57island_south2 = read_polygon(dir+sep+'south_island2.csv')
58island_north = read_polygon(dir+sep+'north_island.csv')
59bay = read_polygon(dir+sep+'bay.csv')
60patong = read_polygon(dir+sep+'patong.csv')
61contour20m = read_polygon(dir+sep+'20m.csv')
62
63
64
65#max_extent_of MOST file
66#east  = 94.93325
67#west  = 80.0003
68#north = 10.0000
69#south = -4.9330
70
71#max_extent_of MOST file should be
72#east  = 104.0
73#west  = 80.0
74#north = 10.0
75#south = -5.0
76
77#max_extent of ol simulation is why does this work and not below
78#7.40911081272 8.71484358635 99.1683687224 97.513856322
79
80#max extent of clipped MOST file
81east  = 100
82west  = 96.0
83north = 9.0
84south = 6.0
85
86
Note: See TracBrowser for help on using the repository browser.