[2436] | 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 | |
---|
| 10 | from pmesh.create_mesh import convert_points_from_latlon_to_utm |
---|
[2615] | 11 | |
---|
| 12 | from coordinate_transforms.redfearn import degminsec2decimal_degrees |
---|
| 13 | |
---|
| 14 | from time import localtime, strftime |
---|
| 15 | |
---|
| 16 | from os import getcwd |
---|
[2436] | 17 | |
---|
| 18 | #Making assumptions about the location of scenario data |
---|
| 19 | scenario_dir_name = 'onslow_tsunami_scenario_2006' |
---|
| 20 | |
---|
[2443] | 21 | # 250m data to be provided |
---|
| 22 | coarsename = 'onsl_bathydem250' # get from Neil/Ingo (DEM or topo data) |
---|
[2615] | 23 | |
---|
[2436] | 24 | # 30m data to be provided |
---|
[2615] | 25 | onshore_name = 'onslow_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data) |
---|
[2436] | 26 | |
---|
[2615] | 27 | offshore_name = 'onslow_offshore_points' |
---|
[2436] | 28 | |
---|
[2615] | 29 | boundary_basename = 'SU-AU' |
---|
| 30 | |
---|
[2436] | 31 | #swollen/ all data output |
---|
| 32 | basename = 'source' |
---|
| 33 | |
---|
[2615] | 34 | codename = 'project.py' |
---|
| 35 | |
---|
[2436] | 36 | if sys.platform == 'win32': |
---|
| 37 | home = environ['INUNDATIONHOME'] #Sandpit's parent dir |
---|
| 38 | else: |
---|
| 39 | home = expanduser('~') |
---|
| 40 | |
---|
| 41 | #Derive subdirectories and filenames |
---|
[2615] | 42 | timedir = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir |
---|
| 43 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep+timedir+sep |
---|
[2436] | 44 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
| 45 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
[2615] | 46 | |
---|
[2436] | 47 | polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep |
---|
[2470] | 48 | boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep |
---|
[2436] | 49 | |
---|
[2615] | 50 | codedir = getcwd()+sep |
---|
| 51 | |
---|
| 52 | codedirname = codedir + 'project.py' |
---|
| 53 | |
---|
[2436] | 54 | meshname = meshdir + basename |
---|
[2443] | 55 | |
---|
| 56 | coarsedemname = datadir + coarsename |
---|
[2436] | 57 | |
---|
[2615] | 58 | onshore_dem_name = datadir + onshore_name |
---|
| 59 | |
---|
| 60 | offshore_dem_name = datadir + offshore_name |
---|
| 61 | |
---|
| 62 | combined_dem_name = datadir + 'onslow_combined_elevation' |
---|
| 63 | |
---|
[2436] | 64 | outputname = outputdir + basename #Used by post processing |
---|
| 65 | |
---|
| 66 | #!gauge_filename = outputdir + 'onslow_gauges.xya' |
---|
| 67 | #!gauge_outname = outputdir + 'gauges_max_output.xya' |
---|
| 68 | |
---|
[2615] | 69 | # clipping region for fine elevation data |
---|
| 70 | eastingmin = 250000 |
---|
| 71 | eastingmax = 330000 |
---|
| 72 | northingmin = 7580000 |
---|
| 73 | northingmax = 7635000 |
---|
| 74 | |
---|
| 75 | south = degminsec2decimal_degrees(-22,00,0) |
---|
| 76 | north = degminsec2decimal_degrees(-21,10,0) |
---|
| 77 | west = degminsec2decimal_degrees(114,30,0) |
---|
| 78 | east = degminsec2decimal_degrees(115,30,0) |
---|
| 79 | |
---|
| 80 | # region for visualisation |
---|
| 81 | eminviz = 260000 |
---|
| 82 | emaxviz = 320000 |
---|
| 83 | nminviz = 7590000 |
---|
| 84 | nmaxviz = 7630000 |
---|
| 85 | |
---|
[2436] | 86 | #Georeferencing |
---|
| 87 | from coordinate_transforms.redfearn import degminsec2decimal_degrees |
---|
| 88 | |
---|
| 89 | refzone = 50 |
---|
| 90 | |
---|
| 91 | #Main Domain of Onslow: first run NB 21/2/06 |
---|
| 92 | d0 = [305000, 7635000] |
---|
| 93 | d1 = [280000, 7635000] |
---|
| 94 | d2 = [250000, 7615000] |
---|
| 95 | d3 = [250000, 7590000] |
---|
| 96 | d4 = [310000, 7580000] |
---|
| 97 | d5 = [330000, 7610000] |
---|
| 98 | |
---|
| 99 | polyAll = [d0, d1, d2, d3, d4, d5] |
---|
| 100 | |
---|
[2441] | 101 | #Interior region - Onslow town |
---|
[2436] | 102 | |
---|
[2441] | 103 | i0 = [304000, 7608000] |
---|
| 104 | i1 = [302000, 7605000] |
---|
| 105 | i2 = [303000, 7602000] |
---|
| 106 | i3 = [305000, 7601000] |
---|
| 107 | i4 = [309000, 7603000] |
---|
| 108 | i5 = [307000, 7606500] |
---|
[2436] | 109 | |
---|
[2441] | 110 | poly_onslow = [i0, i1, i2, i3, i4, i5] |
---|
| 111 | |
---|
| 112 | #Thevenard Island |
---|
| 113 | j0 = [294000, 7629000] |
---|
| 114 | j1 = [285000, 7625000] |
---|
| 115 | j2 = [294000, 7621000] |
---|
| 116 | j3 = [299000, 7625000] |
---|
| 117 | |
---|
| 118 | poly_thevenard = [j0, j1, j2, j3] |
---|
| 119 | |
---|
| 120 | # Direction Is |
---|
| 121 | k0 = [309000, 7619000] |
---|
| 122 | k1 = [304000, 7619000] |
---|
| 123 | k2 = [304000, 7616500] |
---|
| 124 | k3 = [309000, 7616500] |
---|
| 125 | |
---|
| 126 | poly_direction = [k0, k1, k2, k3] |
---|
| 127 | |
---|