Changeset 1819


Ignore:
Timestamp:
Sep 12, 2005, 4:50:54 PM (19 years ago)
Author:
ole
Message:

Comments about changes that need to be made

Location:
inundation/pyvolution
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/least_squares.py

    r1814 r1819  
    979979 
    980980        #     
    981         self.interpolation_points = interpolation_points #FIXWME Needed?
     981        self.interpolation_points = interpolation_points
    982982        self.T = time[:]  #Time assumed to be relative to starttime
    983983        self.index = 0    #Initial time index
     
    10151015                                     verbose = verbose)
    10161016
    1017             #if interpol.cropped_points is True:
    1018             #    raise 'Some interpolation points were outside mesh'
    1019             #FIXME: This will be raised if triangles are listed as
    1020             #discontinuous even though there is no need to stop
    1021             #(precrop = True above)
    1022 
    10231017            if verbose: print 'Interpolate'
    10241018            for i, t in enumerate(self.T):
     
    10311025            #Report
    10321026            if verbose:
     1027                #FIXME: Move to e.g. __repr__
    10331028                x = vertex_coordinates[:,0]
    10341029                y = vertex_coordinates[:,1]               
  • inundation/pyvolution/util.py

    r1758 r1819  
    214214   
    215215    if quantity_names is None or len(quantity_names) < 1:
    216         #Get quantities from file
     216        #If no quantities are specified get quantities from file
     217        #x, y, time are assumed as the independent variables so
     218        #they are excluded as potentiol quantities
    217219        quantity_names = []
    218220        for name in fid.variables.keys():
    219221            if name not in ['x', 'y', 'time']:
    220222                quantity_names.append(name)
    221                
    222         #msg = 'ERROR: At least one independent value must be specified'
    223         #raise msg
    224 
     223
     224    if len(quantity_names) < 1:               
     225        msg = 'ERROR: At least one independent value must be specified'
     226        raise msg
     227
     228
     229    #Now assert that requested quantitites (and the independent ones)
     230    #are present in file
    225231    missing = []
    226        
    227     for quantity in ['time'] + quantity_names:
     232    for quantity in ['time'] + quantity_names:  #FIXME: Add x, y back
    228233        if not fid.variables.has_key(quantity):
    229234            missing.append(quantity)
Note: See TracChangeset for help on using the changeset viewer.