Changeset 1124


Ignore:
Timestamp:
Mar 22, 2005, 5:27:39 PM (20 years ago)
Author:
prow
Message:

added verbose.

File:
1 edited

Legend:

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

    r1123 r1124  
    77    lat_name = 'LAT'
    88    if inverted_bathymetry:
    9         up = -1.
     9        up = -1.
    1010    else:
    11         up = +1.
    12    
     11        up = +1.
     12
    1313    from Scientific.IO.NetCDF import NetCDFFile
    1414    import sys
    15    
     15
    1616    try:
    17         if input_file is None:
    18             input_file = sys.argv[1]
    19         if output_file is None:
    20             output_file = sys.argv[2]
     17        if input_file is None:
     18            input_file = sys.argv[1]
     19        if output_file is None:
     20            output_file = sys.argv[2]
    2121    except:
    22         raise 'usage is: most2nc input output'
    23    
     22        raise 'usage is: most2nc input output'
     23
    2424    in_file = open(input_file,'r')
    2525    if verbose: print 'reading header'
     
    3939
    4040    if verbose: print 'reading depths'
     41
    4142    in_depth_list = in_file.readlines()
    4243    in_file.close()
     
    4546
    4647    if verbose: print 'processing depths'
     48
    4749    k=1
    4850    for in_line in in_depth_list:
     
    6062    out_depth_list.reverse()
    6163    depth_list = out_depth_list
    62     if verbose: print out_depth_list
    6364
    6465    if verbose: print 'writing results'
     66
    6567    out_file = NetCDFFile(output_file,'w')
    6668
Note: See TracChangeset for help on using the changeset viewer.