Changeset 6376
- Timestamp:
- Feb 23, 2009, 2:17:06 PM (16 years ago)
- Location:
- anuga_work/production/busselton/standardised_version
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/busselton/standardised_version/build_elevation.py
r6367 r6376 50 50 # Create Geospatial data from ASCII files 51 51 geospatial_data = {} 52 for filename in project.ascii_grid_filenames: 53 absolute_filename = join(project.topographies_folder, filename) 54 convert_dem_from_ascii2netcdf(absolute_filename, 55 basename_out=absolute_filename, 56 use_cache=True, 57 verbose=True) 58 dem2pts(absolute_filename, use_cache=True, verbose=True) 52 if not project.ascii_grid_filenames == []: 53 for filename in project.ascii_grid_filenames: 54 absolute_filename = join(project.topographies_folder, filename) 55 convert_dem_from_ascii2netcdf(absolute_filename, 56 basename_out=absolute_filename, 57 use_cache=True, 58 verbose=True) 59 dem2pts(absolute_filename, use_cache=True, verbose=True) 59 60 60 geospatial_data[filename] = Geospatial_data(file_name=absolute_filename+'.pts',61 verbose=True)61 geospatial_data[filename] = Geospatial_data(file_name=absolute_filename+'.pts', 62 verbose=True) 62 63 63 64 # Create Geospatial data from TXT files 64 for filename in project.point_filenames:65 absolute_filename = join(project.topographies_folder, filename)66 geospatial_data[filename] = Geospatial_data(file_name=absolute_filename,67 verbose=True)68 65 if not project.point_filenames == []: 66 for filename in project.point_filenames: 67 absolute_filename = join(project.topographies_folder, filename) 68 geospatial_data[filename] = Geospatial_data(file_name=absolute_filename, 69 verbose=True) 69 70 70 71 #------------------------------------------------------------------------------- -
anuga_work/production/busselton/standardised_version/build_urs_boundary.py
r6335 r6376 40 40 # Get maximum wave height throughout timeseries at each index point 41 41 #--------------------------------------------------------------------------- 42 43 # create directory for generate STS file, if necessary 44 if not os.path.exists(project.event_sts): 45 os.mkdir(project.event_sts) 46 42 47 43 maxname = 'max_sts_stage.csv' 48 44 print 'get_sts_gauge_data: maxname=%s' % maxname 49 fid_max = open(os.path.join(project.event_ sts, maxname), 'w')45 fid_max = open(os.path.join(project.event_folder, maxname), 'w') 50 46 fid_max.write('index, x, y, max_stage \n') 51 47 for j in range(len(x)): … … 62 58 63 59 minname = 'min_sts_stage.csv' 64 fid_min = open(os.path.join(project.event_ sts, minname), 'w')60 fid_min = open(os.path.join(project.event_folder, minname), 'w') 65 61 fid_min.write('index, x, y, max_stage \n') 66 62 for j in range(len(x)): … … 72 68 fid_min.write('%d, %.6f, %.6f, %.6f\n' %(index, x[j], y[j], min(stage))) 73 69 74 out_file = os.path.join(project.event_ sts,70 out_file = os.path.join(project.event_folder, 75 71 basename+'_'+str(index)+'.csv') 76 72 fid_sts = open(out_file, 'w') … … 102 98 if project.multi_mux: 103 99 # get the mux+weight data from the meta-file (in <boundaries>) 104 mux_event_file = os.path.join(project. boundaries_folder, event_file)100 mux_event_file = os.path.join(project.event_folder, event_file) 105 101 print 'using multi-mux file', mux_event_file 106 102 try: … … 146 142 verbose=True) 147 143 else: # a single mux stem file, assume 1.0 weight 148 mux_file = os.path.join(project. mux_data_folder, event_file)144 mux_file = os.path.join(project.event_folder, event_file) 149 145 mux_filenames = [mux_file] 150 146 print 'using single-mux file', mux_file -
anuga_work/production/busselton/standardised_version/project.py
r6375 r6376 27 27 # One or all can be changed each time the run_model script is executed 28 28 tide = 0 # difference between MSL and HAT 29 event_number = 27197 # the event number 29 event_number = 27197 # the event number or the mux file name 30 30 alpha = 0.1 # smoothing parameter for mesh 31 31 friction=0.01 # manning's friction coefficient … … 125 125 # If a meta-file from EventSelection is used, set 'multi-mux' to True. 126 126 # If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False. 127 mux_input_filename = 'Java-0016-z.grd' 128 multi_mux = False 129 ##mux_input_filename = join(event_folder, 'event.list') 130 ##multi_mux = True 127 ##mux_input_filename = event_number # to be found in event_folder 128 # (ie boundaries/event_number/) 129 ##multi_mux = False 130 mux_input_filename = 'event.list' 131 multi_mux = True 131 132 132 133 #------------------------------------------------------------------------------- … … 243 244 244 245 # full path to where MUX files (or meta-files) live 245 mux_input = join( boundaries_folder, mux_input_filename)246 246 mux_input = join(event_folder, mux_input_filename) 247 -
anuga_work/production/busselton/standardised_version/run_model.py
r6369 r6376 121 121 else: 122 122 IC = 0 123 omain.set_quantity('stage', IC, use_cache=True, verbose=True)123 domain.set_quantity('stage', IC, use_cache=True, verbose=True) 124 124 domain.set_quantity('friction', project.friction) 125 125 domain.set_quantity('elevation',
Note: See TracChangeset
for help on using the changeset viewer.