Index: uga_work/production/australia_ph2/ceduna/README.txt
===================================================================
--- /anuga_work/production/australia_ph2/ceduna/README.txt	(revision 6402)
+++ 	(revision )
@@ -1,17 +1,0 @@
-This area aims at collecting the best practices in setting up ANUGA models and
-show them as a running demo.
-
-The intent is to make setting up and running of models easier to do and more standardised (without compromising one bit of creativity, of course :-). One principle is that information should never have to be entered more than once.
-
-
-The ideas are:
-
-* Collect all elevation data files in lists for batch processing (as in Shark Bay 200&)
-
-* Roll all the urs2sts work into an ANUGA function (see ticket:317)
- 
-* Get rid of kwargs and use project.* for all parameters and filenames.
-
-* Migrate towards unified anuga interface (as in the Patong scenario).
-
-*
Index: uga_work/production/australia_ph2/ceduna/build_boundary_27255.py
===================================================================
--- /anuga_work/production/australia_ph2/ceduna/build_boundary_27255.py	(revision 6402)
+++ 	(revision )
@@ -1,149 +1,0 @@
-"""
-Script for building boundary to run a tsunami inundation scenario for busselton,
-WA, Australia.  The boundary is sourced from the National Hazard Map.
-
-Input: order_filename from project.py
-       event_number needs to be reflected in the project file 
-Output: creates a sts file and csv files stored in project.event_folder.
-The run_busselton.py is reliant on the output of this script.
-"""
-import os
-from os import sep
-from os.path import join
-import project
-
-from anuga.utilities.numerical_tools import ensure_numeric
-from Scientific.IO.NetCDF import NetCDFFile
-from Numeric import asarray,transpose,sqrt,argmax,argmin,arange,Float,\
-    compress,zeros,fabs,allclose,ones
-from anuga.utilities.polygon import inside_polygon,read_polygon
-from time import localtime, strftime, gmtime
-from anuga.shallow_water.data_manager import urs2sts,create_sts_boundary
-
-try:
-    from pylab import plot,show,xlabel,ylabel,legend,title,savefig,hold
-except:
-    print 'Cannot import pylab plotting will not work. Csv files are still created'
-
-#--------------------------------------------------------------------------
-# Create sts boundary from mux2files 
-#--------------------------------------------------------------------------
-# location of mux files
-# Note, this may change when all mux files are on the GA network
-dir=join(project.muxhome,'mux')
-
-# Refer to event_027255.list in home+state+sep+event08 for event details
-# taken from David's event list for 27255
-# Note, this is specific to the event and will be supplied by David.
-# In time, this will become more automated.
-urs_filenames = [
-    os.path.join(dir,'Java-0017-z.grd'),  
-    os.path.join(dir,'Java-0018-z.grd'),
-    os.path.join(dir,'Java-0019-z.grd'),
-    os.path.join(dir,'Java-0022-z.grd'),  
-    os.path.join(dir,'Java-0023-z.grd'),  
-    os.path.join(dir,'Java-0024-z.grd'),  
-    os.path.join(dir,'Java-0027-z.grd'),  
-    os.path.join(dir,'Java-0028-z.grd'),  
-    os.path.join(dir,'Java-0031-z.grd'),  
-    os.path.join(dir,'Java-0032-z.grd')]  
- 
-print 'number of sources', len(urs_filenames)
-
-if len(urs_filenames) == 10: #change per event
-
-    weight_factor = 30.84050 #change per event
-    weights=weight_factor*ones(len(urs_filenames),Float)
-
-    scenario_name = project.scenario_name
-    urs_order = join(project.urs_order)
-
-    print 'reading', urs_order
-
-    urs2sts(urs_filenames,
-            basename_out = join(project.event_sts),
-            ordering_filename = urs_order,
-            weights = weights,
-            mean_stage = project.tide,
-            verbose = True)
-else:
-    print 'number of sources do not match event.list'
-
-#------------------------------------------------------------------------------
-# Get gauges (timeseries of index points)
-#------------------------------------------------------------------------------
-def get_sts_gauge_data(filename,verbose=False):
-    from Numeric import asarray,transpose,sqrt,argmax,argmin,arange,Float,\
-        compress,zeros,fabs,take
-    fid = NetCDFFile(filename+'.sts', 'r')    #Open existing file for read
-    permutation = fid.variables['permutation'][:]
-    x = fid.variables['x'][:]+fid.xllcorner   #x-coordinates of vertices
-    y = fid.variables['y'][:]+fid.yllcorner   #y-coordinates of vertices
-    points=transpose(asarray([x.tolist(),y.tolist()]))
-    time=fid.variables['time'][:]+fid.starttime
-    elevation=fid.variables['elevation'][:]
-       
-    basename='sts_gauge'
-    quantity_names=['stage','xmomentum','ymomentum']
-    quantities = {}
-    for i, name in enumerate(quantity_names):
-        quantities[name] = fid.variables[name][:]
-
-    #------------------------------------------------------------------------------
-    # Get maxium wave height throughout timeseries at each index point
-    #------------------------------------------------------------------------------
-
-    maxname = 'max_sts_stage.csv'
-    fid_max = open(project.event_folder+sep+maxname,'w')
-    s = 'index, x, y, max_stage \n'
-    fid_max.write(s)    
-    for j in range(len(x)):
-        index= permutation[j]
-        stage = quantities['stage'][:,j]
-        xmomentum = quantities['xmomentum'][:,j]
-        ymomentum = quantities['ymomentum'][:,j]
-
-        s = '%d, %.6f, %.6f, %.6f\n' %(index, x[j], y[j], max(stage))
-        fid_max.write(s)
-      
-    #------------------------------------------------------------------------------
-    # Get minium wave height throughout timeseries at each index point
-    #------------------------------------------------------------------------------
-
-    minname = 'min_sts_stage.csv'
-    fid_min = open(project.event_folder+sep+minname,'w')
-    s = 'index, x, y, max_stage \n'
-    fid_min.write(s)    
-    for j in range(len(x)):
-        index= permutation[j]
-        stage = quantities['stage'][:,j]
-        xmomentum = quantities['xmomentum'][:,j]
-        ymomentum = quantities['ymomentum'][:,j]
-
-        s = '%d, %.6f, %.6f, %.6f\n' %(index, x[j], y[j], min(stage))
-        fid_min.write(s)
-        
-
-
-        fid_sts = open(project.event_folder+sep+basename+'_'+ str(index)+'.csv', 'w')
-        s = 'time, stage, xmomentum, ymomentum \n'
-        fid_sts.write(s)
-
-    #------------------------------------------------------------------------------
-    # End of the get gauges
-    #------------------------------------------------------------------------------
-        for k in range(len(time)-1):
-            s = '%.6f, %.6f, %.6f, %.6f\n' %(time[k], stage[k], xmomentum[k], ymomentum[k])
-            fid_sts.write(s)
-
-        fid_sts.close()      
-
-    fid.close()
-
-
-    return quantities,elevation,time
-
-quantities,elevation,time=get_sts_gauge_data(project.event_sts,verbose=False)
-
-print len(elevation), len(quantities['stage'][0,:])
-
Index: uga_work/production/australia_ph2/ceduna/build_boundary_64468.py
===================================================================
--- /anuga_work/production/australia_ph2/ceduna/build_boundary_64468.py	(revision 6402)
+++ 	(revision )
@@ -1,148 +1,0 @@
-"""
-Script for building boundary to run a tsunami inundation scenario for busselton,
-WA, Australia.  The boundary is sourced from the National Hazard Map.
-
-Input: order_filename from project.py
-       event_number needs to be reflected in the project file 
-Output: creates a sts file and csv files stored in project.boundaries_dir_event.
-The run_busselton.py is reliant on the output of this script.
-"""
-import os
-from os import sep
-from os.path import join
-import project
-
-from anuga.utilities.numerical_tools import ensure_numeric
-from Scientific.IO.NetCDF import NetCDFFile
-from Numeric import asarray,transpose,sqrt,argmax,argmin,arange,Float,\
-    compress,zeros,fabs,allclose,ones
-from anuga.utilities.polygon import inside_polygon,read_polygon
-from time import localtime, strftime, gmtime
-from anuga.shallow_water.data_manager import urs2sts,create_sts_boundary
-
-try:
-    from pylab import plot,show,xlabel,ylabel,legend,title,savefig,hold
-except:
-    print 'Cannot import pylab plotting will not work. Csv files are still created'
-
-#--------------------------------------------------------------------------
-# Create sts boundary from mux2files 
-#--------------------------------------------------------------------------
-# location of mux files
-# Note, this may change when all mux files are on the GA network
-dir=join(project.muxhome,'mux')
-
-# Refer to event_027255.list in home+state+sep+event08 for event details
-# taken from David's event list for 27255
-# Note, this is specific to the event and will be supplied by David.
-# In time, this will become more automated.
-urs_filenames = [
-    os.path.join(dir,'Sandwich-0006-z.grd'),  
-    os.path.join(dir,'Sandwich-0007-z.grd'),
-    os.path.join(dir,'Sandwich-0008-z.grd'),
-    os.path.join(dir,'Sandwich-0009-z.grd'),  
-    os.path.join(dir,'Sandwich-0010-z.grd'),  
-    os.path.join(dir,'Sandwich-0011-z.grd'),  
-    os.path.join(dir,'Sandwich-0012-z.grd'),  
-    os.path.join(dir,'Sandwich-0013-z.grd')]  
- 
-print 'number of sources', len(urs_filenames)
-
-if len(urs_filenames) == 8: #change per event
-
-    weight_factor = 24.2728 #change per event
-    weights=weight_factor*ones(len(urs_filenames),Float)
-
-    scenario_name = project.scenario_name
-    urs_order = join(project.urs_order)
-
-    print 'reading', urs_order
-
-    urs2sts(urs_filenames,
-            basename_out = join(project.event_sts),
-            ordering_filename = urs_order,
-            weights = weights,
-            zone=53,
-            mean_stage = project.tide,
-            verbose = True)
-else:
-    print 'number of sources do not match event.list'
-
-#------------------------------------------------------------------------------
-# Get gauges (timeseries of index points)
-#------------------------------------------------------------------------------
-def get_sts_gauge_data(filename,verbose=False):
-    from Numeric import asarray,transpose,sqrt,argmax,argmin,arange,Float,\
-        compress,zeros,fabs,take
-    fid = NetCDFFile(filename+'.sts', 'r')    #Open existing file for read
-    permutation = fid.variables['permutation'][:]
-    x = fid.variables['x'][:]+fid.xllcorner   #x-coordinates of vertices
-    y = fid.variables['y'][:]+fid.yllcorner   #y-coordinates of vertices
-    points=transpose(asarray([x.tolist(),y.tolist()]))
-    time=fid.variables['time'][:]+fid.starttime
-    elevation=fid.variables['elevation'][:]
-       
-    basename='sts_gauge'
-    quantity_names=['stage','xmomentum','ymomentum']
-    quantities = {}
-    for i, name in enumerate(quantity_names):
-        quantities[name] = fid.variables[name][:]
-
-    #------------------------------------------------------------------------------
-    # Get maxium wave height throughout timeseries at each index point
-    #------------------------------------------------------------------------------
-
-    maxname = 'max_sts_stage.csv'
-    fid_max = open(project.event_folder+sep+maxname,'w')
-    s = 'index, x, y, max_stage \n'
-    fid_max.write(s)    
-    for j in range(len(x)):
-        index= permutation[j]
-        stage = quantities['stage'][:,j]
-        xmomentum = quantities['xmomentum'][:,j]
-        ymomentum = quantities['ymomentum'][:,j]
-
-        s = '%d, %.6f, %.6f, %.6f\n' %(index, x[j], y[j], max(stage))
-        fid_max.write(s)
-      
-    #------------------------------------------------------------------------------
-    # Get minium wave height throughout timeseries at each index point
-    #------------------------------------------------------------------------------
-
-    minname = 'min_sts_stage.csv'
-    fid_min = open(project.event_folder+sep+minname,'w')
-    s = 'index, x, y, max_stage \n'
-    fid_min.write(s)    
-    for j in range(len(x)):
-        index= permutation[j]
-        stage = quantities['stage'][:,j]
-        xmomentum = quantities['xmomentum'][:,j]
-        ymomentum = quantities['ymomentum'][:,j]
-
-        s = '%d, %.6f, %.6f, %.6f\n' %(index, x[j], y[j], min(stage))
-        fid_min.write(s)
-        
-
-
-        fid_sts = open(project.event_folder+sep+basename+'_'+ str(index)+'.csv', 'w')
-        s = 'time, stage, xmomentum, ymomentum \n'
-        fid_sts.write(s)
-
-    #------------------------------------------------------------------------------
-    # End of the get gauges
-    #------------------------------------------------------------------------------
-        for k in range(len(time)-1):
-            s = '%.6f, %.6f, %.6f, %.6f\n' %(time[k], stage[k], xmomentum[k], ymomentum[k])
-            fid_sts.write(s)
-
-        fid_sts.close()      
-
-    fid.close()
-
-
-    return quantities,elevation,time
-
-quantities,elevation,time=get_sts_gauge_data(project.event_sts,verbose=False)
-
-print len(elevation), len(quantities['stage'][0,:])
-
