Index: /anuga_work/production/perth_2006/build_perth.py
===================================================================
--- /anuga_work/production/perth_2006/build_perth.py	(revision 4079)
+++ /anuga_work/production/perth_2006/build_perth.py	(revision 4080)
@@ -55,19 +55,30 @@
 # Fine pts file to be clipped to area of interest
 #-------------------------------------------------------------------------------
-
+print"project.bounding_polygon",project.bounding_polygon
+print"project.combined_dir_name",project.combined_dir_name
 
 # topography directory filenames
+onshore_in_dir_name = project.onshore_in_dir_name
+coast_in_dir_name = project.coast_in_dir_name
+island_in_dir_name = project.island_in_dir_name
+island_in_dir_name1 = project.island_in_dir_name1
+island_in_dir_name2 = project.island_in_dir_name2
+island_in_dir_name3 = project.island_in_dir_name3
+offshore_in_dir_name = project.offshore_in_dir_name
+
 onshore_dir_name = project.onshore_dir_name
 coast_dir_name = project.coast_dir_name
-islands_dir_name = project.islands_dir_name
-islands_dir_name1 = project.islands_dir_name1
-islands_dir_name1 = project.islands_dir_name2
+island_dir_name = project.island_dir_name
+island_dir_name1 = project.island_dir_name1
+island_dir_name2 = project.island_dir_name2
+island_dir_name3 = project.island_dir_name3
 offshore_dir_name = project.offshore_dir_name
 
 # creates DEM from asc data
-convert_dem_from_ascii2netcdf(onshore_dir_name, use_cache=True, verbose=True)
-convert_dem_from_ascii2netcdf(islands_dir_name, use_cache=True, verbose=True)
-convert_dem_from_ascii2netcdf(islands_dir_name1, use_cache=True, verbose=True)
-convert_dem_from_ascii2netcdf(islands_dir_name2, use_cache=True, verbose=True)
+convert_dem_from_ascii2netcdf(onshore_in_dir_name, basename_out=onshore_dir_name, use_cache=True, verbose=True)
+convert_dem_from_ascii2netcdf(island_in_dir_name, basename_out=island_dir_name, use_cache=True, verbose=True)
+convert_dem_from_ascii2netcdf(island_in_dir_name1, basename_out=island_dir_name1, use_cache=True, verbose=True)
+convert_dem_from_ascii2netcdf(island_in_dir_name2, basename_out=island_dir_name2, use_cache=True, verbose=True)
+convert_dem_from_ascii2netcdf(island_in_dir_name3, basename_out=island_dir_name3, use_cache=True, verbose=True)
 
 #creates pts file for onshore DEM
@@ -80,29 +91,26 @@
         verbose=True)
 
-#creates pts file for islands DEM
-dem2pts(islands_dir_name, use_cache=True, verbose=True)
-dem2pts(islands_dir_name1, use_cache=True, verbose=True)
-dem2pts(islands_dir_name2, use_cache=True, verbose=True)
+#creates pts file for island DEM
+dem2pts(island_dir_name, use_cache=True, verbose=True)
+dem2pts(island_dir_name1, use_cache=True, verbose=True)
+dem2pts(island_dir_name2, use_cache=True, verbose=True)
+dem2pts(island_dir_name3, use_cache=True, verbose=True)
 
 print'create Geospatial data objects from topographies'
-G1 = Geospatial_data(file_name = project.onshore_dir_name + '.pts')
-G2 = Geospatial_data(file_name = project.coast_dir_name + '.xya')
-G3 = Geospatial_data(file_name = project.islands_dir_name + '.pts')
-G4 = Geospatial_data(file_name = project.islands_dir_name1 + '.pts')
-G5 = Geospatial_data(file_name = project.islands_dir_name2 + '.pts')
-G_off = Geospatial_data(file_name = project.offshore_dir_name + '.xya')
+G1 = Geospatial_data(file_name = onshore_dir_name + '.pts')
+G2 = Geospatial_data(file_name = coast_in_dir_name + '.xya')
+G3 = Geospatial_data(file_name = island_dir_name + '.pts')
+G4 = Geospatial_data(file_name = island_dir_name1 + '.pts')
+G5 = Geospatial_data(file_name = island_dir_name2 + '.pts')
+G6 = Geospatial_data(file_name = island_dir_name3 + '.pts')
+G_off = Geospatial_data(file_name = offshore_in_dir_name + '.xya')
 
+print'add all geospatial objects'
+G = G1 + G2 + G3 + G4 + G5 + G6 + G_off 
 
-
-
-
-print 'G_offshore_data_old_e'#, G_offshore_old_e.get_data_points() 
-print'add all geospatial objects'
-G = G1 + G2 + G3 + G4 + G5 + G_off 
-
-#print'clip combined geospatial object by bounding polygon'
+print'clip combined geospatial object by bounding polygon'
 G_clipped = G.clip(project.bounding_polygon)
 #FIXME: add a clip function to pts
-print'shape of clipped data', G_clipped.get_data_points().shape
+#print'shape of clipped data', G_clipped.get_data_points().shape
 
 print'export combined DEM file'
Index: /anuga_work/production/perth_2006/project.py
===================================================================
--- /anuga_work/production/perth_2006/project.py	(revision 4079)
+++ /anuga_work/production/perth_2006/project.py	(revision 4080)
@@ -9,4 +9,5 @@
 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
 #from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_points_from_latlon_to_utm
+from anuga.utilities.system_tools import get_user_name
 
 # file and system info
@@ -20,8 +21,15 @@
 home += sep +'data'
 
+#time stuff
+time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
+gtime = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
+build_time = time+'_build'
+run_time = time+'_run'
+print 'gtime: ', gtime
+
 #Making assumptions about the location of scenario data
 state = 'western_australia'
 scenario_name = 'perth'
-scenario_dir_name = 'perth_tsunami_scenario_2006'
+scenario = 'perth_tsunami_scenario_2006'
 
 # onshore data provided by WA DLI
@@ -31,4 +39,5 @@
 island_name1 = 'gard_dli_ext'
 island_name2 = 'carnac_island_dted'
+island_name3 = 'penguin_dted'
 
 # AHO + DPI data
@@ -39,12 +48,23 @@
 combined_name ='perth_combined_elevation'
 
-topographies_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'topographies'+sep
+topographies_in_dir = home+sep+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep
+topographies_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'topographies'+sep
 topographies_time_dir = topographies_dir+build_time+sep
 
 #input topo file location
+onshore_in_dir_name = topographies_in_dir + onshore_name
+island_in_dir_name = topographies_in_dir + island_name
+island_in_dir_name1 = topographies_in_dir + island_name1
+island_in_dir_name2 = topographies_in_dir + island_name2
+island_in_dir_name3 = topographies_in_dir + island_name3
+
+coast_in_dir_name = topographies_in_dir + coast_name
+offshore_in_dir_name = topographies_in_dir + offshore_name
+
 onshore_dir_name = topographies_dir + onshore_name
 island_dir_name = topographies_dir + island_name
 island_dir_name1 = topographies_dir + island_name1
 island_dir_name2 = topographies_dir + island_name2
+island_dir_name3 = topographies_dir + island_name3
 
 coast_dir_name = topographies_dir + coast_name
@@ -54,41 +74,36 @@
 combined_dir_name = topographies_dir + combined_name
 combined_time_dir_name = topographies_time_dir + combined_name
-combined_time_dir_final_name = topographies_time_dir + combined_final_name
+#combined_time_dir_final_name = topographies_time_dir + combined_final_name
 
 
 #Derive subdirectories and filenames
 
-meshes_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'meshes'+sep
+meshes_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'meshes'+sep
 meshes_dir_name = meshes_dir + scenario_name
 
-polygons_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'polygons'+sep
-tide_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'tide_data'+sep
+polygons_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'polygons'+sep
+tide_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'tide_data'+sep
 
+
+boundaries_source = 'mag_9_corrected'
 #boundaries locations
-boundaries_in_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+boundaries_source+sep
-boundaries_in_dir_name = boundaries_in_dir + boundaries_name
-boundaries_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'boundaries'+sep
-boundaries_dir_name = boundaries_dir + boundaries_name
-#boundaries_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'boundaries'+sep+build_time+sep
+boundaries_in_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+boundaries_source+sep
+boundaries_in_dir_name = boundaries_in_dir + scenario_name
+boundaries_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep
+boundaries_dir_name = boundaries_dir + scenario_name
+#boundaries_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+build_time+sep
 #boundaries_time_dir_name = boundaries_time_dir + boundaries_name  #Used by post processing
 #ideas
 #boundaries_time_dir = boundaries_in_dir+'urs'+sep+boundaries_source+sep
 
-#time stuff
-time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
-gtime = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
-build_time = time+'_build'
-run_time = time+'_run'
-print 'gtime: ', gtime
-
 #output locations
-output_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'outputs'+sep
-output_build_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'outputs'+sep+build_time+sep
-output_run_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'outputs'+sep+run_time+sep
+output_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep
+output_build_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep+build_time+sep
+output_run_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'outputs'+sep+run_time+sep
 output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
 
 #gauges
 gauge_name = 'perth.csv'
-gauges_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'gauges'+sep
+gauges_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'gauges'+sep
 gauges_dir_name = gauges_dir + gauge_name
 
@@ -123,5 +138,5 @@
 
 poly_penguin = read_polygon(polygons_dir+'penguin_pts.csv')
-assert zone == refzone
+#assert zone == refzone
 
 
