Index: /anuga_work/production/broome_2006/run_building_inundation.py
===================================================================
--- /anuga_work/production/broome_2006/run_building_inundation.py	(revision 4309)
+++ /anuga_work/production/broome_2006/run_building_inundation.py	(revision 4310)
@@ -33,4 +33,5 @@
 
 add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out)
+inundation_damage(swwfile, buildings_filename, buildings_filename_out)
 
 
Index: /anuga_work/production/busselton_2006/run_building_inundation.py
===================================================================
--- /anuga_work/production/busselton_2006/run_building_inundation.py	(revision 4309)
+++ /anuga_work/production/busselton_2006/run_building_inundation.py	(revision 4310)
@@ -33,5 +33,5 @@
 
 add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out)
-
+inundation_damage(swwfile, buildings_filename, buildings_filename_out)
 
 print '\n Augmented building file written to %s \n' \
Index: /anuga_work/production/dampier_2006/run_building_inundation.py
===================================================================
--- /anuga_work/production/dampier_2006/run_building_inundation.py	(revision 4309)
+++ /anuga_work/production/dampier_2006/run_building_inundation.py	(revision 4310)
@@ -33,5 +33,5 @@
 
 add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out)
-
+inundation_damage(swwfile, buildings_filename, buildings_filename_out)
 
 print '\n Augmented building file written to %s \n' \
Index: /anuga_work/production/exmouth_2006/run_building_inundation.py
===================================================================
--- /anuga_work/production/exmouth_2006/run_building_inundation.py	(revision 4309)
+++ /anuga_work/production/exmouth_2006/run_building_inundation.py	(revision 4310)
@@ -33,5 +33,5 @@
 
 add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out)
-
+inundation_damage(swwfile, buildings_filename, buildings_filename_out)
 
 print '\n Augmented building file written to %s \n' \
Index: /anuga_work/production/gold_coast_2007/export_results.py
===================================================================
--- /anuga_work/production/gold_coast_2007/export_results.py	(revision 4309)
+++ /anuga_work/production/gold_coast_2007/export_results.py	(revision 4310)
@@ -5,5 +5,11 @@
 from os import sep
 
-time_dir = '20070228_071238'
+#time_dir = '20070228_071238' # 6.0 m
+#time_dir = '20070305_051718' # 2.5m
+#time_dir = '20070305_051728' # 3.5m
+#time_dir = '20070305_051817' # 4.5m
+time_dir = '20070314_231144' # 4.5 tide
+#time_dir = '20070314_231156' # 5m tide
+
 
 directory = project.outputdir
@@ -24,5 +30,5 @@
 
 if which_var == 2:  # Depth
-    outname = name + '_depth-eq'
+    outname = name + '_depth'
     quantityname = 'stage-elevation'  
 
@@ -57,5 +63,5 @@
                 quantity = quantityname,
                 #timestep = 0,
-                cellsize = 50,      
+                cellsize = 20,      
                 easting_min = project.eastingmin,
                 easting_max = project.eastingmax,
Index: /anuga_work/production/gold_coast_2007/project.py
===================================================================
--- /anuga_work/production/gold_coast_2007/project.py	(revision 4309)
+++ /anuga_work/production/gold_coast_2007/project.py	(revision 4310)
@@ -28,4 +28,9 @@
 gc250 = 'dem_250'
 
+# better DEM
+gc5 = 'dem_5m_ascii'
+offshore = 'xy_AHD'
+coastline = 'coastline'
+
 #swollen/ all data output
 basename = 'source'
@@ -42,6 +47,6 @@
 outputtimedir = outputdir + local_time + sep
 polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
+alex_datadir = home+sep+state+sep+scenario_dir_name+sep+'elevation_final'+sep+'points'+sep
 
-#gauge_filename = gaugedir + 'sydney_slide_gauges.csv'
 codedir = getcwd()+sep                            
 codedirname = codedir + 'project.py'
@@ -49,7 +54,12 @@
 
 # Necessary if using point datasets, rather than grid
-gc_dem_name = datadir + gc250
+gc_dem_name = alex_datadir + gc5
+offshore_name = datadir + offshore
+coast_name = datadir + coastline
 combined_dem_name   = datadir + 'gc_elevation'
 
+gauge_name = gaugedir + 'gc_gauges.csv'
+buildings_filename = gaugedir + 'gc_nexis.csv'
+buildings_filename_out = 'gc_nexis_modified.csv'
 ###############################
 # Domain definitions
@@ -57,5 +67,5 @@
 
 # bounding polygon for study area
-polyAll = read_polygon(polygondir+'extent.csv')
+polyAll = read_polygon(polygondir+'extentv2.csv')
 
 print 'Area of bounding polygon', polygon_area(polyAll)/1000000.0
@@ -70,4 +80,6 @@
 print 'Area of local polygon', polygon_area(poly_int)/1000000.0
 
+poly_bathy = read_polygon(polygondir+'mainland_only.csv')
+
 ###################################################################
 # Clipping regions for export to asc and regions for clipping data
@@ -75,6 +87,6 @@
 
 # exporting asc grid
-eastingmin = 538450
+eastingmin = 534300
 eastingmax = 546775
-northingmin = 6890540
-northingmax = 6902925
+northingmin = 6890000
+northingmax = 6912925
Index: /anuga_work/production/gold_coast_2007/run_goldcoast.py
===================================================================
--- /anuga_work/production/gold_coast_2007/run_goldcoast.py	(revision 4309)
+++ /anuga_work/production/gold_coast_2007/run_goldcoast.py	(revision 4310)
@@ -55,5 +55,5 @@
 gc_dem_name = project.gc_dem_name
 meshname = project.meshname+'.msh'
-
+'''
 # creates DEM from asc data
 convert_dem_from_ascii2netcdf(gc_dem_name, use_cache=True, verbose=True)
@@ -62,9 +62,10 @@
 dem2pts(gc_dem_name, use_cache=True, verbose=True)
 
-G = Geospatial_data(file_name = project.gc_dem_name + '.pts')
+G = Geospatial_data(file_name = project.gc_dem_name + '.pts') + \
+    Geospatial_data(file_name = project.offshore_name + '.xya') +\
+    Geospatial_data(file_name = project.coast_name + '.xya')
 
 G.export_points_file(project.combined_dem_name + '.pts')
-
-
+'''
 #----------------------------------------------------------------------------
 # Create the triangular mesh based on overall clipping polygon with a tagged
@@ -74,6 +75,6 @@
 
 from anuga.pmesh.mesh_interface import create_mesh_from_regions
-remainder_res = 150000.
-int_res = 1000.
+remainder_res = 1000000.
+int_res = 10000.
 interior_regions = [[project.poly_int, int_res]]
 
@@ -105,6 +106,13 @@
 #-------------------------------------------------------------------------------
 
-tide = 0.0
-domain.set_quantity('stage', tide)
+#tide = 3.0
+tide = 1.0
+from polygon import *
+#IC = Polygon_function( [(project.poly_bathy, 0.)], default = tide)
+#IC = Polygon_function( [(poly, 0.)], default = tide)
+from anuga.utilities.polygon import read_polygon
+poly = read_polygon('test.csv')
+IC = Polygon_function( [(poly, 1000.)], default = 0.0)
+domain.set_quantity('stage', IC)
 domain.set_quantity('friction', 0.0) 
 domain.set_quantity('elevation', 
@@ -122,6 +130,9 @@
 Br = Reflective_boundary(domain)
 Bd = Dirichlet_boundary([tide,0,0])
+# 10 min period = 1/600 frequency
+from math import sin
 Bw = Time_boundary(domain=domain, # Time dependent boundary
-                   f=lambda t: [(60<t<660)*6., 0, 0])
+                   #f=lambda t: [1.0*sin(t/600.), 0, 0])
+                   f=lambda t: [(60<t<3660)*0.1, 0, 0])
 
 domain.set_boundary( {'e0': Bw,  'e1': Bd, 'e2': Bd, 'e3': Bd} )
@@ -135,5 +146,5 @@
 t0 = time.time()
 
-for t in domain.evolve(yieldstep = 10, finaltime = 5000): 
+for t in domain.evolve(yieldstep = 10, finaltime = 15000): 
     domain.write_time()
     domain.write_boundary_statistics(tags = 'e0')
Index: /anuga_work/production/onslow_2006/run_building_inundation.py
===================================================================
--- /anuga_work/production/onslow_2006/run_building_inundation.py	(revision 4309)
+++ /anuga_work/production/onslow_2006/run_building_inundation.py	(revision 4310)
@@ -33,5 +33,5 @@
 
 add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out)
-
+inundation_damage(swwfile, buildings_filename, buildings_filename_out)
 
 print '\n Augmented building file written to %s \n' \
Index: /anuga_work/production/perth_2006/run_building_inundation.py
===================================================================
--- /anuga_work/production/perth_2006/run_building_inundation.py	(revision 4309)
+++ /anuga_work/production/perth_2006/run_building_inundation.py	(revision 4310)
@@ -33,5 +33,5 @@
 
 add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out)
-
+inundation_damage(swwfile, buildings_filename, buildings_filename_out)
 
 print '\n Augmented building file written to %s \n' \
Index: /anuga_work/production/pt_hedland_2006/run_building_inundation.py
===================================================================
--- /anuga_work/production/pt_hedland_2006/run_building_inundation.py	(revision 4309)
+++ /anuga_work/production/pt_hedland_2006/run_building_inundation.py	(revision 4310)
@@ -33,5 +33,5 @@
 
 add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out)
-
+inundation_damage(swwfile, buildings_filename, buildings_filename_out)
 
 print '\n Augmented building file written to %s \n' \
