Changeset 5786 for anuga_work/production/busselton/build_busselton.py
- Timestamp:
- Sep 25, 2008, 2:24:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/busselton/build_busselton.py
r5646 r5786 1 """Script for running tsunami inundation scenario for Dampier, WA, Australia. 1 """ 2 Script for building the elevation data to run a tsunami inundation scenario 3 for busselton, WA, Australia. 2 4 3 Source data such as elevation and boundary data is assumed to be available in 4 directories specified by project.py 5 The output sww file is stored in project.output_time_dir5 Input: elevation data from project.py 6 Output: pts file stored in project.topographies_dir 7 The run_busselton.py is reliant on the output of this script. 6 8 7 The scenario is defined by a triangular mesh created from project.polygon,8 the elevation data and a simulated submarine landslide.9 10 Ole Nielsen and Duncan Gray, GA - 2005 and Jane Sexton, Nick Bartzis, GA - 200611 9 """ 12 10 … … 27 25 from anuga.shallow_water.data_manager import convert_dem_from_ascii2netcdf, dem2pts 28 26 from anuga.geospatial_data.geospatial_data import * 29 from anuga.shallow_water.data_manager import start_screen_catcher, copy_code_files ,store_parameters27 from anuga.shallow_water.data_manager import start_screen_catcher, copy_code_files 30 28 31 29 # Application specific imports … … 42 40 start_screen_catcher(project.output_build_time_dir) 43 41 44 print 'USER: ', project.user42 print 'USER: ', project.user 45 43 46 44 #------------------------------------------------------------------------------- … … 51 49 # Fine pts file to be clipped to area of interest 52 50 #------------------------------------------------------------------------------- 53 print "project.poly_all",project.poly_all54 print "project.combined_dir_name",project.combined_dir_name51 print "project.poly_all", project.poly_all 52 print "project.combined_dir_name", project.combined_dir_name 55 53 56 # topographydirectory filenames54 # input elevation directory filenames 57 55 onshore_in_dir_name = project.onshore_in_dir_name 58 56 coast_in_dir_name = project.coast_in_dir_name … … 65 63 offshore_in_dir_name5 = project.offshore_in_dir_name5 66 64 65 # output elevation directory filenames 67 66 onshore_dir_name = project.onshore_dir_name 68 67 coast_dir_name = project.coast_dir_name … … 74 73 offshore_dir_name4 = project.offshore_dir_name4 75 74 offshore_dir_name5 = project.offshore_dir_name5 76 77 75 # creates DEM from asc data 78 print "creates DEMs from asc iidata"76 print "creates DEMs from asc data" 79 77 convert_dem_from_ascii2netcdf(onshore_in_dir_name, basename_out=onshore_dir_name, use_cache=True, verbose=True) 80 78 81 # creates pts file for onshore DEM79 # creates pts file for onshore DEM 82 80 print "creates pts file for onshore DEM" 83 dem2pts(onshore_dir_name, 84 # easting_min=project.eastingmin, 85 # easting_max=project.eastingmax, 86 # northing_min=project.northingmin, 87 # northing_max= project.northingmax, 88 use_cache=True, 89 verbose=True) 81 dem2pts(onshore_dir_name ,use_cache=True,verbose=True) 90 82 91 #creates pts file for island DEM 92 #dem2pts(island_dir_name, use_cache=True, verbose=True) 83 # create onshore pts files 84 print'create Geospatial data1 objects from topographies' 85 G1 = Geospatial_data(file_name = onshore_dir_name + '.pts') 93 86 94 print'create Geospatial data1 objects from topographies' 95 G1 = Geospatial_data(file_name = onshore_dir_name + '.pts',verbose=True) 96 G2 = Geospatial_data(file_name = coast_in_dir_name + '.txt',verbose=True) 97 G3 = Geospatial_data(file_name = coast_in_dir_name1 + '.txt',verbose=True) 98 G_off = Geospatial_data(file_name = offshore_in_dir_name + '.txt',verbose=True) 99 G_off1 = Geospatial_data(file_name = offshore_in_dir_name1 + '.txt',verbose=True) 100 G_off2 = Geospatial_data(file_name = offshore_in_dir_name2 + '.txt',verbose=True) 101 G_off3 = Geospatial_data(file_name = offshore_in_dir_name3 + '.txt',verbose=True) 102 G_off4 = Geospatial_data(file_name = offshore_in_dir_name4 + '.txt',verbose=True) 103 G_off5 = Geospatial_data(file_name = offshore_in_dir_name5 + '.txt',verbose=True) 87 # create coastal and offshore pts files 88 print'create Geospatial data2 objects from topographies' 89 G3 = Geospatial_data(file_name = coast_in_dir_name) 90 print'create Geospatial data3 objects from topographies' 91 G4 = Geospatial_data(file_name = coast_in_dir_name1) 92 print'create Geospatial data4 objects from topographies' 93 G_off = Geospatial_data(file_name = offshore_in_dir_name) 94 print'create Geospatial data5 objects from topographies' 95 G_off1 = Geospatial_data(file_name = offshore_in_dir_name1) 96 print'create Geospatial data6 objects from topographies' 97 G_off2 = Geospatial_data(file_name = offshore_in_dir_name2) 98 print'create Geospatial data7 objects from topographies' 99 G_off3 = Geospatial_data(file_name = offshore_in_dir_name3) 100 print'create Geospatial data8 objects from topographies' 101 G_off4 = Geospatial_data(file_name = offshore_in_dir_name4) 102 print'create Geospatial data9 objects from topographies' 103 G_off5 = Geospatial_data(file_name = offshore_in_dir_name5) 104 105 106 #------------------------------------------------------------------------------- 107 # Combine, clip and export dataset 108 #------------------------------------------------------------------------------- 109 104 110 print'add all geospatial objects' 105 111 G = G1 + G2 + G3 + G_off + G_off1 + G_off2 + G_off3 + G_off4 + G_off5 … … 111 117 if access(project.topographies_dir,F_OK) == 0: 112 118 mkdir (project.topographies_dir) 113 G_clipped.export_points_file(project.combined_dir_name + '.txt') 119 G_clipped.export_points_file(project.combined_dir_name + '.pts') 120 #G_clipped.export_points_file(project.combined_dir_name + '.txt') #Use for comparision in ARC 114 121 115 print'project.combined_dir_name + .txt',project.combined_dir_name + '.txt'116 117 ###-------------------------------------------------------------------------118 ### Convert URS to SWW file for boundary conditions119 ###-------------------------------------------------------------------------120 ##print 'starting to create boundary conditions'121 ##from anuga.shallow_water.data_manager import urs2sww, urs_ungridded2sww122 ##123 ##boundaries_in_dir_name = project.boundaries_in_dir_name124 ##print 'boundaries_in_dir_name',project.boundaries_in_dir_name125 ##126 ##127 ###import sys; sys.exit()128 ##129 ##urs_ungridded2sww(project.boundaries_in_dir_name, project.boundaries_in_dir_name,130 ## verbose=True, mint=4000, maxt=80000, zscale=1)131 ##
Note: See TracChangeset
for help on using the changeset viewer.