[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 |
---|
[3869] | 22 | #coarsename = 'bathyland100' |
---|
[2461] | 23 | # revised 25m data |
---|
[3869] | 24 | #finename = 'bathy_dem25' |
---|
| 25 | # revised 25m data |
---|
| 26 | dem_name = 'sydney_MGA56' |
---|
[2461] | 27 | |
---|
[3762] | 28 | home += sep + 'data' + sep + 'new_south_wales' |
---|
| 29 | |
---|
[2461] | 30 | #Derive subdirectories and filenames |
---|
| 31 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
| 32 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
| 33 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
| 34 | polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep |
---|
| 35 | |
---|
| 36 | meshname = meshdir + basename |
---|
[3869] | 37 | #coarsedemname = datadir + coarsename |
---|
| 38 | #finedemname = datadir + finename |
---|
| 39 | demname = datadir + dem_name |
---|
[2461] | 40 | combineddemname = datadir + 'sydneytopo' |
---|
| 41 | |
---|
| 42 | refzone = 56 |
---|
| 43 | print 'refzone', refzone |
---|
| 44 | |
---|
[3275] | 45 | # demo poly |
---|
[3136] | 46 | j0 = [385000, 6280000] |
---|
[3944] | 47 | j1 = [360000, 6273000] |
---|
| 48 | j2 = [335000, 6273000] |
---|
[3190] | 49 | j3 = [330000, 6265000] |
---|
| 50 | j31 = [325000, 6260000] |
---|
[3136] | 51 | j4 = [316000, 6260000] |
---|
[3944] | 52 | j5 = [316000, 6246750] |
---|
| 53 | j6 = [350000, 6246750] |
---|
[3136] | 54 | j7 = [385000, 6238000] |
---|
| 55 | |
---|
[3190] | 56 | demopoly = [j0, j1, j2, j3, j31, j4, j5, j6, j7] |
---|
[3136] | 57 | |
---|
[3944] | 58 | from anuga.utilities.polygon import read_polygon, plot_polygons |
---|
| 59 | #polygonptsfile4 = polygondir + 'poly1' |
---|
| 60 | #polygonptsfile0 = polygondir + 'poly2' |
---|
| 61 | #polygonptsfile1 = polygondir + 'poly3' |
---|
| 62 | #polygonptsfile2 = polygondir + 'poly4' |
---|
| 63 | #polygonptsfile3 = polygondir + 'poly5' |
---|
| 64 | #northern_polygon = read_polygon(polygonptsfile0 + '.csv') |
---|
| 65 | #manly_polygon = read_polygon(polygonptsfile1 + '.csv') |
---|
| 66 | #harbour_polygon = read_polygon(polygonptsfile2 + '.csv') |
---|
| 67 | #southern_polygon = read_polygon(polygonptsfile3 + '.csv') |
---|
| 68 | #top_polygon = read_polygon(polygonptsfile4 + '.csv') |
---|
| 69 | coastal_polygon = read_polygon(polygondir+'coastal'+'.csv') |
---|
| 70 | shallow_polygon = read_polygon(polygondir+'shallow'+'.csv') |
---|
[3136] | 71 | |
---|
[3944] | 72 | #plot_polygons([demopoly,northern_polygon,manly_polygon,harbour_polygon,southern_polygon,top_polygon],'model_setup',verbose=False) |
---|
| 73 | plot_polygons([demopoly,coastal_polygon,shallow_polygon],'new_model_setup',verbose=False) |
---|
| 74 | |
---|
[3150] | 75 | slump_origin = [372500.0, 6255000.0] #Absolute UTM |
---|