[3040] | 1 | """Common filenames and locations for topographic data, meshes and outputs. |
---|
| 2 | """ |
---|
| 3 | |
---|
| 4 | import sys |
---|
| 5 | from os import sep as s, environ |
---|
[3105] | 6 | from os.path import expanduser |
---|
[3040] | 7 | |
---|
| 8 | # Making assumptions about the location of scenario data |
---|
| 9 | scenario_dirname = 'wollongong_tsunami_scenario_2006' |
---|
| 10 | |
---|
| 11 | # Filenames |
---|
| 12 | basename = 'flagstaff' |
---|
| 13 | demname = 'wollongong_10' |
---|
| 14 | building_footprints = 'flagstaff_building_footprints' |
---|
| 15 | |
---|
| 16 | # Parameters |
---|
[3046] | 17 | base_resolution = 5 |
---|
[3040] | 18 | initial_sealevel = 0.0 |
---|
| 19 | |
---|
| 20 | # Derive subdirectories and filenames |
---|
[3105] | 21 | try: |
---|
| 22 | home = environ['INUNDATIONHOME'] |
---|
| 23 | except Exception, e: |
---|
| 24 | print 'Environment variable INUNDATIONHOME was not found: %s' %e |
---|
| 25 | home = expanduser('~') |
---|
[3040] | 26 | |
---|
[3105] | 27 | |
---|
[3040] | 28 | meshdir = home+s+scenario_dirname+s+'meshes'+s |
---|
| 29 | datadir = home+s+scenario_dirname+s+'topographies'+s |
---|
| 30 | outputdir = home+s+scenario_dirname+s+'output'+s |
---|
| 31 | polygondir = home+s+scenario_dirname+s+'polygons'+s |
---|
| 32 | gaugedir = home+s+scenario_dirname+s+'gauges'+s |
---|
| 33 | |
---|
| 34 | demname = datadir + demname |
---|
| 35 | meshname = meshdir + basename |
---|
| 36 | mesh_filename = meshname + '.msh' |
---|
| 37 | buildings_filename = meshdir + building_footprints + '.asc' |
---|
| 38 | |
---|
| 39 | outputname = outputdir + basename #Used by post processing |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | # Mesh data |
---|
| 44 | |
---|
| 45 | # Lower left corner |
---|
| 46 | xllcorner = 307000 |
---|
| 47 | yllcorner = 6188940 |
---|
| 48 | |
---|
| 49 | # Upper right corner |
---|
| 50 | xurcorner = 307788 |
---|
| 51 | yurcorner = 6189509 |
---|
| 52 | |
---|
| 53 | # Bounding polygon |
---|
| 54 | point1 = [xllcorner, (yllcorner+yurcorner)/2] |
---|
| 55 | point2 = [xllcorner + (xurcorner-xllcorner)/3, yurcorner] |
---|
| 56 | point3 = [xllcorner + 2*(xurcorner-xllcorner)/3, yurcorner] |
---|
| 57 | point4 = [xurcorner, yllcorner + 2*(yurcorner-yllcorner)/3] |
---|
| 58 | point5 = [xurcorner, yllcorner + (yurcorner-yllcorner)/3] |
---|
| 59 | point6 = [xllcorner + 2*(xurcorner-xllcorner)/3, yllcorner] |
---|
| 60 | |
---|
| 61 | bounding_polygon = [[xllcorner, yllcorner], #sw |
---|
| 62 | point1, |
---|
| 63 | point2, |
---|
| 64 | point3, |
---|
| 65 | point4, |
---|
| 66 | point5, |
---|
| 67 | point6] |
---|
| 68 | |
---|
| 69 | boundary_tags = {'exterior': [0,1,5,6], 'side': [2,4], 'ocean': [3]} |
---|
| 70 | |
---|
| 71 | interior_regions = [] |
---|
| 72 | |
---|