Index: /anuga_work/production/dampier_2006/project.py
===================================================================
--- /anuga_work/production/dampier_2006/project.py	(revision 3827)
+++ /anuga_work/production/dampier_2006/project.py	(revision 3828)
@@ -13,14 +13,6 @@
 from anuga.geospatial_data.geospatial_data import *
 
-# Location and naming of scenario data
-state = 'western_australia'
-scenario_dir_name = 'dampier_tsunami_scenario_2006'
-#scenario_dir_name = 'karratha_tsunami_scenario_2005' # Tmp location
-
-basename = 'elevation50m'
-boundary_basename = 'dampier'
-
-
-# Data output
+# file and system info
+#---------------------------------
 codename = 'project.py'
 
@@ -34,22 +26,84 @@
 # INUNDATIONHOME is the inundation directory, not the data directory.
 home += sep +'data'
+#----------------------------------
+# Location and naming of scenario data
+#----------------------------------
+state = 'western_australia'
+scenario_name = 'dampier_tsunami'
+scenario_datas_name = 'dampier_tsunami_scenario_2006'  #name of the directory where the data is stored
+#scenario_datas_name = 'karratha_tsunami_scenario_2005' # Tmp location
+
+#mesh_name = 'elevation50m'
+boundary_name = 'dampier9'
+boundary_source = 'mag_9'
+
+# topography file names
+onshore_name = 'dli_no_islands'
+coast_name = 'DTED_05_Contour'
+islands_name = 'dted_islands'
+offshore_name = 'XY100003902'
+offshore_name1 = 'XY100003903'
+offshore_name2 = 'XY100003951'
+offshore_name3 = 'XY100006321'
+offshore_name4 = 'XY100011756'
+offshore_name5 = 'XY100014243'
+offshore_name6 = 'XY100014244'
+offshore_name7 = 'XY100021081'
+offshore_name8 = 'XY100021082'
+offshore_name9 = 'XY100021083'
+offshore_name10 = 'XY100021085'
+offshore_name11 = 'XY100021086'
+offshore_name12 = 'XY100026309'
+offshore_name13 = 'XY100026338'
+offshore_name14 = 'XYDM83'
+
+combined_name ='dampier_combined_elevation'
+
+
 
 #Derive subdirectories and filenames
+
+meshes_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'meshes'+sep
+topographies_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'topographies'+sep
+gauges_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'gauges'+sep
+polygons_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'polygons'+sep
+boundaries_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+boundary_source+sep
+#outputdir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'output'+sep
+tide_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'tide_data'+sep
+
 time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
-outputtimedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'output'+sep+time+sep
-
-meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
-datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
-gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
-polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
-boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+'test'+sep
-outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'output'+sep
-tidedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'tide_data'+sep
+
+output_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'outputs'+sep+time+sep
+topographies_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'topographies'+sep+time+sep
+boundaries_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'boundaries'+sep+time+sep
+
+
 
 #gauge_filename = gaugedir + 'gauge_location_broome.csv'
 
-meshname = meshdir + basename
-outputname = outputtimedir + basename  #Used by post processing
-boundaryname = boundarydir + boundary_basename  #Used by post processing
+onshore_dir_name = topographies_dir + onshore_name
+coast_dir_name = topographies_dir + coast_name
+islands_dir_name = topographies_dir + islands_name
+offshore_dir_name = topographies_dir + offshore_name
+offshore_dir_name1 = topographies_dir + offshore_name1
+offshore_dir_name2 = topographies_dir + offshore_name2
+offshore_dir_name3 = topographies_dir + offshore_name3
+offshore_dir_name4 = topographies_dir + offshore_name4
+offshore_dir_name5 = topographies_dir + offshore_name5
+offshore_dir_name6 = topographies_dir + offshore_name6
+offshore_dir_name7 = topographies_dir + offshore_name7
+offshore_dir_name8 = topographies_dir + offshore_name8
+offshore_dir_name9 = topographies_dir + offshore_name9
+offshore_dir_name10 = topographies_dir + offshore_name10
+offshore_dir_name11 = topographies_dir + offshore_name11
+offshore_dir_name12 = topographies_dir + offshore_name12
+offshore_dir_name13 = topographies_dir + offshore_name13
+offshore_dir_name14 = topographies_dir + offshore_name14
+
+combined_dir_name = topographies_dir + combined_name
+
+mesh_dir_name = meshes_dir + scenario_name
+output_dir_name = output_time_dir + scenario_name  #Used by post processing
+boundary_dir_name = boundaries_dir + boundary_name  #Used by post processing
 
 
@@ -61,4 +115,11 @@
 west = degminsec2decimal_degrees(116,17,0)
 east = degminsec2decimal_degrees(118,10,0)
+
+#only used to clip boundary condition
+north_boundary = north + 0.5
+south_boundary = south - 0.5
+west_boundary = west - 0.5
+east_boundary = east + 0.5
+
 
 p0 = [south, degminsec2decimal_degrees(116,32,0)]
@@ -72,5 +133,4 @@
 p8 = [south, east]
 
-
 bounding_polygon, zone =\
                   convert_from_latlon_to_utm([p0, p1, p2, p3, p4,
@@ -94,5 +154,8 @@
 assert zone == refzone
 
-
+e_min_area = 474000
+e_max_area = 480000
+n_min_area = 7719000
+n_max_area = 7725000
 
 #Interior regions
Index: /anuga_work/production/dampier_2006/run_dampier.py
===================================================================
--- /anuga_work/production/dampier_2006/run_dampier.py	(revision 3827)
+++ /anuga_work/production/dampier_2006/run_dampier.py	(revision 3828)
@@ -51,24 +51,10 @@
 from anuga.shallow_water.data_manager import urs2sww
 
-urs2sww(boundary_file, verbose='true', 
-       minlat=project.south,
-       maxlat=project.north,
-       minlon=project.west,
-       maxlon=project.east)
-
-import sys; sys.exit()
-Bf = File_boundary(source_dir + project.boundary_basename + '.sww',
-                   domain, verbose = True)
-                   
-Br = Reflective_boundary(domain)
-Bd = Dirichlet_boundary([tide,0,0])
-domain.set_boundary({'back': Br,
-                     'side': Bd,
-                     'ocean': Bf}) 
 
 
 # creates copy of code in output dir if dir doesn't exist
 if access(project.outputtimedir,F_OK) == 0:
-    mkdir (project.outputtimedir)
+    print 'project.outputtimedir',dirname(project.outputtimedir)
+    mkdir (project.outputtimedir,0777)
 copy (dirname(project.__file__) +sep+ project.__name__+'.py',
       project.outputtimedir + project.__name__+'.py')
@@ -91,10 +77,11 @@
                     #[project.point_polygon, 2000]]
                     #[project.cipma_polygon, 20000]]
-                    [project.cipma_polygon, 4000]]    # Caused memory error?
-
+                    [project.cipma_polygon, 40000]]    # Caused memory error?
 
 #---------------------------
 # this is check that no interior polygon is outside the bounding poly
 #------------------------------
+
+"""
 count = 0
 for i in range(len(interior_regions)):
@@ -112,5 +99,5 @@
     print 'check %s in production directory' %figname
     import sys; sys.exit()
-
+"""
 #-------------------------------------
 
@@ -156,13 +143,10 @@
 #-------------------------------------------------------------------------
 
+
 print 'Available boundary tags', domain.get_boundary_tags()
 
+from anuga.shallow_water.data_manager import urs2sww
 
-
-urs2sww(boundary_file, 
-       minlat=project.south,
-       maxlat=project.north,
-       minlon=project.west,
-       maxlon=project.east)
+urs2sww(boundary_file, verbose='true')
 
 Bf = File_boundary(source_dir + project.boundary_basename + '.sww',
@@ -174,5 +158,4 @@
                      'ocean': Bf}) 
 
-
 #----------------------------------------------------------------------------
 # Evolve system through time
@@ -181,5 +164,5 @@
 t0 = time.time()
 
-for t in domain.evolve(yieldstep = 60, finaltime = 28600):
+for t in domain.evolve(yieldstep = 120, finaltime = 28800):
     domain.write_time()
     domain.write_boundary_statistics(tags = 'ocean')     
