Index: oduction/onslow_2006/compare_timeseries.py
===================================================================
--- /production/onslow_2006/compare_timeseries.py	(revision 3275)
+++ 	(revision )
@@ -1,105 +1,0 @@
-"""
-Generate latex output comparing time series of given sww files
-
-Inputs:
-
-output dirs: dictionary of output directories with a
-             association to simulation, eg 50m boundary, 100m boundary
-                    
-Outputs:
-
-* latex output to generate figures for report 
-* figures used for report stored in the report_figure directory
-NOTE, this directory will need to be committed, as well as
-the latex files.
-
-June 2006                    
-"""
-
-from os import sep
-import project
-from pyvolution.util import sww2timeseries, get_gauges_from_file
-
-# User defined inputs
-# for comparison between MOST and ANUGA
-production_dirs = {'20060515_001733': '100m boundary',
-                   '20060530_102753': '50m boundary',
-                   'MOST': 'MOST'}
-
-gauge_map = 'onslow_boundary_gauges.png' # MOST/ANUGA comparison
-
-plot_quantity = ['stage', 'speed']
-
-# Create sections and graphs for each designated production directory
-latex_output = []
-swwfiles = {}
-for label_id in production_dirs.keys():
-    
-    file_loc = project.outputdir + label_id + sep
-    swwfile = file_loc + project.basename + '.sww'
-    if label_id == 'MOST':
-        swwfile = project.boundarydir + project.boundary_basename + '.sww'
-    swwfiles[swwfile] = label_id
-
-texname, vec = sww2timeseries(swwfiles,
-                              project.gauges50,
-                              production_dirs,
-                              report = True,
-                              reportname = 'latexoutput_compare50_100_MOST',
-                              surface = False,
-                              plot_quantity = plot_quantity,
-                              time_min = None,
-                              time_max = None,
-                              title_on = False,
-                              verbose = True)
-
-latex_output.append(texname)
-
-# for MOST/ANUGA comparison
-from shutil import copy, move
-copy ('report' + sep + texname + '.tex', project.comparereportdir + sep + texname + '.tex')
-
-
-# Start report generation
-# for MOST/ANUGA comparison
-input_name = project.comparereportdir + sep + '50100MOSTcomparison_onslow.tex'
-fid = open(input_name, 'w')
-
-
-# Generate latex output for location points
-s = '\\begin{table} \label{table:locationsonslow} \n'
-fid.write(s)
-s = '\caption{Defined point locations for comparison study for Onslow region.}' 
-fid.write(s)
-s = """
-\\begin{center}
-\\begin{tabular}{|l|l|l|l|}\hline
-\\bf{Point Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation (m)}\\\\ \hline
-"""
-fid.write(s)
-
-for i, thisvec in enumerate(vec):
-    name = thisvec[0]
-    east = thisvec[1]
-    north = thisvec[2]
-    elev = thisvec[3]
-    s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name, east, north, elev)
-    fid.write(s)
-    for which_one in plot_quantity:
-        move ('report_figures' + sep + 'gauge'+name.replace(' ','')+which_one+'.png', project.comparereportfigdir)
-
-s = '\\end{tabular} \n  \end{center} \n \end{table} \n \n'
-fid.write(s)
-
-s = '\\begin{figure}[hbt] \n \centerline{ \includegraphics[width=150mm, height=100mm]{../report_figures/%s}}' %gauge_map
-fid.write(s)
-
-s  = """
-\caption{Point locations used for comparison between boundary at 50m and 100m contour for Onslow region.}  
-\label{fig:points}
-\end{figure}
-"""
-fid.write(s)
-    
-s = '\input{%s} \n \clearpage \n \n' %latex_output[0]
-fid.write(s)
Index: /production/onslow_2006/project.py
===================================================================
--- /production/onslow_2006/project.py	(revision 3275)
+++ /production/onslow_2006/project.py	(revision 3276)
@@ -44,5 +44,4 @@
     user = getenv('USERPROFILE')
 #    user = basename(user_path)
-    print 'USER:', user
     
 else:    
@@ -63,4 +62,5 @@
 outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
 tidedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'tide_data'+sep
+comparereportdir = '..'+sep+'..'+sep+'documentation'+sep+'experimentation'+sep+'boundary_ANUGA_MOST'+sep+'report'
 
 outputtimedir = outputdir + local_time + sep
Index: /production/onslow_2006/run_onslow.py
===================================================================
--- /production/onslow_2006/run_onslow.py	(revision 3275)
+++ /production/onslow_2006/run_onslow.py	(revision 3276)
@@ -18,4 +18,7 @@
 import os
 import time
+from shutil import copy
+from os import mkdir, access, F_OK
+import sys
 
 # Related major packages
@@ -25,36 +28,14 @@
 from pyvolution.combine_pts import combine_rectangular_points_files 
 from pyvolution.pmesh2domain import pmesh_to_domain_instance
-#from geospatial_data import add_points_files
+from geospatial_data import *
+from pyvolution.util import Screen_Catcher
 
 # Application specific imports
 import project                 # Definition of file names and polygons
-from smf import slump_tsunami  # Function for submarine mudslide 
-
-from shutil import copy
-from os import mkdir, access, F_OK
-
-from geospatial_data import *
-import sys
-from pyvolution.util import Screen_Catcher
-
-#-------------------------------------------------------------------------------
-# Preparation of topographic data
-#
-# Convert ASC 2 DEM 2 PTS using source data and store result in source data
-# Do for coarse and fine data
-# Fine pts file to be clipped to area of interest
-#-------------------------------------------------------------------------------
-
-# filenames
-#coarsedemname = project.coarsedemname
-
-onshore_dem_name = project.onshore_dem_name
-islands_dem_name = project.islands_dem_name
-coast_points = project.coast_dem_name
-offshore_points = project.offshore_dem_name
-
-meshname = project.meshname+'.msh'
-
-source_dir = project.boundarydir
+
+#-------------------------------------------------------------------------------
+# Copy scripts to time stamped output directory and capture screen
+# output to file
+#-------------------------------------------------------------------------------
 
 # creates copy of code in output dir if dir doesn't exist
@@ -74,4 +55,21 @@
 sys.stderr = Screen_Catcher(screen_error_name)
 
+print 'USER:    ', project.user
+
+#-------------------------------------------------------------------------------
+# Preparation of topographic data
+#
+# Convert ASC 2 DEM 2 PTS using source data and store result in source data
+# Do for coarse and fine data
+# Fine pts file to be clipped to area of interest
+#-------------------------------------------------------------------------------
+
+# filenames
+onshore_dem_name = project.onshore_dem_name
+islands_dem_name = project.islands_dem_name
+coast_points = project.coast_dem_name
+offshore_points = project.offshore_dem_name
+meshname = project.meshname+'.msh'
+source_dir = project.boundarydir
 
 copied_files = False
@@ -80,14 +78,4 @@
 files_used = [onshore_dem_name, offshore_points, coast_points,]
 
-if sys.platform != 'win32':    
-    copied_files = True
-    for name in file_list:
-        copy(name, )
-'''    
-#print' most file', project.MOST_dir + project.boundary_basename+'_ha.nc'
-#if access(project.MOST_dir + project.boundary_basename+'_ha.nc',F_OK) == 1 :
-#    print' most file', project.MOST_dir + project.boundary_basename
-
-'''
 # fine data (clipping the points file to smaller area)
 # creates DEM from asc data
@@ -110,20 +98,14 @@
 print'create G1'
 G1 = Geospatial_data(file_name = project.offshore_dem_name + '.xya')
-
 print'create G2'
 G2 = Geospatial_data(file_name = project.onshore_dem_name + '.pts')
-
 print'create G3'
 G3 = Geospatial_data(file_name = project.coast_dem_name + '.xya')
-
 print'create G4'
 G4 = Geospatial_data(file_name = project.islands_dem_name + '.pts')
-
 print'add G1+G2+G3+G4'
 G = G1 + G2 + G3 + G4
-
 print'export G'
 G.export_points_file(project.combined_dem_name + '.pts')
-
 
 #-------------------------------------------------------------------------------                                 
@@ -134,16 +116,9 @@
 
 from pmesh.mesh_interface import create_mesh_from_regions
-'''
-# original
-interior_res = 5000
-high_res = 1500
-interior_regions = [[project.poly_onslow, high_res],
-                    [project.poly_thevenard, interior_res],
-                    [project.poly_coast, interior_res]]
-'''
+
 #new
-region_res = 25000
-coast_res = 2500
-onslow_res = 500
+region_res = 200000
+coast_res = 25000
+onslow_res = 5000
 interior_regions = [[project.poly_onslow, onslow_res],
                     [project.poly_coast, coast_res],
@@ -181,20 +156,5 @@
 domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
 
-#-------------------------------------------------------------------------------
-# Set up scenario (tsunami_source is a callable object used with set_quantity)
-#-------------------------------------------------------------------------------
-'''
-tsunami_source = slump_tsunami(length=30000.0,
-                               depth=400.0,
-                               slope=6.0,
-                               thickness=176.0, 
-                               radius=3330,
-                               dphi=0.23,
-                               x0=project.slump_origin[0], 
-                               y0=project.slump_origin[1], 
-                               alpha=0.0, 
-                               domain=domain)
-
-'''
+
 #-------------------------------------------------------------------------------                                 
 # Setup initial conditions
@@ -253,6 +213,6 @@
        'inverted_bathymetry': True},
       #evaluate = True,
-      verbose = True, 
-      dependencies = source_dir + project.boundary_basename + '.sww')
+       verbose = True,
+       dependencies = source_dir + project.boundary_basename + '.sww')
 
 
@@ -270,6 +230,6 @@
 
 domain.set_boundary( {'top': Bf, 'topleft': Bf,
-                             'topleft1': Bf, 'bottomleft': Bd,
-                             'bottom': Br, 'bottomright': Br, 'topright': Bd} )
+                      'topleft1': Bf, 'bottomleft': Bd,
+                      'bottom': Br, 'bottomright': Br, 'topright': Bd} )
 
 #-------------------------------------------------------------------------------                                 
@@ -279,19 +239,28 @@
 t0 = time.time()
 
-for t in domain.evolve(yieldstep = 450, finaltime = 10800): 
-    domain.write_time()
-    domain.write_boundary_statistics(tags = 'top')     
-
-for t in domain.evolve(yieldstep = 1, finaltime = 17760
-                       ,skip_initial_step = True): 
-    domain.write_time()
-    domain.write_boundary_statistics(tags = 'top')     
-
-for t in domain.evolve(yieldstep = 480, finaltime = 36000
+for t in domain.evolve(yieldstep = 240, finaltime = 7200): 
+    domain.write_time()
+    domain.write_boundary_statistics(tags = 'top')     
+
+for t in domain.evolve(yieldstep = 120, finaltime = 12600
+                       ,skip_initial_step = True): 
+    domain.write_time()
+    domain.write_boundary_statistics(tags = 'top')     
+
+for t in domain.evolve(yieldstep = 60, finaltime = 19800
                        ,skip_initial_step = True): 
     domain.write_time()
     domain.write_boundary_statistics(tags = 'top')     
     
-  
+for t in domain.evolve(yieldstep = 120, finaltime = 25200
+                       ,skip_initial_step = True): 
+    domain.write_time()
+    domain.write_boundary_statistics(tags = 'top')     
+
+for t in domain.evolve(yieldstep = 240, finaltime = 36000
+                       ,skip_initial_step = True): 
+    domain.write_time()
+    domain.write_boundary_statistics(tags = 'top')
+    
 print 'That took %.2f seconds' %(time.time()-t0)
 
