source: trunk/anuga_work/development/mem_time_tests/hardware/cairns/project.py @ 8311

Last change on this file since 8311 was 8311, checked in by pittj, 12 years ago

updating the python script files

  • Property svn:executable set to *
File size: 3.6 KB
Line 
1""" Common filenames and locations for topographic data, meshes and outputs.
2    This file defines the parameters of the scenario you wish to run.
3"""
4
5import anuga
6from anuga.abstract_2d_finite_volumes.util import add_directories
7import os
8
9
10home2 = os.getenv('INUNDATIONHOME')
11
12scenariodir2 = add_directories(home2, ["data", "mem_time_test", "parallel", "cairns"])
13
14h = 'CAIRNS.msh'
15file_pathh = os.path.join(scenariodir2, h)
16store ='store.txt'
17file_path_store = os.path.join(scenariodir2, store)
18#------------------------------------------------------------------------------
19# Define scenario as either slide or fixed_wave. Choose one.
20#------------------------------------------------------------------------------
21scenario = 'fixed_wave' # Huge wave applied at the boundary
22#scenario = 'slide'       # Slide wave form applied inside the domain
23
24#------------------------------------------------------------------------------
25# Filenames
26#------------------------------------------------------------------------------
27meshname = os.path.join(scenariodir2, 'cairns.msh')
28
29# Filename for locations where timeseries are to be produced
30gauge_filename = os.path.join(scenariodir2, 'gauges.csv')
31
32#------------------------------------------------------------------------------
33# Domain definitions
34#------------------------------------------------------------------------------
35# bounding polygon for study area
36bounding_polygon = anuga.read_polygon(os.path.join(scenariodir2, 'extent.csv'))
37
38A = anuga.polygon_area(bounding_polygon) / 1000000.0
39print 'Area of bounding polygon = %.2f km^2' % A
40
41#------------------------------------------------------------------------------
42# Interior region definitions
43#------------------------------------------------------------------------------
44# Read interior polygons
45poly_cairns = anuga.read_polygon(os.path.join(scenariodir2, 'cairns.csv'))
46poly_island0 = anuga.read_polygon(os.path.join(scenariodir2, 'islands.csv'))
47poly_island1 = anuga.read_polygon(os.path.join(scenariodir2, 'islands1.csv'))
48poly_island2 = anuga.read_polygon(os.path.join(scenariodir2, 'islands2.csv'))
49poly_island3 = anuga.read_polygon(os.path.join(scenariodir2, 'islands3.csv'))
50poly_shallow = anuga.read_polygon(os.path.join(scenariodir2, 'shallow.csv'))
51
52# Optionally plot points making up these polygons
53#plot_polygons([bounding_polygon, poly_cairns, poly_island0, poly_island1,
54#               poly_island2, poly_island3, poly_shallow],
55#               style='boundingpoly', verbose=False)
56
57# Define resolutions (max area per triangle) for each polygon
58# Make these numbers larger to reduce the number of triangles in the model,
59# and hence speed up the simulation
60default_res = 10000000    # Background resolution
61islands_res = 100000
62cairns_res = 100000
63shallow_res = 500000
64
65# Define list of interior regions with associated resolutions
66interior_regions = [[poly_cairns,  cairns_res],
67                    [poly_island0, islands_res],
68                    [poly_island1, islands_res],
69                    [poly_island2, islands_res],
70                    [poly_island3, islands_res],
71                    [poly_shallow, shallow_res]]
72
73#------------------------------------------------------------------------------
74# Data for exporting ascii grid
75#------------------------------------------------------------------------------
76eastingmin = 363000
77eastingmax = 418000
78northingmin = 8026600
79northingmax = 8145700
80
81#------------------------------------------------------------------------------
82# Data for landslide
83#------------------------------------------------------------------------------
84slide_origin = [451871, 8128376]   # Assume to be on continental shelf
85slide_depth = 500.
Note: See TracBrowser for help on using the repository browser.