Changeset 6335


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

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

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  
    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
  • anuga_work/production/busselton/standardised_version/project.py

    r6329 r6335  
    122122mux_input_filename = 'Java-0016-z.grd'
    123123multi_mux = False
     124##mux_input_filename = 'event_027197.list'
     125##multi_mux = True
    124126
    125127#-------------------------------------------------------------------------------
     
    209211meshes = join(meshes_folder, scenario_name) + '.msh'
    210212
    211 # The absolute pathname for the urs order points, used within build_boundary.py
     213# The pathname for the urs order points, used within build_urs_boundary.py
    212214urs_order = join(boundaries_folder, urs_order_filename)
    213215
  • anuga_work/production/busselton/standardised_version/setup_model.py

    r6324 r6335  
    8888#-----
    8989# If this directory don't exist initially, create it.
    90 # This should be moved to run_model.py.
    9190#-----
    9291
     
    159158
    160159print 'min estimated number of triangles', trigs_min
    161 
    162 #-------------------------------------------------------------------------------
    163 # Return imported project object as *our* project object.
    164 #-------------------------------------------------------------------------------
    165 
    166 project = project
    167 
Note: See TracChangeset for help on using the changeset viewer.