Index: /anuga_core/documentation/user_manual/anuga_user_manual.tex
===================================================================
--- /anuga_core/documentation/user_manual/anuga_user_manual.tex	(revision 3943)
+++ /anuga_core/documentation/user_manual/anuga_user_manual.tex	(revision 3944)
@@ -3219,5 +3219,9 @@
 http://www.mssanz.org.au/modsim05/papers/nielsen.pdf
 
-
+\bibitem[grid250]{grid250}
+Australian Bathymetry and Topography Grid, June 2005.
+Webster, M.A. and Petkovic, P.
+Geoscience Australia Record 2005/12. ISBN: 1-920871-46-2.\\
+http://www.ga.gov.au/meta/ANZCW0703008022.html
 
 
Index: /anuga_core/documentation/user_manual/examples/project.py
===================================================================
--- /anuga_core/documentation/user_manual/examples/project.py	(revision 3943)
+++ /anuga_core/documentation/user_manual/examples/project.py	(revision 3944)
@@ -45,26 +45,31 @@
 # demo poly 
 j0 = [385000, 6280000]
-j1 = [360000, 6272500]
-j2 = [335000, 6272500]
+j1 = [360000, 6273000]
+j2 = [335000, 6273000]
 j3 = [330000, 6265000]
 j31 = [325000, 6260000]
 j4 = [316000, 6260000]
-j5 = [316000, 6247000]
-j6 = [350000, 6247000]
+j5 = [316000, 6246750]
+j6 = [350000, 6246750]
 j7 = [385000, 6238000]
 
 demopoly = [j0, j1, j2, j3, j31, j4, j5, j6, j7]
 
-from utilities.polygon import read_polygon
-polygonptsfile4 = polygondir + 'poly1'
-polygonptsfile0 = polygondir + 'poly2'
-polygonptsfile1 = polygondir + 'poly3'
-polygonptsfile2 = polygondir + 'poly4'
-polygonptsfile3 = polygondir + 'poly5'
-northern_polygon = read_polygon(polygonptsfile0 + '.csv')
-manly_polygon = read_polygon(polygonptsfile1 + '.csv')
-harbour_polygon = read_polygon(polygonptsfile2 + '.csv')
-southern_polygon = read_polygon(polygonptsfile3 + '.csv')
-top_polygon = read_polygon(polygonptsfile4 + '.csv')
+from anuga.utilities.polygon import read_polygon, plot_polygons
+#polygonptsfile4 = polygondir + 'poly1'
+#polygonptsfile0 = polygondir + 'poly2'
+#polygonptsfile1 = polygondir + 'poly3'
+#polygonptsfile2 = polygondir + 'poly4'
+#polygonptsfile3 = polygondir + 'poly5'
+#northern_polygon = read_polygon(polygonptsfile0 + '.csv')
+#manly_polygon = read_polygon(polygonptsfile1 + '.csv')
+#harbour_polygon = read_polygon(polygonptsfile2 + '.csv')
+#southern_polygon = read_polygon(polygonptsfile3 + '.csv')
+#top_polygon = read_polygon(polygonptsfile4 + '.csv')
+coastal_polygon = read_polygon(polygondir+'coastal'+'.csv')
+shallow_polygon = read_polygon(polygondir+'shallow'+'.csv')
+
+#plot_polygons([demopoly,northern_polygon,manly_polygon,harbour_polygon,southern_polygon,top_polygon],'model_setup',verbose=False)
+plot_polygons([demopoly,coastal_polygon,shallow_polygon],'new_model_setup',verbose=False)
 
 slump_origin = [372500.0, 6255000.0] #Absolute UTM
Index: /anuga_core/documentation/user_manual/examples/runsydney.py
===================================================================
--- /anuga_core/documentation/user_manual/examples/runsydney.py	(revision 3943)
+++ /anuga_core/documentation/user_manual/examples/runsydney.py	(revision 3944)
@@ -59,10 +59,12 @@
 # Interior regions and mesh resolutions
 interior_res = 5000
-interior_regions = [[project.northern_polygon, interior_res],
-                    [project.harbour_polygon, interior_res],
-                    [project.southern_polygon, interior_res],
-                    [project.manly_polygon, interior_res],
-                    [project.top_polygon, interior_res]]
-
+shallow_res = 15000
+##interior_regions = [[project.northern_polygon, interior_res],
+##                    [project.harbour_polygon, interior_res],
+##                    [project.southern_polygon, interior_res],
+##                    [project.manly_polygon, interior_res],
+##                    [project.top_polygon, interior_res]]
+interior_regions = [[project.coastal_polygon, interior_res],
+                    [project.shallow_polygon, shallow_res]]
 
 create_mesh_from_regions(project.demopoly,
Index: /anuga_core/source/anuga/abstract_2d_finite_volumes/util.py
===================================================================
--- /anuga_core/source/anuga/abstract_2d_finite_volumes/util.py	(revision 3943)
+++ /anuga_core/source/anuga/abstract_2d_finite_volumes/util.py	(revision 3944)
@@ -681,5 +681,5 @@
         
     assert type(gauge_filename) == type(''),\
-               'Gauge filename must be a string'
+           'Gauge filename must be a string'
     
     try:
@@ -693,5 +693,4 @@
         report = False
         
-    
     if plot_quantity is None:
         plot_quantity = ['depth', 'speed', 'bearing']
@@ -733,5 +732,24 @@
                           verbose = True,
                           use_cache = True)
- 
+
+        # determine which gauges are contained in sww file
+        count = 0
+        gauge_index = []
+        print 'swwfile', swwfile
+        for k, g in enumerate(gauges):
+            if f(0.0, point_id = k)[2] > 1.0e6:
+                count += 1
+                if count == 1: print 'Gauges not contained here:'
+                print locations[k]
+            else:
+                gauge_index.append(k)
+
+        if len(gauge_index) > 0:
+            print 'Gauges contained here: \n',
+        else:
+            print 'No gauges contained here. \n'
+        for i in range(len(gauge_index)):
+             print locations[gauge_index[i]]
+             
         index = swwfile.rfind(sep)
         file_loc.append(swwfile[:index+1])
@@ -759,13 +777,21 @@
             raise Exception, msg
 
-    if verbose: print 'Inputs OK - going to generate figures'
-
-    return generate_figures(plot_quantity, file_loc, report, reportname, surface,
-                            leg_label, f_list, gauges, locations, elev, production_dirs,
-                            time_min, time_max, title_on, label_id, verbose)
+    if verbose and len(gauge_index) > 0: print 'Inputs OK - going to generate figures'
+
+    if len(gauge_index) <> 0:
+        texfile, elev_output = generate_figures(plot_quantity, file_loc, report, reportname, surface,
+                                                leg_label, f_list, gauges, locations, elev, gauge_index,
+                                                production_dirs, time_min, time_max, title_on, label_id, verbose)
+    else:
+        texfile = ''
+        elev_output = []
+
+    return texfile, elev_output
                          
 #Fixme - Use geospatial to read this file - it's an xya file
 #Need to include other information into this filename, so xya + Name - required for report
 def get_gauges_from_file(filename):
+    """ Read in gauge information from file
+    """
     from os import sep, getcwd, access, F_OK, mkdir
     fid = open(filename)
@@ -803,5 +829,6 @@
 
 def check_list(quantity):
-
+    """ Check that input quantities in quantity list are possible
+    """
     all_quantity = ['stage', 'depth', 'momentum', 'xmomentum',
                     'ymomentum', 'speed', 'bearing', 'elevation']
@@ -817,5 +844,6 @@
 
 def calc_bearing(uh, vh):
-
+    """ Calculate velocity bearing from North
+    """
     from math import atan, degrees
     
@@ -836,8 +864,9 @@
 
 def generate_figures(plot_quantity, file_loc, report, reportname, surface,
-                     leg_label, f_list,
-                     gauges, locations, elev, production_dirs, time_min, time_max,
-                     title_on, label_id, verbose):
-
+                     leg_label, f_list, gauges, locations, elev, gauge_index,
+                     production_dirs, time_min, time_max, title_on, label_id,
+                     verbose):
+    """ Generate figures based on required quantities and gauges for each sww file
+    """
     from math import sqrt, atan, degrees
     from Numeric import ones, allclose, zeros, Float, ravel
@@ -849,5 +878,5 @@
     if surface is True:
         import mpl3d.mplot3d as p3
-
+        
     if report == True:    
         texdir = getcwd()+sep+'report'+sep
@@ -904,5 +933,6 @@
         fid_compare = open(comparefile, 'w')
         ##### loop over each gauge #####
-        for k, g in enumerate(gauges):
+        for k in gauge_index:
+            g = gauges[k]
             if verbose: print 'Gauge %d of %d' %(k, len(gauges))
             min_stage = 10
@@ -992,6 +1022,6 @@
         savefig('profilefig')
                 
-    #stage_axis = axis([time_min/60.0, time_max/60.0, min(min_stages), max(max_stages)*1.1])
-    stage_axis = axis([time_min/60.0, time_max/60.0, -3.0, 3.0])    
+    stage_axis = axis([time_min/60.0, time_max/60.0, min(min_stages), max(max_stages)*1.1])
+    #stage_axis = axis([time_min/60.0, time_max/60.0, -3.0, 3.0])    
     vel_axis = axis([time_min/60.0, time_max/60.0, min(max_speeds), max(max_speeds)*1.1])
     mom_axis = axis([time_min/60.0, time_max/60.0, min(max_momentums), max(max_momentums)*1.1])  
@@ -1002,5 +1032,6 @@
     elev_output = []
     if len(label_id) > 1: graphname_report = []
-    for k, g in enumerate(gauges):
+    for k in gauge_index:
+        g = gauges[k]
         count1 = 0
         if report == True and len(label_id) > 1:
@@ -1008,5 +1039,5 @@
             fid.write(s)
         if len(label_id) > 1: graphname_report = []
-        #### generate figures for each gauge ###
+        #### generate figures for each gauge ####
         for j, f in enumerate(f_list):
             ion()
@@ -1109,5 +1140,5 @@
                         word_quantity += plot_quantity[i]
                     
-                word_quantity += ' and ' + plot_quantity[nn-1]                
+                word_quantity += ' and ' + plot_quantity[nn-1]
                 caption = 'Time series for %s at %s location (elevation %.2fm)' %(word_quantity, locations[k], elev[k]) #gaugeloc.replace('_',' '))
                 if elev[k] == 0.0:
@@ -1164,4 +1195,93 @@
     return texfile2, elev_output
 
+
+def gauge_in_sww(swwfile,
+                 gauge_filename,
+                 verbose = False):
+    
+    """ Determine which gauges fall in sww file.
+
+    Input variables:
+
+    swwfiles        - sww files 
+    
+    gauge_filename  - name of file containing gauge data
+                        - easting, northing, name , elevation
+                    - OR (this is not yet done)
+                        - structure which can be converted to a Numeric array,
+                          such as a geospatial data object
+                      
+    Output:
+    
+    - Modified gauge_filename containing gauges which fall is given sww file.
+      Name = gauges_filename_mod 
+    Other important information:
+                          
+    """
+
+    
+    k = _gauge_in_sww(swwfile,
+                      gauge_filename,
+                      verbose)
+
+    return k
+
+def _gauge_in_sww(swwfile, 
+                  gauge_filename,
+                  verbose = False):   
+
+    try:
+        fid = open(swwfile)
+    except Exception, e:
+        msg = 'File "%s" could not be opened: Error="%s"'\
+              %(swwfile, e)
+        raise msg
+        
+    assert type(gauge_filename) == type(''),\
+           'Gauge filename must be a string'
+    
+    try:
+        fid = open(gauge_filename)
+    except Exception, e:
+        msg = 'File "%s" could not be opened: Error="%s"'\
+                  %(gauge_filename, e)
+        raise msg
+
+    sww_quantity = ['stage', 'elevation', 'xmomentum', 'ymomentum']
+    f = file_function(swwfile,
+                      quantities = sww_quantity,
+                      #interpolation_points = gauges,
+                      verbose = True,
+                      use_cache = True)
+    print dir(f)
+    
+    #from bstract_2d_finite_volumes.neighbour_mesh import get_boundary_polygon
+    from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
+    #from anuga.fit_interpolate.general_fit_interpolate import FitInterpolate
+    #from anuga.fit_interpolate.interpolate import Interpolation_function
+    from anuga.fit_interpolate.interpolate import Interpolate
+
+    test = Mesh(f.vertex_coordinates)
+    print test.mesh.get_boundary_polygon()
+    
+    return check_gauge(gauge_filename,bounding_polygon)
+
+def check_gauge(gauge_filename,bounding_polygon):
+
+    from anuga.utilities.polygon import is_inside_polygon 
+    
+    filename_out = gauge_filename + '_mod'
+    fid_out = open(filename_out, 'w')
+    fid_out.write(s)
+
+    gauges, locations, elev = get_gauges_from_file(gauge_filename)
+    
+    for i, gauge in enumerate(gauges):
+        v = is_inside_polygon(gauge,bounding_polygon,verbose=False)
+        if v == True:
+            s = '%.2f, %.2f, %.2f, %s\n' %(gauges[0], gauges[1], elev[i], locations[i])
+    
+    return fid_out
+
 from os.path import basename
 
Index: /anuga_work/development/cairns_2006/run_cairns.py
===================================================================
--- /anuga_work/development/cairns_2006/run_cairns.py	(revision 3943)
+++ /anuga_work/development/cairns_2006/run_cairns.py	(revision 3944)
@@ -9,9 +9,10 @@
 #-------------------------------
 import sys, os
-from anuga.pyvolution.shallow_water import Domain, Reflective_boundary,\
+from anuga.shallow_water import Domain, Reflective_boundary,\
      File_boundary, Transmissive_Momentum_Set_Stage_boundary,\
      Transmissive_boundary, Dirichlet_boundary
-from anuga.pyvolution.mesh_factory import rectangular_cross
-from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance
+#from anuga.pyvolution.mesh_factory import rectangular_cross
+#from anuga.pmesh2domain import pmesh_to_domain_instance
+from anuga.pmesh.mesh_interface import create_mesh_from_regions
 from Numeric import array, zeros, Float, allclose
 import cairns_project as project
@@ -41,7 +42,8 @@
 """
 
-domain = cache(pmesh_to_domain_instance,
-               (project.mesh_filename, Domain),
-               dependencies = [project.mesh_filename])
+#cache(pmesh_to_domain_instance,
+#      (project.mesh_filename, Domain),
+#      dependencies = [project.mesh_filename])
+domain = Domain(project.mesh_filename, use_cache = True, verbose = True)
 
 domain.check_integrity()
Index: /anuga_work/production/broome_2006/export_results.py
===================================================================
--- /anuga_work/production/broome_2006/export_results.py	(revision 3943)
+++ /anuga_work/production/broome_2006/export_results.py	(revision 3944)
@@ -6,5 +6,5 @@
 from os import sep
 
-time_dir = '20061026_220716' 
+time_dir = '20061101_024119' 
 
 directory = project.outputdir
@@ -22,5 +22,5 @@
 
 if which_var == 2:  # Depth
-    outname = name + '_depth_bruny'
+    outname = name + '_depth'
     quantityname = 'stage-elevation'  #Depth
 
@@ -37,5 +37,5 @@
 sww2dem(name, basename_out = outname,
             quantity = quantityname,
-            cellsize = 25,      # would prefer this at 25
+            cellsize = 100,      # would prefer this at 25
             # define region for viz purposes
             easting_min = project.eastingmin,
Index: /anuga_work/production/broome_2006/project.py
===================================================================
--- /anuga_work/production/broome_2006/project.py	(revision 3943)
+++ /anuga_work/production/broome_2006/project.py	(revision 3944)
@@ -138,8 +138,8 @@
 
 # exporting asc grid
-eastingmin = 406215.87
-eastingmax = 440208.78
-northingmin = 7983427.73
-northingmax = 8032834.52
+eastingmin = 412036.43
+eastingmax = 427184.37
+northingmin = 8007984
+northingmax = 8029830
 
 	
Index: /anuga_work/production/dampier_2006/make_report_cipma.py
===================================================================
--- /anuga_work/production/dampier_2006/make_report_cipma.py	(revision 3944)
+++ /anuga_work/production/dampier_2006/make_report_cipma.py	(revision 3944)
@@ -0,0 +1,307 @@
+"""
+Generate report for production run
+
+NOTE - this will only work on Windows system (as pylab not installed on unix).
+
+Inputs:
+
+report_title:    title to be included in tex file
+production dirs: dictionary of production directories with a
+                 association to that simulation run, eg high tide,
+                 low tide and MSL.
+                    
+
+Outputs:
+
+* Report generated to scenario_report.tex where the scenario relates
+the name of the production directory this script is being run from.
+* figures used for report stored in the report_figure directory
+NOTE, this directory will need to be committed, as well as
+the latex files.
+
+The report structure is
+
+* Executive Summary
+* Introduction
+* Modelling Methodology
+* Tsunami scenario
+* Data sources
+* Inundation model
+* Inundation modelling results
+* Impact modelling
+* Summary
+* Acknowledgements
+* References
+* Appendix: Metadata
+* Appendix: Time series outputs
+
+Other files included in document which require manual intervention:
+
+* an abstract must be written in abstract.tex
+* an introduction must be written in introduction.tex; a basic outline and
+  some of the core inputs are already in place
+* the tsunami-genic event should be discussed in tsunami_scenario.tex
+* a discussion of the ANUGA model is required in anuga.tex
+* a computational_setup.tex file needs to be written for the particular scenario
+* the interpretation of the results needs to be written to interpretation.tex
+* maximum inundation map names need to be included in HAT_map and LAT_map etc.
+* damage modelling map names need to be included in HAT_damage and LAT_damage etc.
+* a summary must be written into summary.tex
+* metadata for the scenario data to be included in metadata.tex
+
+May, June 2006                    
+"""
+
+from os import getcwd, sep, altsep, mkdir, access, F_OK
+import project
+from anuga.abstract_2d_finite_volumes.util import sww2timeseries, get_gauges_from_file, gauge_in_sww
+
+# Derive scenario name
+p = getcwd().split(sep)
+scenario = p[-1] # Last element of absolute CWD path
+scenario_name = scenario.split('_2006')[0] # Strip any text past `_2006`
+test = scenario_name.split('_')
+if len(test) <> 1:
+    scenario_name = '%s %s' %(test[0], test[1])
+
+# Create report directory
+reportdir = getcwd()+sep+'report'+sep
+if access(reportdir,F_OK) == 0:
+    mkdir (reportdir)
+    
+# User defined inputs
+report_title = 'Tsunami impact modelling for %s' %scenario_name.title()
+
+# WA DLI data
+production_dirs = {#'20061101_053132_run': 'big event'} # parallel
+                    #'20061101_054432_run': 'big event'} # sequential
+                    '20061107_070805_run': 'Mw 9.0'}
+
+is_parallel = True
+if is_parallel == True:
+    nodes = 8
+
+max_maps = {'Mw 8-7': 'mw87_map',
+            'Mw 8-5': 'mw85_map'}
+
+gauge_map = 'cipma_gauges.jpg'
+gauge_filename = 'test.xya'
+# Create sections and graphs for each designated production directory
+latex_output = []
+report_name = 'latexoutput_cipma'
+
+if is_parallel == True:
+
+    for i in range(nodes):
+        print 'Sending node %d of %d' %(i,nodes)
+        swwfiles = {}
+        reportname = report_name + '_%s' %(i)
+        for label_id in production_dirs.keys():
+            file_loc = project.output_dir + label_id + sep
+            sww_extra = '_P%s_%s' %(i,nodes)
+            swwfile = file_loc + project.scenario_name + sww_extra + '.sww'
+            swwfiles[swwfile] = label_id
+
+            texname, elev_output = sww2timeseries(swwfiles,
+                                                  project.gauge_filename,
+                                                  production_dirs,
+                                                  report = True,
+                                                  reportname = reportname,
+                                                  plot_quantity = ['stage', 'speed'],
+                                                  surface = False,
+                                                  time_min = None,
+                                                  time_max = None,
+                                                  title_on = False,
+                                                  verbose = True)
+            
+            latex_output.append(texname)
+    
+else:
+    
+    for label_id in production_dirs.keys():
+
+        file_loc = project.output_dir + label_id + sep
+        swwfile = file_loc + project.scenario_name + '.sww'
+        swwfiles[swwfile] = label_id
+        
+    texname, elev_output = sww2timeseries(swwfiles,
+                                          project.gauge_filename,
+                                          production_dirs,
+                                          report = True,
+                                          reportname = report_name,
+                                          plot_quantity = ['stage', 'speed'],
+                                          surface = False,
+                                          time_min = None,
+                                          time_max = None,
+                                          title_on = False,
+                                          verbose = True)
+
+# Start report generation
+# Future: generate_report(reportdir, scenario, report_title, 
+# project.gauge_filename, max_maps, damage_maps, production_dirs, latex_output)
+report_name = reportdir + scenario + '_report_CIPMA.tex'
+fid = open(report_name, 'w')
+
+s = """
+% This is based on an automatically generated file (by make_report.py).
+%
+% Manual parts are:
+% * an abstract must be written in abstract.tex
+% * an introduction must be written in introduction.tex; a basic outline and
+%   some of the core inputs are already in place
+% * outline of the modelling methodology provided in modelling_methodology.tex
+% * the tsunami-genic event should be discussed in tsunami_scenario.tex
+% * an computational_setup.tex file needs to be written for the particular scenario
+% * the interpretation of the results needs to be written to interpretation.tex
+% * maximum inundation maps need to be included in HAT_map.tex and LAT_map.tex etc.
+% * damage modelling maps need to be included in HAT_damage and LAT_damage etc.
+% * a summary must be written into summary.tex
+% * metadata for the scenario data to be included in metadata.tex
+
+\documentclass{article}
+
+\usepackage{ae} % or {zefonts}
+\usepackage[T1]{fontenc}
+\usepackage[ansinew]{inputenc}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{graphicx}
+\usepackage{color}
+\usepackage[colorlinks]{hyperref}
+\usepackage{lscape} %landcape pages support
+\usepackage{setspace}
+\usepackage{rotating}
+\include{appendix}
+\setstretch{1.25}
+\\topmargin 0pt
+\oddsidemargin 0pt
+\evensidemargin 0pt
+\marginparwidth 0.5pt
+\\textwidth \paperwidth
+\\advance\\textwidth -2in
+
+"""
+fid.write(s)
+
+s = """
+\date{\\today}
+%\\author{Geoscience Australia}
+
+\\begin{document}
+\\title{
+\\begin{figure}[hbt]
+  \centerline{ \includegraphics[scale=0.4]{../report_figures/GAlogo.jpg}}
+\end{figure}
+"""
+fid.write(s)
+s = '%s} '%report_title
+fid.write(s)
+s = """
+  \maketitle
+
+    \section{Executive Summary}
+    \label{sec:execsum}
+  \input{execsum}
+
+  \\tableofcontents
+  
+   \section{Modelling methodology}
+    \label{sec:methodology}
+    \input{modelling_methodology}
+
+  \section{Data sources}
+    \label{sec:data}
+    \input{data}
+    
+   \section{Inundation model}
+    \label{sec:anuga}
+    \input{anuga}
+    \input{computational_setup}
+        
+  \section{Inundation modelling results}
+     \label{sec:results}
+         
+"""
+fid.write(s)
+
+# Generate latex output for location points
+s = '\\begin{table} \\begin{center} \n'
+fid.write(s)
+s = '\caption{Defined point locations for %s study area.}' %scenario_name
+fid.write(s)
+s = """
+\label{table:locations}
+\\begin{tabular}{|l|l|l|l|}\hline
+\\bf{Point Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation}\\\\ \hline
+"""
+fid.write(s)
+
+gauges, locations, elevation = get_gauges_from_file(project.gauge_filename)
+
+for name, gauges, elev in zip(locations, gauges, elevation):
+    east = gauges[0]
+    north = gauges[1]
+    s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name.replace('_',' '), east, north, elev)
+    fid.write(s)
+
+s = '\\end{tabular} \n  \end{center} \n \end{table} \n \n'
+fid.write(s)
+
+#s = '\\begin{figure}[hbt] \n \centerline{ \includegraphics[width=\paperwidth]{../report_figures/%s}}' %gauge_map
+#fid.write(s)
+
+#s  = """
+#\caption{Point locations used for Dampier study.}  
+#\label{fig:points}
+#\end{figure}
+#"""
+#fid.write(s)
+    
+#s = '\input{interpretation} \n'
+#fid.write(s)
+
+# Assign titles to each production section 
+# Must specify one name per section
+#for i, name in enumerate(production_dirs.keys()):
+#
+#    s = '\subsection{%s} \n \n' %production_dirs[name]      
+#    fid.write(s)
+
+    #s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]]
+    #fid.write(s)
+
+# Closing
+
+
+s = """
+
+     \section{Summary}
+     \label{sec:summary}
+     \input{summary}
+
+     %\section{Acknowledgements}
+     %\input{acknowledgements}
+     
+    \input{references}
+
+    \\appendix
+    
+   \section{Metadata}
+     \label{sec:metadata}
+     \input{metadata}
+
+\clearpage
+
+   \section{Time series}
+     \label{sec:timeseries}
+"""
+fid.write(s)
+
+for i in range(len(latex_output)):
+    s = '\input{%s} \n \clearpage \n \n' %latex_output[i]   
+    fid.write(s)
+
+s="""
+\end{document}
+"""
+fid.write(s)
Index: /anuga_work/production/hobart_2006/export_results.py
===================================================================
--- /anuga_work/production/hobart_2006/export_results.py	(revision 3943)
+++ /anuga_work/production/hobart_2006/export_results.py	(revision 3944)
@@ -49,8 +49,21 @@
 ##            format = 'asc')
 
-# for bruny
+### for bruny
+##sww2dem(name, basename_out = outname,
+##            quantity = quantityname,
+##            cellsize = 25,      # would prefer this at 25
+##            # define region for viz purposes
+##            easting_min = project.eastingmin25_2,
+##            easting_max = project.eastingmax25_2,
+##            northing_min = project.northingmin25_2,
+##            northing_max = project.northingmax25_2,        
+##            reduction = max, #this is because we want max quantityname
+##            verbose = True,
+##            format = 'asc')
+
+# for fixed timestep
 sww2dem(name, basename_out = outname,
             quantity = quantityname,
-            cellsize = 25,      # would prefer this at 25
+            cellsize = 10,      # would prefer this at 25
             # define region for viz purposes
             easting_min = project.eastingmin25_2,
@@ -58,5 +71,6 @@
             northing_min = project.northingmin25_2,
             northing_max = project.northingmax25_2,        
-            reduction = max, #this is because we want max quantityname
+            #reduction = max, #this is because we want max quantityname
             verbose = True,
             format = 'asc')
+
Index: /anuga_work/production/hobart_2006/make_report.py
===================================================================
--- /anuga_work/production/hobart_2006/make_report.py	(revision 3943)
+++ /anuga_work/production/hobart_2006/make_report.py	(revision 3944)
@@ -99,5 +99,5 @@
                                       #reportname = 'latexoutput',
                                       plot_quantity = ['stage', 'speed'],
-                                      surface = False,
+                                      surface = True,
                                       time_min = None,
                                       time_max = None,
Index: /anuga_work/production/hobart_2006/report/hobart_2006_report_MRT.tex
===================================================================
--- /anuga_work/production/hobart_2006/report/hobart_2006_report_MRT.tex	(revision 3943)
+++ /anuga_work/production/hobart_2006/report/hobart_2006_report_MRT.tex	(revision 3944)
@@ -172,5 +172,5 @@
      \input{metadata}
 
-\pagebreak
+\clearpage
 
    \section{Time series}
