Index: /DVD_images/extra_files/BatemansBay/auxiliary_scripts.html
===================================================================
--- /DVD_images/extra_files/BatemansBay/auxiliary_scripts.html	(revision 7205)
+++ /DVD_images/extra_files/BatemansBay/auxiliary_scripts.html	(revision 7206)
@@ -57,5 +57,5 @@
          <p>
          Note that if you specify a particular timestep here you may not need to include all SWW files in the 
-         <b>time_dirs</b> list above.  For example, iy you wanted data from timestep 0 only then you would need
+         <b>time_dirs</b> list above.  For example, if you wanted data from timestep 0 only then you would need
          to include only the first SWW file in the list.
 
Index: /DVD_images/extra_files/BatemansBay/index.html
===================================================================
--- /DVD_images/extra_files/BatemansBay/index.html	(revision 7205)
+++ /DVD_images/extra_files/BatemansBay/index.html	(revision 7206)
@@ -74,5 +74,5 @@
   <a name="simulating"<h3><b>How to run a simulation</b></h3></a>
 
-  This is how a user should run a model from the 'Tsunami Inundation Models' DVDs.
+  This is how a user should run the model on this DVD.
   We assume that you are using Windows and will give examples for that operating system.
   The translation to Linux is left as an exercise for the student!
@@ -144,5 +144,5 @@
   files, which you should find somewhere under <b>C:\ANUGA\data</b>. Just keep
   drilling down from that point until you find a directory called <b>outputs</b>.
-  The latest directory in outputs should contain a file called screen_error.txt
+  The latest directory in <b>outputs</b> should contain a file called <font color="red">screen_error.txt</font>
   with an explanation of the error at the end. 
   <p>
Index: /DVD_images/extra_files/GoldCoast/auxiliary_scripts.html
===================================================================
--- /DVD_images/extra_files/GoldCoast/auxiliary_scripts.html	(revision 7205)
+++ /DVD_images/extra_files/GoldCoast/auxiliary_scripts.html	(revision 7206)
@@ -57,5 +57,5 @@
          <p>
          Note that if you specify a particular timestep here you may not need to include all SWW files in the 
-         <b>time_dirs</b> list above.  For example, iy you wanted data from timestep 0 only then you would need
+         <b>time_dirs</b> list above.  For example, if you wanted data from timestep 0 only then you would need
          to include only the first SWW file in the list.
 
Index: /DVD_images/extra_files/GoldCoast/index.html
===================================================================
--- /DVD_images/extra_files/GoldCoast/index.html	(revision 7205)
+++ /DVD_images/extra_files/GoldCoast/index.html	(revision 7206)
@@ -74,7 +74,5 @@
   <a name="simulating"<h3><b>How to run a simulation</b></h3></a>
 
-  <a name="userslist"<h3><b>How to join the ANUGA user's mailing list</b></h3></a>
-
-  This is how a user should run a model from the 'Tsunami Inundation Models' DVDs.
+  This is how a user should run the model on this DVD.
   We assume that you are using Windows and will give examples for that operating system.
   The translation to Linux is left as an exercise for the student!
@@ -146,5 +144,5 @@
   files, which you should find somewhere under <b>C:\ANUGA\data</b>. Just keep
   drilling down from that point until you find a directory called <b>outputs</b>.
-  The latest directory in outputs should contain a file called screen_error.txt
+  The latest directory in <b>outputs</b> should contain a file called <font color="red">screen_error.txt</font>
   with an explanation of the error at the end. 
   <p>
@@ -165,4 +163,6 @@
   The ANUGA <a href="documents/anuga_user_manual.pdf">User Manual</a> describes
   how to use the ANUGA system in general and provides some examples of its use.
+
+  <a name="userslist"<h3><b>How to join the ANUGA user's mailing list</b></h3></a>
 
   One of the quickest ways to get your ANUGA questions answered is by asking them on the <b>ANUGA-user</b> mailing list.
Index: /DVD_images/extra_files/Gosford/auxiliary_scripts.html
===================================================================
--- /DVD_images/extra_files/Gosford/auxiliary_scripts.html	(revision 7205)
+++ /DVD_images/extra_files/Gosford/auxiliary_scripts.html	(revision 7206)
@@ -57,5 +57,5 @@
          <p>
          Note that if you specify a particular timestep here you may not need to include all SWW files in the 
-         <b>time_dirs</b> list above.  For example, iy you wanted data from timestep 0 only then you would need
+         <b>time_dirs</b> list above.  For example, if you wanted data from timestep 0 only then you would need
          to include only the first SWW file in the list.
 
Index: /DVD_images/extra_files/Gosford/index.html
===================================================================
--- /DVD_images/extra_files/Gosford/index.html	(revision 7205)
+++ /DVD_images/extra_files/Gosford/index.html	(revision 7206)
@@ -74,5 +74,5 @@
   <a name="simulating"<h3><b>How to run a simulation</b></h3></a>
 
-  This is how a user should run a model from the 'Tsunami Inundation Models' DVDs.
+  This is how a user should run the model on this DVD.
   We assume that you are using Windows and will give examples for that operating system.
   The translation to Linux is left as an exercise for the student!
@@ -144,5 +144,5 @@
   files, which you should find somewhere under <b>C:\ANUGA\data</b>. Just keep
   drilling down from that point until you find a directory called <b>outputs</b>.
-  The latest directory in outputs should contain a file called screen_error.txt
+  The latest directory in <b>outputs</b> should contain a file called <font color="red">screen_error.txt</font>
   with an explanation of the error at the end. 
   <p>
Index: /DVD_images/extra_files/Hobart/auxiliary_scripts.html
===================================================================
--- /DVD_images/extra_files/Hobart/auxiliary_scripts.html	(revision 7205)
+++ /DVD_images/extra_files/Hobart/auxiliary_scripts.html	(revision 7206)
@@ -57,5 +57,5 @@
          <p>
          Note that if you specify a particular timestep here you may not need to include all SWW files in the 
-         <b>time_dirs</b> list above.  For example, iy you wanted data from timestep 0 only then you would need
+         <b>time_dirs</b> list above.  For example, if you wanted data from timestep 0 only then you would need
          to include only the first SWW file in the list.
 
Index: /DVD_images/extra_files/Hobart/index.html
===================================================================
--- /DVD_images/extra_files/Hobart/index.html	(revision 7205)
+++ /DVD_images/extra_files/Hobart/index.html	(revision 7206)
@@ -74,5 +74,5 @@
   <a name="simulating"<h3><b>How to run a simulation</b></h3></a>
 
-  This is how a user should run a model from the 'Tsunami Inundation Models' DVDs.
+  This is how a user should run the model on this DVD.
   We assume that you are using Windows and will give examples for that operating system.
   The translation to Linux is left as an exercise for the student!
@@ -144,5 +144,5 @@
   files, which you should find somewhere under <b>C:\ANUGA\data</b>. Just keep
   drilling down from that point until you find a directory called <b>outputs</b>.
-  The latest directory in outputs should contain a file called screen_error.txt
+  The latest directory in <b>outputs</b> should contain a file called <font color="red">screen_error.txt</font>
   with an explanation of the error at the end. 
   <p>
Index: /DVD_images/extra_files/Hobart/project/project.py
===================================================================
--- /DVD_images/extra_files/Hobart/project/project.py	(revision 7206)
+++ /DVD_images/extra_files/Hobart/project/project.py	(revision 7206)
@@ -0,0 +1,303 @@
+"""
+This file contains all your file and directory definitions 
+for elevation, meshes and outputs.
+"""
+
+import os
+from anuga.utilities.system_tools import get_user_name, get_host_name
+from time import localtime, strftime, gmtime
+from os.path import join, exists
+
+#-------------------------------------------------------------------------------
+# Fitting Scenario
+#-------------------------------------------------------------------------------
+
+extent = None #'small' #None #'sw' # 'aos1' ##'aos1'
+extent_maxarea = 30000
+
+#-------------------------------------------------------------------------------
+# Directory setup
+#-------------------------------------------------------------------------------
+
+# this section needs to be updated to reflect the modelled community.
+# Note, the user needs to set up the directory system accordingly
+state = 'tasmania'
+scenario_name = 'hobart'
+scenario_folder = 'hobart_tsunami_scenario_2009'
+
+#-------------------------------------------------------------------------------
+# Initial Conditions
+#-------------------------------------------------------------------------------
+
+# Model specific parameters.
+# One or all can be changed each time the run_model script is executed
+tide = 0.8                # difference between MSL and HAT in metres
+zone = 55               # specify UTM zone of model
+event_number = 58292    # 58280, 64477 the event number or the mux file name
+alpha = 0.1             # smoothing parameter for mesh
+friction=0.01           # manning's friction coefficient
+starttime=0             # start time for simulation
+finaltime=65000         # final time for simulation
+
+setup = 'final'         # This can be one of three values
+                        #    trial - coarsest mesh, fast
+                        #    basic - coarse mesh
+                        #    final - fine mesh, slowest
+
+#-------------------------------------------------------------------------------
+# Output filename
+#
+# Your output filename should be unique between different runs on different data.
+# The list of items below will be used to create a file in your output directory.
+# Your user name and time+date will be automatically added.  For example,
+#     [setup, tide, event_number]
+# will result in a filename like
+#     20090212_091046_run_final_0_27283_rwilson
+#-------------------------------------------------------------------------------
+
+output_comment = [setup, tide, event_number, extent]
+
+#-------------------------------------------------------------------------------
+# Input Data
+#-------------------------------------------------------------------------------
+
+# ELEVATION DATA
+# Used in build_elevation.py
+if extent == None:
+    ascii_grid_filenames = ['topo_grid_notsw', 'fitting_problem_sw_elevation']
+    point_filenames = []
+elif extent == 'sw':
+    # Format for ascii grids, as produced in ArcGIS + a projection file
+    ascii_grid_filenames = ['hob3_pro_extract', 'grid_250m_project', 'ldr_bbay',
+                            'ldr_bellerive', 'ldr_brunyislandneck',
+                            'ldr_calvertsbeach', 'ldr_carltonbeach',
+                            'ldr_connelly', 'ldr_cremorne', 'ldr_dodge1',
+                            'ldr_dodge2', 'ldr_kingston', 'ldr_lauderdale',
+                            'ldr_linersfarne', 'ldr_oppossumbay', 'ldr_primrose',
+                            'ldr_rosny', 'ldr_sandybay', 'ldr_selfspoint',
+                            'ldr_sevenmile', 'ldr_southarm1', 'ldr_southarm2',
+                            'ldr_sullivanscove', 'ldr_tranmere', 'tasdem_mask']
+
+    # Format for point is x,y,elevation (with header)
+    point_filenames = ['Topo_1.txt','Topo_2.txt','Topo_3.txt',
+                       'tasmania_data.txt',    # The data from Tasmania
+                       'hydro_data.txt']       # Data from Hydro
+
+### Add csv header list to all files in point_filenames
+##headerlist = ['x', 'y', 'elevation'] 
+##for f in point_filenames:
+##    add_csv_header(join(topographies_folder, f), headerlist)
+
+# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
+# Used in build_elevation.py
+# Format for points easting,northing (no header)
+bounding_polygon_filename = 'bounding_polygon.csv'
+bounding_polygon_maxarea = 1000000
+
+# INTERIOR REGIONS -  for designing the mesh
+# Used in run_model.py
+# Format for points easting,northing (no header)                    
+if extent == 'sw':
+    interior_regions_data = [['aos1.csv', 1500],
+                             ['aos2.csv', 1500]]
+    PriorityArea_filename = 'PriorityAreas.csv'
+elif extent == 'aos1':
+    interior_regions_data = []
+    PriorityArea_filename = 'PriorityAreas_aos1.csv'
+elif extent == 'aos2':
+    interior_regions_data = []
+    PriorityArea_filename = 'PriorityAreas_aos2.csv'
+elif extent == 'small':
+    interior_regions_data = [['aoi_bruny.csv', 500],
+                             ['aoi_S_arms.csv', 500],
+                             ['aos1_small.csv', 1500],
+                             ['aos2.csv', 1500],
+                             ['sw.csv', 30000]]
+    PriorityArea_filename = None
+elif extent == None:
+    interior_regions_data = [['aos1.csv', 1500],
+                             ['aos2.csv', 1500],
+                             ['sw.csv', 30000]]
+    PriorityArea_filename = 'PriorityAreas.csv'
+    
+# LAND - used to set the initial stage/water to be offcoast only
+# Used in run_model.py.  Format for points easting,northing (no header)
+land_initial_conditions_filename = 'initial_conditions.txt'
+
+# GAUGES - for creating timeseries at a specific point
+# Used in get_timeseries.py.  
+# Format easting,northing,name,elevation (with header)
+gauges_filename = 'time_of_arrival_hobart.csv' #'TideGaugesPoints.csv' #'tsunamipointsMGA.csv'
+
+# BUILDINGS EXPOSURE - for identifying inundated houses
+# Used in run_building_inundation.py
+# Format latitude,longitude etc (geographic)
+building_exposure_filename = 'busselton_res_clip.csv' # from NEXIS
+
+# AREA OF IMAGES - Extent of each image to find out highest runup
+# Header - easting,northing,id,value
+# Used in get_runup.py
+images_filename = 'images.csv'
+
+# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
+# NOTE: when files are put together the points must be in sequence
+# For ease go clockwise!
+# Check the run_model.py for boundary_tags
+
+# Thinned ordering file from Hazard Map (geographic)
+# Format is index,latitude,longitude (with header)
+urs_order_filename = 'urs_order.csv'
+
+# Landward bounding points
+# Format easting,northing (no header)
+landward_boundary_filename = 'landward_boundary.csv'
+
+# MUX input filename.
+# If a meta-file from EventSelection is used, set 'multi-mux' to True.
+# If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
+##mux_input_filename = event_number # to be found in event_folder
+                                    # (ie boundaries/event_number/)
+##multi_mux = False
+mux_input_filename = 'event.list'
+multi_mux = True
+
+#-------------------------------------------------------------------------------
+# Clipping regions for export to asc and regions for clipping data
+# Final inundation maps should only be created in regions of the finest mesh
+#-------------------------------------------------------------------------------
+
+# ASCII export grid for Bruny
+xminBruny = 523900
+xmaxBruny = 533200
+yminBruny = 5204300
+ymaxBruny = 5213100
+
+# ASCII export grid for South Arms
+xminSArms = 532497
+xmaxSArms = 534326
+yminSArms = 5237028
+ymaxSArms = 5238465
+
+# ASCII export grid for Hobart Large
+xminHobart = 520000
+xmaxHobart = 545000
+yminHobart = 5230000
+ymaxHobart = 5260000
+
+# ASCII export grid for North West Communities
+xminNW = 548000
+xmaxNW = 561000
+yminNW = 5250000
+ymaxNW = 5258000
+
+# ASCII export grid for South Communities
+xminSouth = 523000
+xmaxSouth = 533300
+yminSouth = 5197000
+ymaxSouth = 5214000
+
+
+################################################################################
+################################################################################
+####         NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT.          ####
+################################################################################
+################################################################################
+
+# Get system user and host names.
+# These values can be used to distinguish between two similar runs by two
+# different users or runs by the same user on two different machines.
+user = get_user_name()
+host = get_host_name()
+
+# Environment variable names.
+# The inundation directory, not the data directory.
+ENV_INUNDATIONHOME = 'ANUGADATA'
+
+#-------------------------------------------------------------------------------
+# Output Elevation Data
+#-------------------------------------------------------------------------------
+
+# Output filename for elevation
+# this is a combination of all the data generated in build_elevation.py
+combined_elevation_basename = scenario_name + '_combined_elevation'
+
+#-------------------------------------------------------------------------------
+# Directory Structure
+#-------------------------------------------------------------------------------
+
+# determines time for setting up output directories
+time = strftime('%Y%m%d_%H%M%S', localtime()) 
+gtime = strftime('%Y%m%d_%H%M%S', gmtime()) 
+build_time = time + '_build'
+run_time = time + '_run_'
+
+# create paths generated from environment variables.
+home = join(os.getenv(ENV_INUNDATIONHOME), 'data') # Absolute path for data folder
+    
+# check various directories/files that must exist
+anuga_folder = join(home, state, scenario_folder, 'anuga')
+topographies_folder = join(anuga_folder, 'topographies')
+polygons_folder = join(anuga_folder, 'polygons')
+boundaries_folder = join(anuga_folder, 'boundaries')
+output_folder = join(anuga_folder, 'outputs')
+gauges_folder = join(anuga_folder, 'gauges')
+event_folder = join(boundaries_folder, str(event_number))
+
+#-------------------------------------------------------------------------------
+# Location of input and output data
+#-------------------------------------------------------------------------------
+
+# Convert the user output_comment to a string for run_model.py
+output_comment = ('_'.join([str(x) for x in output_comment if x != user])
+                  + '_' + user)
+
+# The absolute pathname of the all elevation, generated in build_elevation.py
+combined_elevation = join(topographies_folder, combined_elevation_basename)
+
+# The pathname for the urs order points, used within build_urs_boundary.py
+if urs_order_filename:
+    urs_order = join(boundaries_folder, urs_order_filename)
+
+# The absolute pathname for the landward points of the bounding polygon,
+# Used within run_model.py)
+if landward_boundary_filename:
+    landward_boundary = join(boundaries_folder, landward_boundary_filename)
+
+# The absolute pathname for the .sts file, generated in build_boundary.py
+event_sts = join(event_folder, scenario_name)
+
+# The absolute pathname for the output folder names
+# Used for build_elevation.py
+output_build = join(output_folder, build_time) + '_' + str(user) 
+# Used for run_model.py
+output_run = join(output_folder, run_time) + output_comment 
+# Used by post processing
+output_run_time = join(output_run, scenario_name) 
+
+# The absolute pathname of the mesh, generated in run_model.py
+meshes = join(output_run, scenario_name) + '.msh'
+
+# The absolute pathname for the gauges file
+# Used for get_timeseries.py
+if gauges_filename:
+    gauges = join(gauges_folder, gauges_filename)       
+
+# The absolute pathname for the building file
+# Used for run_building_inundation.py
+if building_exposure_filename:
+    building_exposure = join(gauges_folder, building_exposure_filename)
+
+# The absolute pathname for the image file
+# Used for get_runup.py
+if images_filename:
+    images = join(polygons_folder, images_filename)
+
+
+# full path to where MUX files (or meta-files) live
+mux_input = join(event_folder, mux_input_filename)
+
+#Multiple polygons in one CSV file to make internal polygons
+if not PriorityArea_filename == None:
+    PriorityAreas = join(polygons_folder, PriorityArea_filename)
+
+
Index: /DVD_images/extra_files/Hobart/project/run_model.py
===================================================================
--- /DVD_images/extra_files/Hobart/project/run_model.py	(revision 7206)
+++ /DVD_images/extra_files/Hobart/project/run_model.py	(revision 7206)
@@ -0,0 +1,162 @@
+"""Run a tsunami inundation scenario for Busselton, WA, Australia.
+
+The scenario is defined by a triangular mesh created from project.polygon, the
+elevation data is compiled into a pts file through build_elevation.py and a
+simulated tsunami is generated through an sts file from build_boundary.py.
+
+Input: sts file (build_boundary.py for respective event)
+       pts file (build_elevation.py)
+       information from project file
+Outputs: sww file stored in project.output_run_time_dir 
+The export_results_all.py and get_timeseries.py is reliant
+on the outputs of this script
+
+Ole Nielsen and Duncan Gray, GA - 2005, Jane Sexton, Nick Bartzis, GA - 2006
+Ole Nielsen, Jane Sexton and Kristy Van Putten - 2008
+"""
+
+#------------------------------------------------------------------------------
+# Import necessary modules
+#------------------------------------------------------------------------------
+
+# Standard modules
+import os
+import os.path
+import time
+from time import localtime, strftime, gmtime
+
+# Related major packages
+from Scientific.IO.NetCDF import NetCDFFile
+import Numeric as num
+
+from anuga.interface import create_domain_from_regions
+from anuga.interface import Transmissive_stage_zero_momentum_boundary
+from anuga.interface import Dirichlet_boundary
+from anuga.interface import Reflective_boundary
+from anuga.interface import Field_boundary
+from anuga.interface import create_sts_boundary
+from anuga.interface import csv2building_polygons
+from file_length import file_length
+
+from anuga.shallow_water.data_manager import start_screen_catcher
+from anuga.shallow_water.data_manager import copy_code_files
+from anuga.shallow_water.data_manager import urs2sts
+from anuga.utilities.polygon import read_polygon, Polygon_function
+
+# Application specific imports
+from setup_model import project
+import build_urs_boundary as bub
+
+#-------------------------------------------------------------------------------
+# Copy scripts to time stamped output directory and capture screen
+# output to file. Copy script must be before screen_catcher
+#-------------------------------------------------------------------------------
+
+copy_code_files(project.output_run, __file__, 
+                os.path.join(os.path.dirname(project.__file__),
+                             project.__name__+'.py'))
+start_screen_catcher(project.output_run, 0, 1)
+
+#-------------------------------------------------------------------------------
+# Create the computational domain 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 computational domain'
+
+# Create the STS file
+if not os.path.exists(project.event_sts + '.sts'):
+    bub.build_urs_boundary(project.mux_input_filename, project.event_sts)
+
+# Read in boundary from ordered sts file
+event_sts = create_sts_boundary(project.event_sts)
+
+# Reading the landward defined points, this incorporates the original clipping
+# polygon minus the 100m contour
+landward_boundary = read_polygon(project.landward_boundary)
+
+# Combine sts polyline with landward points
+bounding_polygon_sts = event_sts + landward_boundary
+
+# Number of boundary segments
+num_ocean_segments = len(event_sts) - 1
+# Number of landward_boundary points
+num_land_points = file_length(project.landward_boundary)
+
+# Boundary tags refer to project.landward_boundary
+# 4 points equals 5 segments start at N
+boundary_tags={'back': range(num_ocean_segments+1,
+                             num_ocean_segments+num_land_points),
+               'side': [num_ocean_segments,
+                        num_ocean_segments+num_land_points],
+               'ocean': range(num_ocean_segments)}
+
+# Build mesh and domain
+domain = create_domain_from_regions(bounding_polygon_sts,
+                                    boundary_tags=boundary_tags,
+                                    maximum_triangle_area=project.bounding_maxarea,
+                                    interior_regions=project.interior_regions,
+                                    mesh_filename=project.meshes,
+                                    use_cache=True,
+                                    verbose=True)
+print domain.statistics()
+
+domain.set_name(project.scenario_name)
+domain.set_datadir(project.output_run) 
+domain.set_minimum_storable_height(0.01)    # Don't store depth less than 1cm
+
+#-------------------------------------------------------------------------------
+# Setup initial conditions
+#-------------------------------------------------------------------------------
+
+print 'Setup initial conditions'
+
+# Set the initial stage in the offcoast region only
+if project.land_initial_conditions:
+    IC = Polygon_function(project.land_initial_conditions,
+                          default=project.tide,
+                          geo_reference=domain.geo_reference)
+else:
+    IC = 0
+domain.set_quantity('stage', IC, use_cache=True, verbose=True)
+domain.set_quantity('friction', project.friction) 
+domain.set_quantity('elevation', 
+                    filename=project.combined_elevation+'.pts',
+                    use_cache=True,
+                    verbose=True,
+                    alpha=project.alpha)
+
+#-------------------------------------------------------------------------------
+# Setup boundary conditions 
+#-------------------------------------------------------------------------------
+
+print 'Set boundary - available tags:', domain.get_boundary_tags()
+
+Br = Reflective_boundary(domain)
+Bt = Transmissive_stage_zero_momentum_boundary(domain)
+Bd = Dirichlet_boundary([project.tide, 0, 0])
+Bf = Field_boundary(project.event_sts+'.sts',
+                    domain, mean_stage=project.tide,
+                    time_thinning=1,
+                    default_boundary=Bd,
+                    boundary_polygon=bounding_polygon_sts,                    
+                    use_cache=True,
+                    verbose=True)
+
+domain.set_boundary({'back': Br,
+                     'side': Bt,
+                     'ocean': Bf}) 
+
+#-------------------------------------------------------------------------------
+# Evolve system through time
+#-------------------------------------------------------------------------------
+
+t0 = time.time()
+for t in domain.evolve(yieldstep=project.yieldstep, 
+                       finaltime=project.finaltime,
+                       skip_initial_step=False): 
+    print domain.timestepping_statistics()
+    print domain.boundary_statistics(tags='ocean')
+
+print 'Simulation took %.2f seconds' % (time.time()-t0)
Index: /DVD_images/extra_files/Hobart/project/setup_model.py
===================================================================
--- /DVD_images/extra_files/Hobart/project/setup_model.py	(revision 7206)
+++ /DVD_images/extra_files/Hobart/project/setup_model.py	(revision 7206)
@@ -0,0 +1,186 @@
+"""
+Module to import the project.py 'configuration' file and perform
+sanity checks plus a quick check on mesh generation.
+
+Also callable as a stand-alone program, mainly to view the results
+of the mesh generation.
+"""
+
+import os
+
+from os.path import join, exists
+from anuga.utilities.polygon import read_polygon, number_mesh_triangles
+from anuga.shallow_water.data_manager import csv2polygons
+import project
+
+
+#-------------------------------------------------------------------------------
+# Sanity checks - check that required files/directories, etc, exist.
+#-------------------------------------------------------------------------------
+
+# flag - we check many things and then don't proceed if anything wrong
+sanity_error = False               # checked at bottom of this file
+
+# Test that environment variables are defined.
+if os.getenv(project.ENV_INUNDATIONHOME) is None:
+    print "Environment variable '%s' is not set" % project.ENV_INUNDATIONHOME
+    sanity_error = True
+
+#-------------------------------------------------------------------------------
+# Check filename strings that MUST be set
+#-------------------------------------------------------------------------------
+
+if not project.urs_order_filename:
+    print ("Sorry, thinned ordering file parameter 'urs_order_filename' "
+           "isn't set")
+    sanity_error = True
+
+if not project.landward_boundary_filename:
+    print ("Sorry, landward bounding points parameter "
+           "'landward_boundary_filename' isn't set")
+    sanity_error = True
+
+#-------------------------------------------------------------------------------
+# Directory Structure
+#-------------------------------------------------------------------------------
+
+# check folders generated from environment variables.
+if not exists(project.home):
+    print "Sorry, data directory '%s' doesn't exist" % project.home
+    sanity_error = True
+    
+if not exists(project.anuga_folder):
+    print "Sorry, ANUGA directory '%s' doesn't exist" % project.anuga_folder
+    sanity_error = True
+
+if not exists(project.topographies_folder):
+    print ("Sorry, topo directory '%s' doesn't exist"
+           % project.topographies_folder)
+    sanity_error = True
+
+if not exists(project.polygons_folder):
+    print ("Sorry, polygon directory '%s' doesn't exist"
+           % project.polygons_folder)
+    sanity_error = True
+
+if not exists(project.boundaries_folder):
+    print ("Sorry, boundaries directory '%s' doesn't exist"
+           % project.boundaries_folder)
+    sanity_error = True
+
+if not exists(project.output_folder):
+    print "Sorry, outputs directory '%s' doesn't exist" % project.output_folder
+    sanity_error = True
+
+if not exists(project.gauges_folder):
+    print "Sorry, gauges directory '%s' doesn't exist" % project.gauges_folder
+    sanity_error = True
+
+# if multi_mux is True, check if multi-mux file exists
+if project.multi_mux:
+    if not exists(project.mux_input):
+        print ("Sorry, MUX input file '%s' doesn't exist"
+               % project.mux_input)
+        sanity_error = True
+
+#-----
+# If this directory don't exist, EventSelection hasn't been run.
+#-----
+
+if not exists(project.event_folder):
+    print ("Sorry, you must generate event %s with EventSelection."
+           % project.event_number)
+    sanity_error = True
+
+#-------------------------------------------------------------------------------
+# Determine type of run
+#-------------------------------------------------------------------------------
+
+if project.setup == 'trial':
+    print 'trial'
+    project.scale_factor = 100
+    project.time_thinning = 96
+    project.yieldstep = 240
+elif project.setup == 'basic': 
+    print 'basic'
+    project.scale_factor = 4
+    project.time_thinning = 12
+    project.yieldstep = 120
+elif project.setup == 'final': 
+    print 'final'
+    project.scale_factor = 1
+    project.time_thinning = 4
+    project.yieldstep = 60
+else:
+    print ("Sorry, you must set the 'setup' variable to one of:"
+           '   trial - coarsest mesh, fast\n'
+           '   basic - coarse mesh\n'
+           '   final - fine mesh, slowest\n'
+           '\n'
+           "'setup' was set to '%s'" % project.setup)
+    sanity_error = True
+
+#-------------------------------------------------------------------------------
+# Check for errors detected above.
+#-------------------------------------------------------------------------------
+
+if sanity_error:
+    msg = 'You must fix the above errors before continuing.'
+    raise Exception, msg
+
+#-------------------------------------------------------------------------------
+# Reading polygons and creating interior regions
+#-------------------------------------------------------------------------------
+
+# Create list of land polygons with initial conditions
+project.land_initial_conditions = []
+# if it's a list, then it's a list of land condition filenames
+# else it's a string - a single file, multiple land conditions
+if isinstance(project.land_initial_conditions_filename, list):
+    for filename, MSL in project.land_initial_conditions_filename:
+        polygon = read_polygon(join(project.polygons_folder, filename))
+        project.land_initial_conditions.append([polygon, MSL])
+elif isinstance(project.land_initial_conditions_filename, basestring):
+    polygons, MSL = csv2polygons(join(project.polygons_folder,
+                                      project.land_initial_conditions_filename))
+    for i, key in enumerate(polygons):
+        if i%100==0: print i
+        poly = polygons[key]
+        land = float(MSL[key])
+        project.land_initial_conditions.append([poly, land])
+else:
+    msg = ('project.land_initial_conditions_filename must be a list or '
+           'string, got %s'
+           % type(project.land_initial_conditions_filename))
+    raise Exception, msg
+# Create list of interior polygons with scaling factor
+project.interior_regions = []
+
+if project.PriorityArea_filename is not None:
+    polygons, maxareas = csv2polygons(project.PriorityAreas)
+    print 'Creating %d internal polygons' % len(polygons)
+    #def create_polygon_function(polygons, geo_reference=None):
+    project.interior_regions = []
+    for i, key in enumerate(polygons):
+        if i%100==0: print i
+        poly = polygons[key]
+        maxarea = float(maxareas[key])
+        project.interior_regions.append([poly,
+                                         maxarea*project.scale_factor])
+
+for filename, maxarea in project.interior_regions_data:
+    polygon = read_polygon(join(project.polygons_folder, filename))
+    project.interior_regions.append([polygon,
+                                     maxarea*project.scale_factor])
+
+# Initial bounding polygon for data clipping 
+project.bounding_polygon = read_polygon(join(project.polygons_folder,
+                                             project.bounding_polygon_filename))
+project.bounding_maxarea = project.bounding_polygon_maxarea*project.scale_factor
+
+# Estimate the number of triangles                     
+trigs_min = number_mesh_triangles(project.interior_regions,
+                                  project.bounding_polygon,
+                                  project.bounding_maxarea)
+
+print 'min estimated number of triangles', trigs_min
Index: /DVD_images/how_to_burn_dvd.txt
===================================================================
--- /DVD_images/how_to_burn_dvd.txt	(revision 7206)
+++ /DVD_images/how_to_burn_dvd.txt	(revision 7206)
@@ -0,0 +1,10 @@
+To burn a DVD of a jurisdiction:
+
+. Ensure the staging directory is clean and up-to-date
+. mkisofs -allow-lowercase -iso-level 3 -joliet-long -allow-leading-dots -volid <name> -quiet -D -o <name>.iso <name>
+. insert blank DVD (CD is enough for GoldCoast)
+. cdrecord <name>.iso
+
+The '-volid <name>' option puts a name on the DVD/CD that is displayed by the filesystem when the disk is mounted.
+
+The '-D' option allows 'deep' directories, the standard 6 isn't enough.
