[2461] | 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 | import sys |
---|
| 8 | |
---|
[2462] | 9 | # We'll do this for the final thing |
---|
[2461] | 10 | home = '.' |
---|
| 11 | |
---|
[2462] | 12 | if sys.platform == 'win32': |
---|
| 13 | home = environ['INUNDATIONHOME'] #Sandpit's parent dir |
---|
| 14 | else: |
---|
| 15 | home = expanduser('~') |
---|
| 16 | |
---|
[2461] | 17 | basename = 'Sydney' |
---|
| 18 | |
---|
| 19 | #Setting the location of scenario data |
---|
| 20 | scenario_dir_name = 'sydney_tsunami_example_2006' |
---|
| 21 | # revised 100m data |
---|
[3275] | 22 | coarsename = 'bathyland100' |
---|
[2461] | 23 | # revised 25m data |
---|
[3275] | 24 | finename = 'bathy_dem25' |
---|
[2461] | 25 | |
---|
| 26 | #Derive subdirectories and filenames |
---|
| 27 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
| 28 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
| 29 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
| 30 | polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep |
---|
| 31 | |
---|
| 32 | meshname = meshdir + basename |
---|
| 33 | coarsedemname = datadir + coarsename |
---|
| 34 | finedemname = datadir + finename |
---|
| 35 | combineddemname = datadir + 'sydneytopo' |
---|
| 36 | |
---|
| 37 | refzone = 56 |
---|
| 38 | print 'refzone', refzone |
---|
| 39 | |
---|
[3275] | 40 | # demo poly |
---|
[3136] | 41 | j0 = [385000, 6280000] |
---|
[3190] | 42 | j1 = [360000, 6272500] |
---|
| 43 | j2 = [335000, 6272500] |
---|
| 44 | j3 = [330000, 6265000] |
---|
| 45 | j31 = [325000, 6260000] |
---|
[3136] | 46 | j4 = [316000, 6260000] |
---|
| 47 | j5 = [316000, 6247000] |
---|
| 48 | j6 = [350000, 6247000] |
---|
| 49 | j7 = [385000, 6238000] |
---|
| 50 | |
---|
[3190] | 51 | demopoly = [j0, j1, j2, j3, j31, j4, j5, j6, j7] |
---|
[3136] | 52 | |
---|
[3275] | 53 | from utilities.polygon import read_polygon |
---|
[3190] | 54 | polygonptsfile4 = polygondir + 'poly1' |
---|
| 55 | polygonptsfile0 = polygondir + 'poly2' |
---|
[3136] | 56 | polygonptsfile1 = polygondir + 'poly3' |
---|
| 57 | polygonptsfile2 = polygondir + 'poly4' |
---|
| 58 | polygonptsfile3 = polygondir + 'poly5' |
---|
[3190] | 59 | northern_polygon = read_polygon(polygonptsfile0 + '.csv') |
---|
| 60 | manly_polygon = read_polygon(polygonptsfile1 + '.csv') |
---|
[3136] | 61 | harbour_polygon = read_polygon(polygonptsfile2 + '.csv') |
---|
| 62 | southern_polygon = read_polygon(polygonptsfile3 + '.csv') |
---|
[3190] | 63 | top_polygon = read_polygon(polygonptsfile4 + '.csv') |
---|
[3136] | 64 | |
---|
[3150] | 65 | slump_origin = [372500.0, 6255000.0] #Absolute UTM |
---|