"""Common filenames and locations for topographic data, meshes and outputs. Also includes origin for slump scenario. """ from os import sep, environ from os.path import expanduser from utilities.polygon import read_polygon import sys from pmesh.create_mesh import convert_points_from_latlon_to_utm from coordinate_transforms.redfearn import degminsec2decimal_degrees from time import localtime, strftime from os import getcwd #Making assumptions about the location of scenario data scenario_dir_name = 'onslow_tsunami_scenario_2006' # 250m data to be provided coarsename = 'onsl_bathydem250' # get from Neil/Ingo (DEM or topo data) # 30m data to be provided onshore_name = 'onslow_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data) offshore_name = 'onslow_offshore_points' boundary_basename = 'SU-AU' #swollen/ all data output basename = 'source' codename = 'project.py' if sys.platform == 'win32': home = environ['INUNDATIONHOME'] #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 timedir = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir outputdir = home+sep+scenario_dir_name+sep+'output'+sep+timedir+sep polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep codedir = getcwd()+sep codedirname = codedir + 'project.py' meshname = meshdir + basename coarsedemname = datadir + coarsename onshore_dem_name = datadir + onshore_name offshore_dem_name = datadir + offshore_name combined_dem_name = datadir + 'onslow_combined_elevation' outputname = outputdir + basename #Used by post processing #!gauge_filename = outputdir + 'onslow_gauges.xya' #!gauge_outname = outputdir + 'gauges_max_output.xya' # clipping region for fine elevation data eastingmin = 250000 eastingmax = 330000 northingmin = 7580000 northingmax = 7635000 south = degminsec2decimal_degrees(-22,00,0) north = degminsec2decimal_degrees(-21,10,0) west = degminsec2decimal_degrees(114,30,0) east = degminsec2decimal_degrees(115,30,0) # region for visualisation eminviz = 260000 emaxviz = 320000 nminviz = 7590000 nmaxviz = 7630000 #Georeferencing from coordinate_transforms.redfearn import degminsec2decimal_degrees refzone = 50 #Main Domain of Onslow: first run NB 21/2/06 d0 = [305000, 7635000] d1 = [280000, 7635000] d2 = [250000, 7615000] d3 = [250000, 7590000] d4 = [310000, 7580000] d5 = [330000, 7610000] polyAll = [d0, d1, d2, d3, d4, d5] #Interior region - Onslow town i0 = [304000, 7608000] i1 = [302000, 7605000] i2 = [303000, 7602000] i3 = [305000, 7601000] i4 = [309000, 7603000] i5 = [307000, 7606500] poly_onslow = [i0, i1, i2, i3, i4, i5] #Thevenard Island j0 = [294000, 7629000] j1 = [285000, 7625000] j2 = [294000, 7621000] j3 = [299000, 7625000] poly_thevenard = [j0, j1, j2, j3] # Direction Is k0 = [309000, 7619000] k1 = [304000, 7619000] k2 = [304000, 7616500] k3 = [309000, 7616500] poly_direction = [k0, k1, k2, k3]