Changeset 2432


Ignore:
Timestamp:
Feb 21, 2006, 1:40:24 PM (18 years ago)
Author:
duncan
Message:

added command line interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/interpolate_sww.py

    r2199 r2432  
    191191
    192192
    193 
    194 
    195 
    196 
    197 
    198 
    199 
     193if __name__ == "__main__":
     194    """
     195    Load in an sww file and an xya file and return an xya file
     196    """
     197    import os, sys
     198    usage = "usage: %s pyvolution_results.sww points.xya depth.xya [depth|stage|(other quantities)]" %         os.path.basename(sys.argv[0])
     199    if len(sys.argv) < 4:
     200        print usage
     201    else:
     202        sww_file = sys.argv[1]
     203        point_file_in = sys.argv[2]
     204        point_file_out = sys.argv[3]
     205        if len(sys.argv) == 5:
     206            quantity_name = sys.argv[4]
     207        else:
     208            quantity_name = DEFAULT_QUANTITY   
     209        #print "quantity",quantity
     210        interpolate_sww2xya(sww_file, quantity_name,point_file_in,
     211                            point_file_out)
     212
     213
     214
     215
     216
     217
     218
Note: See TracChangeset for help on using the changeset viewer.