"""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_clip' #swollen/ all data output basename = 'source' codename = 'project.py' if sys.platform == 'win32': home = environ['INUNDATIONHOME'] #Sandpit's parent dir else: home = environ['INUNDATIONHOME'] #Sandpit's parent dir # home = expanduser('~') #Derive subdirectories and filenames time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir outputtimedir = home+sep+scenario_dir_name+sep+'output'+sep+time+sep meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep datadir = home+sep+scenario_dir_name+sep+'topographies'+sep gaugedir = home+sep+scenario_dir_name+sep+'gauges'+sep polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep #output dir without time outputdir = home+sep+scenario_dir_name+sep+'output'+sep tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep print'bound', boundarydir #gauge_filename = gaugedir + 'onslow_gauges.xya' #for MOST gauge_filename = gaugedir + 'onslow_gauges1.xya' gaugetimeseries = gaugedir + 'onslow' tidal_filename = tidedir + 'onsl.txt' tidal_outname = tidedir + 'max_min.txt' # boundary source data #MOST_dir = 'f:'+sep+'3'+sep+'ehn'+sep+'users'+sep+'davidb'+sep+'tsunami'+sep+'WA_project'+sep+'SU-AU_90'+sep+'most_2'+sep+'detailed'+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 = outputtimedir + basename #Used by post processing #!gauge_filename = outputdir + 'onslow_gauges.xya' #!gauge_outname = outputdir + 'gauges_max_output.xya' # clipping region to make DEM (pts file) from fine elevation data eastingmin = 240000 eastingmax = 340000 northingmin = 7580000 northingmax = 7700000 south = degminsec2decimal_degrees(-22,15,0) north = degminsec2decimal_degrees(-20,30,0) west = degminsec2decimal_degrees(114,15,0) east = degminsec2decimal_degrees(115,50,0) ''' # region for visualisation eminviz = 260000 emaxviz = 320000 nminviz = 7590000 nmaxviz = 7630000 ''' # region to export e_min_area = 300000 e_max_area = 310000 n_min_area = 7600000 n_max_area = 7610000 #Georeferencing from coordinate_transforms.redfearn import degminsec2decimal_degrees refzone = 50 #Updated Main Domain of Onslow: first run NB 6/4/06 d0 = [310000, 7690000] d1 = [280000, 7690000] d2 = [270000, 7645000] d3 = [240000, 7625000] d4 = [270000, 7580000] d5 = [300000, 7590000] d6 = [340000, 7610000] polyAll = [d0, d1, d2, d3, d4, d5, d6] #Interior region - Onslow town #i0 = [304000, 7608000] i0 = [304000, 7607000] i1 = [302000, 7605000] #i2 = [303000, 7602000] i2 = [304000, 7603000] #i3 = [305000, 7601000] i3 = [307000, 7602000] i4 = [309000, 7603000] #i5 = [307000, 7606500] i5 = [307000, 7606000] 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] ''' #med res around onslow l0 = [300000, 7610000] l1 = [285000, 7600000] l2 = [300000, 7597500] l3 = [310000, 7600000] l4 = [315000, 7610000] #l5 = [310000, 7612500] #poly_coast = [l0, l1, l2, l3, l4, l5] poly_coast = [l0, l1, l2, l3, l4] #general coast and local area to onslow region m0 = [270000, 7581000] m1 = [300000, 7591000] m2 = [339000, 7610000] m3 = [330000, 7630000] m4 = [290000, 7640000] m5 = [260000, 7600000] poly_region = [m0, m1, m2, m3, m4, m5]