Changeset 3417


Ignore:
Timestamp:
Jul 25, 2006, 1:53:31 PM (18 years ago)
Author:
duncan
Message:

comments and debugging

Location:
inundation/fit_interpolate
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/fit_interpolate/interpolate.py

    r3416 r3417  
    281281                        depth_file,
    282282                        velocity_file,
    283                                 #quantities = ['depth', 'velocity'],
    284                                 verbose=True,
    285                                  use_cache = True):
     283                        #quantities = ['depth', 'velocity'],
     284                        verbose=True,
     285                        use_cache = True):
    286286    """
    287287    Interpolate the quantities at a given set of locations, given
     
    291291    In the future let points be a csv or xya file.
    292292    And the user choose the quantities.
     293
     294    This is currently quite specific.
     295    If it need to be more general, chagne things.
    293296    """
    294297    quantities =  ['stage', 'elevation', 'xmomentum', 'ymomentum']
  • inundation/fit_interpolate/test_interpolate.py

    r3416 r3417  
    14151415        depth_answers_array = [[6.0, 1.5], [15., 10.5]]
    14161416        velocity_answers_array = [[5./6.0, 5./1.5], [5./15., 5./10.5]]
    1417         depth_reader = csv.reader(file(depth_file))
     1417        depth_file_handle = file(depth_file)
     1418        depth_reader = csv.reader(depth_file_handle)
    14181419        depth_reader.next()
    1419         velocity_reader = csv.reader(file(velocity_file))
     1420        velocity_file_handle = file(velocity_file)
     1421        velocity_reader = csv.reader(velocity_file_handle)
    14201422        velocity_reader.next()
    14211423        for depths, velocitys, depth_answers, velocity_answers in map(None,
     
    14321434                assert allclose(float(depths[i]), depth_answers[i]), msg
    14331435                assert allclose(float(velocitys[i]), velocity_answers[i]), msg
    1434        
     1436
     1437        # clean up
     1438        depth_file_handle.close()
     1439        velocity_file_handle.close()
    14351440        #print "sww.filename",sww.filename
    14361441        os.remove(sww.filename)
     1442        os.remove(depth_file)
     1443        os.remove(velocity_file)
    14371444#-------------------------------------------------------------
    14381445if __name__ == "__main__":
Note: See TracChangeset for help on using the changeset viewer.