Ignore:
Timestamp:
Mar 24, 2005, 1:49:49 PM (20 years ago)
Author:
ole
Message:

Verbosity in sww2asc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/data_manager.py

    r1140 r1141  
    11211121
    11221122    #Get quantity and reduce if applicable
     1123    if verbose: print 'Reading quantity %s' %quantity   
    11231124    q = fid.variables[quantity][:]
    11241125
    11251126   
    11261127    if len(q.shape) == 2:
     1128        if verbose: print 'Reducing quantity %s' %quantity           
    11271129        q_reduced = zeros( number_of_points, Float )
    11281130
     
    11331135
    11341136    #Now q has dimension: number_of_points
     1137
    11351138   
    11361139    #Write prj file
     1140    if verbose: print 'Writing %s' %prjfile
    11371141    prjid = open(prjfile, 'w')
    11381142    prjid.write('Projection    %s\n' %'UTM')
     
    11481152
    11491153    #Create grid
     1154    if verbose: print 'Creating grid'
    11501155    ncols = int((xmax-xmin)/cellsize)+1
    11511156    nrows = int((ymax-ymin)/cellsize)+1
     
    11661171
    11671172    #Interpolate
     1173   
    11681174    from least_squares import Interpolation
    11691175    from util import inside_polygon
    11701176   
    11711177    interp = Interpolation(vertex_points, volumes, grid_points, alpha=0.0,
    1172                            precrop = False)
     1178                           precrop = False, verbose = verbose)
    11731179
    11741180    #Interpolate using quantity values
     1181    if verbose: print 'Interpolating'
    11751182    grid_values = interp.interpolate(q).flat
    11761183
    11771184    #Write
     1185    if verbose: print 'Writing %s' %ascfile   
    11781186    ascid = open(ascfile, 'w')
    11791187
Note: See TracChangeset for help on using the changeset viewer.