[2848] | 1 | """Common filenames and locations for topographic data, meshes and outputs. |
---|
| 2 | Also includes origin for slump scenario. |
---|
| 3 | """ |
---|
| 4 | |
---|
| 5 | from os import sep, environ |
---|
| 6 | from os.path import expanduser |
---|
| 7 | from utilities.polygon import read_polygon |
---|
| 8 | import sys |
---|
| 9 | from pmesh.create_mesh import convert_points_from_latlon_to_utm |
---|
| 10 | from coordinate_transforms.redfearn import degminsec2decimal_degrees |
---|
| 11 | from time import localtime, strftime |
---|
| 12 | from os import getcwd |
---|
| 13 | |
---|
| 14 | #Making assumptions about the location of scenario data |
---|
| 15 | scenario_dir_name = 'pt_hedland_tsunami_scenario_2006' |
---|
| 16 | |
---|
| 17 | # onshore data from 30m DTED level 2 |
---|
| 18 | onshore_name = 'pt_hedland_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data) |
---|
| 19 | # offshore data from GA digitised charts |
---|
| 20 | offshore_name1 = 'pt_hedland_offshore_points' |
---|
| 21 | # offshore data from AHO fairsheets |
---|
| 22 | offshore_name2 = 'pt_hedland_offshore_points_fairsheet' |
---|
| 23 | # coastline developed from 30m DTED |
---|
| 24 | coast_name = 'pt_hedland_coastline_points' |
---|
| 25 | |
---|
| 26 | boundary_basename = 'SU-AU_clip' |
---|
| 27 | |
---|
| 28 | #swollen/ all data output |
---|
| 29 | basename = 'source' |
---|
| 30 | |
---|
| 31 | codename = 'project.py' |
---|
| 32 | |
---|
| 33 | if sys.platform == 'win32': |
---|
| 34 | home = environ['INUNDATIONHOME'] #Sandpit's parent dir |
---|
| 35 | else: |
---|
| 36 | home = expanduser('~') |
---|
| 37 | |
---|
| 38 | #Derive subdirectories and filenames |
---|
| 39 | time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir |
---|
| 40 | outputtimedir = home+sep+scenario_dir_name+sep+'output'+sep+time+sep |
---|
| 41 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
| 42 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
| 43 | gaugedir = home+sep+scenario_dir_name+sep+'gauges'+sep |
---|
| 44 | polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep |
---|
| 45 | boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep |
---|
| 46 | #output dir without time |
---|
| 47 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
| 48 | tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep |
---|
| 49 | |
---|
| 50 | print'bound', boundarydir |
---|
| 51 | |
---|
| 52 | #gauge_filename = gaugedir + 'onslow_gauges.xya' |
---|
| 53 | #for MOST |
---|
| 54 | gauge_filename = gaugedir + 'pt_hedland_gauges.xya' |
---|
| 55 | |
---|
| 56 | tidal_filename = tidedir + 'pt_hedland_tide.txt' |
---|
| 57 | |
---|
| 58 | # boundary source data |
---|
| 59 | #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 |
---|
| 60 | |
---|
| 61 | codedir = getcwd()+sep |
---|
| 62 | |
---|
| 63 | codedirname = codedir + 'project.py' |
---|
| 64 | |
---|
| 65 | meshname = meshdir + basename |
---|
| 66 | |
---|
| 67 | onshore_dem_name = datadir + onshore_name |
---|
| 68 | |
---|
| 69 | offshore_dem_name1 = datadir + offshore_name1 |
---|
| 70 | offshore_dem_name2 = datadir + offshore_name2 |
---|
| 71 | |
---|
| 72 | combined_dem_name = datadir + 'pt_hedland_combined_elevation' |
---|
| 73 | |
---|
| 74 | outputname = outputtimedir + basename #Used by post processing |
---|
| 75 | |
---|
| 76 | # clipping region to make DEM (pts file) from onshore data |
---|
| 77 | eastingmin = 594000 |
---|
| 78 | eastingmax = 715000 |
---|
| 79 | northingmin = 7720000 |
---|
| 80 | northingmax = 7880000 |
---|
| 81 | |
---|
| 82 | # for ferret2sww |
---|
| 83 | #south = |
---|
| 84 | #north = |
---|
| 85 | #west = |
---|
| 86 | #east = |
---|
| 87 | |
---|
| 88 | # region to export (used from export_results.py) |
---|
| 89 | |
---|
| 90 | #e_min_area = 300000 |
---|
| 91 | #e_max_area = 310000 |
---|
| 92 | #n_min_area = 7600000 |
---|
| 93 | #n_max_area = 7610000 |
---|
| 94 | |
---|
| 95 | refzone = 50 # confirm with Hamish |
---|
| 96 | |
---|
| 97 | # bounding polygon provided by Hamish |
---|
| 98 | d0 = [818732.55, 8062768.27] |
---|
| 99 | d1 = [708940.32, 7750510.33] |
---|
| 100 | d2 = [656561.15, 7732615.11] |
---|
| 101 | d3 = [604415.81, 7733013.56] |
---|
| 102 | d4 = [517682.34, 7899310.22] |
---|
| 103 | |
---|
| 104 | polyAll = [d0, d1, d2, d3, d4] |
---|
| 105 | |
---|
| 106 | #Interior region - Pt Hedland town |
---|
[2855] | 107 | i0 = [690000, 7750510.33] # these are just currently close to d1, d2 and d3 |
---|
| 108 | i1 = [656561.15, 7750000] |
---|
| 109 | i2 = [620000, 7733013.56] |
---|
[2848] | 110 | |
---|
| 111 | poly_pt_hedland = [i0, i1, i2] |
---|
| 112 | |
---|
| 113 | #Are there other significant features? |
---|
| 114 | j0 = [] |
---|
| 115 | j1 = [] |
---|
| 116 | j2 = [] |
---|
| 117 | j3 = [] |
---|
| 118 | |
---|
| 119 | poly_ = [j0, j1, j2, j3] |
---|
| 120 | |
---|