Index: /anuga_work/production/shark_bay_2007/project.py
===================================================================
--- /anuga_work/production/shark_bay_2007/project.py	(revision 4884)
+++ /anuga_work/production/shark_bay_2007/project.py	(revision 4885)
@@ -13,9 +13,10 @@
 from anuga.utilities.system_tools import get_user_name, get_host_name
 
-codename = 'project.py' # FIXME can be obtained automatically as __file__
+#codename = 'project.py' # FIXME can be obtained automatically as __file__
 
 home = join(getenv('INUNDATIONHOME'), 'data') # Location of Data   
 user = get_user_name()
 host = get_host_name()
+
 #needed when running using mpirun, mpirun doesn't inherit umask from .bashrc
 umask(002)
@@ -37,5 +38,5 @@
 # For frequency response study
 amplitude = 0.5
-period = 3000
+period = 1800
 
 #momentum_scale=50 # Experiment
@@ -44,7 +45,7 @@
 #Maybe will try to make project a class to allow these parameters to be passed in.
 alpha = 0.1
-friction=0.01
-finaltime=40000
-starttime=8000 # Action starts around 9000
+friction = 0.01
+finaltime = 40000
+starttime = 8000 # Action starts around 9000
 setup='final'
 #setup='trial'
Index: /anuga_work/production/shark_bay_2007/run_shark_bay_embayment_study.py
===================================================================
--- /anuga_work/production/shark_bay_2007/run_shark_bay_embayment_study.py	(revision 4884)
+++ /anuga_work/production/shark_bay_2007/run_shark_bay_embayment_study.py	(revision 4885)
@@ -52,139 +52,120 @@
 
 
-def run_model(**kwargs):
     
-    alpha = kwargs['alpha']
-    friction = kwargs['friction']
-    time_thinning = kwargs['time_thinning']
-    scenario_name = kwargs['aa_scenario_name']
     
-    #-----------------------------------------------------------------
-    # Copy scripts to time stamped output directory and capture screen
-    # output to file
-    #-----------------------------------------------------------------
+#-----------------------------------------------------------------
+# Copy scripts to time stamped output directory and capture screen
+# output to file
+#-----------------------------------------------------------------
 
-    #copy_code_files(project.output_run_time_dir,
-    #                __file__, 
-    #                dirname(project.__file__)+sep+project.__name__+'.py' )
+copy_code_files(project.output_run_time_dir,
+                __file__, 
+                dirname(project.__file__)+sep+project.__name__+'.py' )
 
 
-    #start_screen_catcher(project.output_run_time_dir)
+start_screen_catcher(project.output_run_time_dir)
 
 
-    #--------------------------------------------------------------------------
-    # Create the triangular mesh based on overall clipping polygon with a
-    # tagged
-    # boundary and interior regions defined in project.py along with
-    # resolutions (maximal area of per triangle) for each polygon
-    #--------------------------------------------------------------------------
+#--------------------------------------------------------------------------
+# Create the triangular mesh based on overall clipping polygon with a
+# tagged
+# boundary and interior regions defined in project.py along with
+# resolutions (maximal area of per triangle) for each polygon
+#--------------------------------------------------------------------------
 
-    print 'Create mesh from regions'
-    create_mesh_from_regions(project.small_bounding_polygon,
-                             boundary_tags=project.boundary_tags_small,
-                             maximum_triangle_area=project.res_bounding_polygon,
-                             interior_regions=project.interior_regions,
-                             filename=project.mesh_name+'.msh',
-                             fail_if_polygons_outside=False,
-                             use_cache=False,
-                             verbose=True)
+print 'Create mesh from regions'
+create_mesh_from_regions(project.small_bounding_polygon,
+                         boundary_tags=project.boundary_tags_small,
+                         maximum_triangle_area=project.res_bounding_polygon,
+                         interior_regions=project.interior_regions,
+                         filename=project.mesh_name+'.msh',
+                         fail_if_polygons_outside=False,
+                         use_cache=False,
+                         verbose=True)
 
-    #-------------------------------------------------------------------------
-    # Setup computational domain
-    #-------------------------------------------------------------------------
-    print 'Setup computational domain'
-    domain = Domain(project.mesh_name+'.msh',
-                    use_cache=False, verbose=True)
-       
-    print domain.statistics()
+#-------------------------------------------------------------------------
+# Setup computational domain
+#-------------------------------------------------------------------------
+print 'Setup computational domain'
+domain = Domain(project.mesh_name+'.msh',
+                use_cache=False, verbose=True)
+
+print domain.statistics()
     
 
-    #-------------------------------------------------------------------------
-    # Setup initial conditions
-    #-------------------------------------------------------------------------
+#-------------------------------------------------------------------------
+# Setup initial conditions
+#-------------------------------------------------------------------------
 
-    print 'Set initial conditions'
-    domain.set_quantity('stage', project.tide)
-    domain.set_quantity('friction', friction)
-    domain.set_quantity('elevation', 
-                        filename = project.combined_dir_name + '.pts',
-                        use_cache = True,
-                        verbose = True,
-                        alpha = project.alpha)
+print 'Set initial conditions'
+domain.set_quantity('stage', project.tide)
+domain.set_quantity('friction', project.friction)
+domain.set_quantity('elevation', 
+                    filename = project.combined_dir_name + '.pts',
+                    use_cache = True,
+                    verbose = True,
+                    alpha = project.alpha)
         
 
-    #------------------------------------------------------
-    # Set domain parameters
-    #------------------------------------------------------
-    domain.set_name(scenario_name)
-    domain.set_datadir(project.output_run_time_dir)
-    domain.set_default_order(2)              # Apply second order scheme
-    domain.set_minimum_storable_height(0.01) # Don't store anything < 1cm
-    domain.set_store_vertices_uniquely(False)
-    domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
+#------------------------------------------------------
+# Set domain parameters
+#------------------------------------------------------
+domain.set_name(project.scenario_name)
+domain.set_datadir(project.output_run_time_dir)
+domain.set_default_order(2)              # Apply second order scheme
+domain.set_minimum_storable_height(0.01) # Don't store anything < 1cm
+domain.set_store_vertices_uniquely(False)
+domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
 
-    domain.beta_h = 0
-    domain.tight_slope_limiters = 1
+domain.beta_h = 0
+domain.tight_slope_limiters = 1
     
 
-    #-------------------------------------------------------------------------
-    # Setup boundary conditions 
-    #-------------------------------------------------------------------------
-    print 'Available boundary tags', domain.get_boundary_tags()
-    print 'domain id', id(domain)
+#-------------------------------------------------------------------------
+# Setup boundary conditions 
+#-------------------------------------------------------------------------
+print 'Available boundary tags', domain.get_boundary_tags()
+print 'domain id', id(domain)
 
-    def waveform(t):
-        delay = 900
-        A = project.amplitude
-        T = project.period
-        if t < delay:
-            # Let things settle
-            return project.tide
-        else:
-            return project.tide + A*sin(2*pi*(t-delay)/T)
+def waveform(t):
+    delay = 900
+    A = project.amplitude
+    T = project.period
+    if t < delay:
+        # Let things settle
+        return project.tide
+    else:
+        return project.tide + A*sin(2*pi*(t-delay)/T)
 
-    Bf = Transmissive_Momentum_Set_Stage_boundary(domain, waveform)
-    Br = Reflective_boundary(domain)
-    Bd = Dirichlet_boundary([project.tide,0,0])
+Bf = Transmissive_Momentum_Set_Stage_boundary(domain, waveform)
+Br = Reflective_boundary(domain)
+Bd = Dirichlet_boundary([project.tide,0,0])
 
 
-    print 'Set boundary'
-    domain.set_boundary({'tide': Bd,
-                         'ocean': Bf})
+print 'Set boundary'
+domain.set_boundary({'tide': Bd,
+                     'ocean': Bf})
 
 
-    #------------------------------
-    # Evolve system through time
-    #------------------------------
-    t0 = time.time()
-    for t in domain.evolve(yieldstep = 5,
-                           finaltime = 10000):
-        domain.write_time()
-        domain.write_boundary_statistics(tags = 'ocean')     
+#------------------------------
+# Evolve system through time
+#------------------------------
+t0 = time.time()
+for t in domain.evolve(yieldstep = 5,
+                       finaltime = 10000):
+    domain.write_time()
+    domain.write_boundary_statistics(tags='ocean')     
 
 
-    #------------------------------
-    # Post processing
-    #------------------------------
-    x, y = domain.get_maximum_inundation_location()
-    q = domain.get_maximum_inundation_elevation()
+#------------------------------
+# Post processing
+#------------------------------
+x, y = domain.get_maximum_inundation_location()
+q = domain.get_maximum_inundation_elevation()
 
-    print 'Maximum runup observed at (%.2f, %.2f) with elevation %.2f' %(x,y,q)
+print 'Maximum runup observed at (%.2f, %.2f) with elevation %.2f' %(x,y,q)
 
-    print 'That took %.2f seconds' %(time.time()-t0)
+print 'That took %.2f seconds' %(time.time()-t0)
     
 
-#-------------------------------------------------------------
-if __name__ == "__main__":
 
-    run_model(file_name=project.home+'detail.csv',
-              aa_scenario_name=project.scenario_name,
-              ab_time=project.time,
-              res_factor= project.res_factor,
-              tide=project.tide,
-              user=project.user,
-              alpha = project.alpha,
-              friction=project.friction,
-              time_thinning = project.time_thinning,
-              dir_comment=project.dir_comment)
-
-
