"""Common filenames and locations for topographic data, meshes and outputs. """ from os import sep, environ, getenv, getcwd from os.path import expanduser import sys from time import localtime, strftime, gmtime from anuga.utilities.polygon import read_polygon, plot_polygons, \ polygon_area, is_inside_polygon from anuga.coordinate_transforms.redfearn import convert_from_latlon_to_utm from time import localtime, strftime ############################### # Domain definitions ############################### ''' # Bathymetry and topography filenames bathymetry = 'phuket_utm47' # bounding polygon for study area bounding_polygon_latlon = read_polygon('phuket_boundary.csv') # only works for zone 47 south = 1000 east = -1000 west = 1000 north = -1000 for points in bounding_polygon_latlon: south = min(points[1],south) north = max(points[1],north) east = max(points[0],east) west = min(points[0],west) print "south, north, east, west", south, north, east, west time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir #combined_dir_name = 'phuket_bathymetry'+time combined_dir_name = 'phuket_bathymetry' meshname = 'phuket_mesh'+time mesh_elevname = 'phuket_mesh'+time+'_elev' bathymetry_points = 'bathymetry_points'+time boundary_most_in = 'out' boundary_most_out = 'most_boundary_condition' ############################### # Interior region definitions ############################### ''' # location of polygons developed by John Jakeman April 2008 home = getenv('INUNDATIONHOME') + sep +'data'+sep anuga_dir = home+'anuga_validation'+sep+'boxing_day_sceanario'+sep+'anuga'+sep poly_dir = anuga_dir+'outputs'+sep+'john'+sep gauges_dir = anuga_dir+'gauges'+sep # interior polygons #poly_island1 = read_polygon('island1.csv') #poly_north_island = read_polygon('north_island.csv') #poly_50m_contour = read_polygon('phuket_50m_contour_small.csv') # bounding polygon poly_all = read_polygon(poly_dir + 'extent.csv')#'domain.csv') gauge_filename = 'gauges.csv'