"""Common filenames and locations for topographic data, meshes and outputs. """ #Assume INUNDATIONHOME environment variable points to the parent directory of the source data from os import sep, environ from os.path import expanduser import sys #Making assumptions about the location of scenario data scenario_dir_name = 'karratha_tsunami_scenario_2005' #basename = 'karratha_100m' basename = 'elevation50m' boundary_basename = 'SU-AU' if sys.platform == 'win32': home = environ["INUNDATIONHOME"] #Sandpit's parent dir #home = '..\..\..\..\..' #Sandpit's parent dir else: home = expanduser('~') #Derive subdirectories and filenames meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep datadir = home+sep+scenario_dir_name+sep+'topographies'+sep outputdir = home+sep+scenario_dir_name+sep+'output'+sep boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep meshname = meshdir + basename demname = datadir + basename boundaryname = boundarydir + boundary_basename outputname = outputdir + basename #Used by post processing #gauge_filename = 'all_bld_ind.csv' gauge_filename = 'karratha_buildings_23112005.csv' #Georeferencing from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees #Origin of existing dem (FIXME: Temporary measure) #mesh_origin = (50, 421544.35127423, 7677669.5257159) #250m mesh_origin = (50, 420468.31429902, 7677669.5257159) #100m #south = degminsec2decimal_degrees(-20,45,0) #north = degminsec2decimal_degrees(-20,15,0) #west = degminsec2decimal_degrees(116,30,0) #east = degminsec2decimal_degrees(117,0,0) south = degminsec2decimal_degrees(-20,55,0) north = degminsec2decimal_degrees(-20,15,0) west = degminsec2decimal_degrees(116,17,0) east = degminsec2decimal_degrees(117,10,0) p0 = [south, degminsec2decimal_degrees(116,32,0)] p1 = [south, west] p2 = [degminsec2decimal_degrees(-20,23,0), west] p3 = [north, degminsec2decimal_degrees(116,45,0)] p4 = [north, degminsec2decimal_degrees(117,0,0)] p5 = [p2[0], degminsec2decimal_degrees(117,8,0)] p6 = [degminsec2decimal_degrees(-20,30,0), east] p7 = [degminsec2decimal_degrees(-20,38,0), east] p8 = [south, east] polygon = [p0, p1, p2, p3, p4, p5, p6, p7, p8] refzone = 50 #Interior regions karratha_south = degminsec2decimal_degrees(-20,44,0) karratha_north = degminsec2decimal_degrees(-20,42,0) karratha_west = degminsec2decimal_degrees(116,48,0) karratha_east = degminsec2decimal_degrees(116,53,30) k0 = [karratha_south, karratha_west] k1 = [karratha_south, karratha_east] k2 = [karratha_north, karratha_east] k3 = [karratha_north, karratha_west] karratha_polygon = [k0, k1, k2, k3] #Interior regions dampier_south = degminsec2decimal_degrees(-20,40,0) dampier_north = degminsec2decimal_degrees(-20,38,10) dampier_west = degminsec2decimal_degrees(116,43,0) dampier_east = degminsec2decimal_degrees(116,45,0) d0 = [dampier_south, dampier_west] d1 = [dampier_south, dampier_east] d2 = [dampier_north, dampier_east] d3 = [dampier_north, dampier_west] dampier_polygon = [d0, d1, d2, d3] #Interior regions refinery_south = degminsec2decimal_degrees(-20,37,50) refinery_north = degminsec2decimal_degrees(-20,36,0) refinery_west = degminsec2decimal_degrees(116,44,0) refinery_east = degminsec2decimal_degrees(116,46,10) d0 = [refinery_south, refinery_west] d1 = [refinery_south, refinery_east] d2 = [refinery_north, refinery_east] d3 = [refinery_north, refinery_west] refinery_polygon = [d0, d1, d2, d3] #Interior region around 468899, 7715177: #lat (-20, 39, 44.93753), lon (116, 42, 5.09106) point_south = degminsec2decimal_degrees(-20,39,46) point_north = degminsec2decimal_degrees(-20,39,42) point_west = degminsec2decimal_degrees(116,42,0) point_east = degminsec2decimal_degrees(116,42,10) d0 = [point_south, point_west] d1 = [point_south, point_east] d2 = [point_north, point_east] d3 = [point_north, point_west] point_polygon = [d0, d1, d2, d3] #Neils areas around interesting points neil1_point1 = [degminsec2decimal_degrees(-20,35,34), degminsec2decimal_degrees(116,45,18)] neil1_point2 = [degminsec2decimal_degrees(-20,36,15), degminsec2decimal_degrees(116,46,18)] neil1_point3 = [degminsec2decimal_degrees(-20,35,9), degminsec2decimal_degrees(116,47,17)] neil1_point4 = [degminsec2decimal_degrees(-20,34,26), degminsec2decimal_degrees(116,46,17)] neil1_polygon = [neil1_point1, neil1_point2, neil1_point3, neil1_point4] neil2_point1 = [degminsec2decimal_degrees(-20,39,36), degminsec2decimal_degrees(116,41,33)] neil2_point2 = [degminsec2decimal_degrees(-20,40,10), degminsec2decimal_degrees(116,42,13)] neil2_point3 = [degminsec2decimal_degrees(-20,38,39), degminsec2decimal_degrees(116,43,49)] neil2_point4 = [degminsec2decimal_degrees(-20,38,5), degminsec2decimal_degrees(116,43,9)] neil2_polygon = [neil2_point1, neil2_point2, neil2_point3, neil2_point4] #Withnell bay wb_point1 = [degminsec2decimal_degrees(-20,35,34), degminsec2decimal_degrees(116,45,18)] wb_point2 = [degminsec2decimal_degrees(-20,36,15), degminsec2decimal_degrees(116,46,18)] wb_point3 = [degminsec2decimal_degrees(-20,35,9), degminsec2decimal_degrees(116,47,17)] wb_point4 = [degminsec2decimal_degrees(-20,34,26), degminsec2decimal_degrees(116,46,17)] wb_polygon = [wb_point1, wb_point2, wb_point3, wb_point4] #Larger Withnell bay lwb_point1 = [degminsec2decimal_degrees(-20,35,59), degminsec2decimal_degrees(116,42,00)] lwb_point2 = [degminsec2decimal_degrees(-20,36,50), degminsec2decimal_degrees(116,46,50)] lwb_point3 = [degminsec2decimal_degrees(-20,34,00), degminsec2decimal_degrees(116,47,39)] lwb_point4 = [degminsec2decimal_degrees(-20,33,00), degminsec2decimal_degrees(116,42,50)] lwb_polygon = [lwb_point1, lwb_point2, lwb_point3, lwb_point4]