Changeset 6335
- Timestamp:
- Feb 13, 2009, 2:45:02 PM (16 years ago)
- Location:
- anuga_work/production/busselton/standardised_version
- Files:
-
- 3 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 -
anuga_work/production/busselton/standardised_version/project.py
r6329 r6335 122 122 mux_input_filename = 'Java-0016-z.grd' 123 123 multi_mux = False 124 ##mux_input_filename = 'event_027197.list' 125 ##multi_mux = True 124 126 125 127 #------------------------------------------------------------------------------- … … 209 211 meshes = join(meshes_folder, scenario_name) + '.msh' 210 212 211 # The absolute pathname for the urs order points, used within build_boundary.py213 # The pathname for the urs order points, used within build_urs_boundary.py 212 214 urs_order = join(boundaries_folder, urs_order_filename) 213 215 -
anuga_work/production/busselton/standardised_version/setup_model.py
r6324 r6335 88 88 #----- 89 89 # If this directory don't exist initially, create it. 90 # This should be moved to run_model.py.91 90 #----- 92 91 … … 159 158 160 159 print 'min estimated number of triangles', trigs_min 161 162 #-------------------------------------------------------------------------------163 # Return imported project object as *our* project object.164 #-------------------------------------------------------------------------------165 166 project = project167
Note: See TracChangeset
for help on using the changeset viewer.