Index: /anuga_validation/Hinwood_2008/calc_rmsd.py
===================================================================
--- /anuga_validation/Hinwood_2008/calc_rmsd.py	(revision 5694)
+++ /anuga_validation/Hinwood_2008/calc_rmsd.py	(revision 5695)
@@ -1,5 +1,7 @@
 """
-
-All err results are going into the same dir, and it can't really be changed.
+Functions used to calculate the root mean square deviation.
+
+Duncan Gray, GA - 2007 
+
 """
 
@@ -13,13 +15,24 @@
 from csv import writer
 from time import localtime, strftime
+from os.path import join
 
 # Related major packages
 from Numeric import zeros, Float, where, greater, less, compress, sqrt, sum
-
 from anuga.shallow_water.data_manager import csv2dict
 from anuga.utilities.numerical_tools import ensure_numeric, err, norm
 from anuga.utilities.interp import interp
 
+# Scenario specific imports
+import project
+
 def get_max_min_condition_array(min, max, vector):
+    """
+    Given a vector of values, and minimum and maximum values, return a
+    vector of 0/1's that can be used to cut arrays so only the times
+    in the min max range are used.
+    
+    precondition: The vector values are ascending.
+    
+    """
     
     SMALL_MIN = -1e10  # Not that small, but small enough
@@ -48,7 +61,9 @@
         id = run_data['scenario_id']
         outputdir_name = id + outputdir_tag
-        file_sim = outputdir_name + '_' +  quantity + ".csv"
+        file_sim = join(project.output_dir,outputdir_name + '_' +  \
+                        quantity + ".csv")
         file_exp = id + '_exp_' + quantity + '.csv'
-        file_err = outputdir_name + "_" + quantity + "_err.csv"
+        file_err = join(project.output_dir,outputdir_name + "_" + \
+                        quantity + "_err.csv")
         
 
@@ -60,5 +75,4 @@
         time_sim = ensure_numeric(time_sim)
         time_exp = ensure_numeric(time_exp)
-        
         condition = get_max_min_condition_array(run_data['wave_times'][0],
                                                 run_data['wave_times'][1],
@@ -145,5 +159,6 @@
         id = scenario['scenario_id']
         outputdir_name = id + outputdir_tag
-        file_err =  outputdir_name + "_" + quantity + "_err.csv"
+        file_err =  join(project.output_dir,outputdir_name + "_" + \
+                         quantity + "_err.csv")
         file_errs.append(file_err)
     return file_errs
@@ -196,5 +211,5 @@
     #scenarios = [scenarios[0]] # !!!!!!!!!!!!!!!!!!!!!!
 
-    outputdir_tag = "_nolmts_wdth_0.1_z_0.0_ys_0.01_mta_0.01"
+    outputdir_tag = "_nolmts_wdth_0.1_z_0.0_ys_0.5_mta_0.01_A"
     calc_norms = True
     #calc_norms = False
Index: /anuga_validation/Hinwood_2008/project.py
===================================================================
--- /anuga_validation/Hinwood_2008/project.py	(revision 5694)
+++ /anuga_validation/Hinwood_2008/project.py	(revision 5695)
@@ -1,2 +1,9 @@
 """Common filenames and locations.
 """
+
+from os import access, F_OK, mkdir
+
+output_dir = 'output'
+
+if not access(output_dir,F_OK):
+            mkdir (output_dir) 
Index: /anuga_validation/Hinwood_2008/run_dam.py
===================================================================
--- /anuga_validation/Hinwood_2008/run_dam.py	(revision 5694)
+++ /anuga_validation/Hinwood_2008/run_dam.py	(revision 5695)
@@ -13,5 +13,5 @@
 # Standard modules
 import time
-
+from os.path import join
 
 # Related major packages
@@ -22,4 +22,5 @@
 
 # Scenario specific imports
+import project
 import create_mesh
 from prepare_time_boundary import csv2tms
@@ -64,5 +65,5 @@
     csv2tms(boundary_file_path, metadata_dic['xleft'][1])
    
-    mesh_filename =  basename + '.msh'
+    mesh_filename =  join(project.output_dir,basename + '.msh')
 
     #-------------------------------------------------------------------------
@@ -83,5 +84,5 @@
     
     domain.set_name(basename)
-    domain.set_datadir('.')
+    domain.set_datadir(project.output_dir)
     domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
     domain.set_minimum_storable_height(0.0001)
@@ -133,11 +134,12 @@
             points.append([gauge_x, 0.0])
 
-        id =  ".csv"
-        interpolate_sww2csv(basename +".sww",
+        interpolate_sww2csv(join(project.output_dir,basename+".sww"),
                             points,
-                            basename + "_depth" + id,
-                            basename + "_velocity_x" + id,
-                            basename + "_velocity_y" + id,
-                            basename + "_stage" + id)
+                            join(project.output_dir,basename + "_depth.csv"),
+                            join(project.output_dir,basename + \
+                                 "_velocit_x.csv"),
+                           join(project.output_dir, basename + \
+                                "_velocity_y.csv"),
+                            join(project.output_dir,basename + "_stage.csv"))
   
 
@@ -202,5 +204,5 @@
     friction=0.0
     isTest=True
-    #isTest=False
+    isTest=False
     
     for run_data in scenarios:
