Changeset 1099


Ignore:
Timestamp:
Mar 17, 2005, 11:01:08 AM (20 years ago)
Author:
ole
Message:

Verbosity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py

    r1092 r1099  
    10181018    return dic.keys(), point_attributes
    10191019
    1020 def read_pts(filename):
     1020def read_pts(filename, verbose = False):
    10211021    """Read .pts NetCDF file
    10221022   
     
    10331033    from Scientific.IO.NetCDF import NetCDFFile
    10341034
    1035     #print 'Reading ', filename
     1035    if verbose: print 'Reading ', filename
    10361036    fid = NetCDFFile(filename, 'r')
    10371037
     
    10401040    point_atts['pointlist'] = array(fid.variables['points'])
    10411041    keys = fid.variables.keys()
    1042     #print "keys",keys
     1042    if verbose: print 'Got %d variables: %s' %(len(keys), keys)
    10431043    try:
    10441044        keys.remove('points')
     
    10511051        #  This is an issue with a file that has been caught,
    10521052        # not a bug.
    1053         raise IOError, msg   
     1053        #(Ole): I see, this is true. Let's remove this conversation:-)
     1054        raise IOError, msg
     1055
    10541056    attributes = {}
    10551057    for key in keys:
     1058        if verbose: print "reading attribute '%s'" %key
     1059       
    10561060        attributes[key] = array(fid.variables[key])
    10571061       
     
    11261130    elif ofile[-4:]== ".pts":
    11271131        try:
    1128             points_dict = read_pts(ofile)       
     1132            points_dict = read_pts(ofile, verbose)       
    11291133        except IOError, e:       
    11301134            msg = 'Could not open file %s ' %ofile
Note: See TracChangeset for help on using the changeset viewer.