Ignore:
Timestamp:
Feb 13, 2009, 2:45:02 PM (16 years ago)
Author:
rwilson
Message:

Final save (except for moving build_urs_boundary.py somewhere).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/busselton/standardised_version/build_urs_boundary.py

    r6329 r6335  
    4141    #---------------------------------------------------------------------------
    4242
     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       
    4347    maxname = 'max_sts_stage.csv'
     48    print 'get_sts_gauge_data: maxname=%s' % maxname
    4449    fid_max = open(os.path.join(project.event_sts, maxname), 'w')
    4550    fid_max.write('index, x, y, max_stage \n')   
     
    9499    '''Build a boundary STS file from a set of MUX files.'''
    95100
    96     print 'build_urs_boundary: event_file=%s' % event_file
    97     print 'build_urs_boundary: output_dir=%s' % output_dir
    98 
    99101    # if we are using an EventSelection multi-mux file
    100102    if project.multi_mux:
    101         print 'using multi-mux file'
    102103        # get the mux+weight data from the meta-file (in <boundaries>)
    103104        mux_event_file = os.path.join(project.boundaries_folder, event_file)
     105        print 'using multi-mux file', mux_event_file
    104106        try:
    105107            fd = open(mux_event_file, 'r')
     
    130132            split_index = muxname.index('.grd')
    131133            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)
    133135            mux_filenames.append(muxname)
    134136       
     
    144146                verbose=True)
    145147    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
    148151
    149152        weight_factor = 1.0
     
    154157        print 'reading', order_filename
    155158        # 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)
    161159        urs2sts(mux_filenames,
    162160                basename_out=output_dir,
     
    167165
    168166    # report on progress so far
    169     quantities, elevation, time = get_sts_gauge_data(project.event_folder,
    170                                                     verbose=False)
     167    sts_file = os.path.join(project.event_folder, project.scenario_name)
     168    quantities, elevation, time = get_sts_gauge_data(sts_file, verbose=False)
    171169    print len(elevation), len(quantities['stage'][0,:])
    172170
Note: See TracChangeset for help on using the changeset viewer.