- Timestamp:
- Feb 13, 2009, 2:45:02 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/busselton/standardised_version/build_urs_boundary.py
r6329 r6335 41 41 #--------------------------------------------------------------------------- 42 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 43 47 maxname = 'max_sts_stage.csv' 48 print 'get_sts_gauge_data: maxname=%s' % maxname 44 49 fid_max = open(os.path.join(project.event_sts, maxname), 'w') 45 50 fid_max.write('index, x, y, max_stage \n') … … 94 99 '''Build a boundary STS file from a set of MUX files.''' 95 100 96 print 'build_urs_boundary: event_file=%s' % event_file97 print 'build_urs_boundary: output_dir=%s' % output_dir98 99 101 # if we are using an EventSelection multi-mux file 100 102 if project.multi_mux: 101 print 'using multi-mux file'102 103 # get the mux+weight data from the meta-file (in <boundaries>) 103 104 mux_event_file = os.path.join(project.boundaries_folder, event_file) 105 print 'using multi-mux file', mux_event_file 104 106 try: 105 107 fd = open(mux_event_file, 'r') … … 130 132 split_index = muxname.index('.grd') 131 133 muxname = muxname[:split_index+len('.grd')] 132 muxname = os.path.join(project /mux_data_folder, muxname)134 muxname = os.path.join(project.mux_data_folder, muxname) 133 135 mux_filenames.append(muxname) 134 136 … … 144 146 verbose=True) 145 147 else: # a single mux stem file, assume 1.0 weight 146 print 'using single-mux file' 147 mux_filenames = [os.path.join(project.mux_data_folder, event_file)] 148 mux_file = os.path.join(project.mux_data_folder, event_file) 149 mux_filenames = [mux_file] 150 print 'using single-mux file', mux_file 148 151 149 152 weight_factor = 1.0 … … 154 157 print 'reading', order_filename 155 158 # Create ordered sts file 156 print 'creating sts file'157 print 'mux_filenames=%s' % str(mux_filenames)158 print 'output_dir=%s' % str(output_dir)159 print 'mux_weights=%s' % str(mux_weights)160 print 'project.tide=%s' % str(project.tide)161 159 urs2sts(mux_filenames, 162 160 basename_out=output_dir, … … 167 165 168 166 # report on progress so far 169 quantities, elevation, time = get_sts_gauge_data(project.event_folder,170 167 sts_file = os.path.join(project.event_folder, project.scenario_name) 168 quantities, elevation, time = get_sts_gauge_data(sts_file, verbose=False) 171 169 print len(elevation), len(quantities['stage'][0,:]) 172 170
Note: See TracChangeset
for help on using the changeset viewer.