Changeset 5115


Ignore:
Timestamp:
Mar 4, 2008, 4:20:10 PM (16 years ago)
Author:
duncan
Message:

removing debug print statements. Reducing memory use of sww2dem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/data_manager.py

    r5104 r5115  
    19581958
    19591959    # Turn NetCDF objects into Numeric arrays
    1960     quantity_dict = {}
    1961     for name in fid.variables.keys():
    1962         quantity_dict[name] = fid.variables[name][:]
    1963 
    1964 
    1965     # Convert quantity expression to quantities found in sww file   
    1966     q = apply_expression_to_dictionary(quantity, quantity_dict)
     1960    try:
     1961        q = fid.variables[quantity][:]
     1962    except:
     1963        quantity_dict = {}
     1964        for name in fid.variables.keys():
     1965            quantity_dict[name] = fid.variables[name][:]
     1966        #Convert quantity expression to quantities found in sww file   
     1967        q = apply_expression_to_dictionary(quantity, quantity_dict)
    19671968
    19681969    if len(q.shape) == 2:
     
    19851986    assert q.shape[0] == number_of_points
    19861987
    1987 
    19881988    if verbose:
    19891989        print 'Processed values for %s are in [%f, %f]' %(quantity, min(q), max(q))
     
    20182018    ncols = int((xmax-xmin)/cellsize)+1
    20192019    nrows = int((ymax-ymin)/cellsize)+1
     2020   
    20202021
    20212022
     
    41694170
    41704171    #if os.access(files_in[0]+'.mux', os.F_OK) == 0 :
    4171     print "dfdfds"
    41724172    for i, file_name in enumerate(files_in):
    41734173        if os.access(file_name, os.F_OK) == 0:
     
    41784178               files_in[i] += '.mux'
    41794179               print "file_name", file_name
    4180     print "files_in",   files_in
    41814180    hashed_elevation = None
    41824181    for file_in, file_out, quantity in map(None, files_in,
Note: See TracChangeset for help on using the changeset viewer.