Changeset 1124
- Timestamp:
- Mar 22, 2005, 5:27:39 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/most2nc.py
r1123 r1124 7 7 lat_name = 'LAT' 8 8 if inverted_bathymetry: 9 9 up = -1. 10 10 else: 11 12 11 up = +1. 12 13 13 from Scientific.IO.NetCDF import NetCDFFile 14 14 import sys 15 15 16 16 try: 17 18 19 20 17 if input_file is None: 18 input_file = sys.argv[1] 19 if output_file is None: 20 output_file = sys.argv[2] 21 21 except: 22 23 22 raise 'usage is: most2nc input output' 23 24 24 in_file = open(input_file,'r') 25 25 if verbose: print 'reading header' … … 39 39 40 40 if verbose: print 'reading depths' 41 41 42 in_depth_list = in_file.readlines() 42 43 in_file.close() … … 45 46 46 47 if verbose: print 'processing depths' 48 47 49 k=1 48 50 for in_line in in_depth_list: … … 60 62 out_depth_list.reverse() 61 63 depth_list = out_depth_list 62 if verbose: print out_depth_list63 64 64 65 if verbose: print 'writing results' 66 65 67 out_file = NetCDFFile(output_file,'w') 66 68
Note: See TracChangeset
for help on using the changeset viewer.