Changeset 1171
- Timestamp:
- Mar 31, 2005, 11:51:37 AM (20 years ago)
- Location:
- inundation/ga/storm_surge/pyvolution
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/data_manager.py
r1155 r1171 1087 1087 1088 1088 if basename_out is None: 1089 basename_out = basename_in 1089 basename_out = basename_in + '_%s' %quantity 1090 1090 1091 1091 swwfile = basename_in + '.sww' … … 1120 1120 1121 1121 #Get quantity and reduce if applicable 1122 if verbose: print 'Reading quantity %s' %quantity 1123 q = fid.variables[quantity][:] 1122 if verbose: print 'Reading quantity %s' %quantity 1123 1124 if quantity.lower() == 'depth': 1125 q = fid.variables['stage'][:] - fid.variables['elevation'][:] 1126 else: 1127 q = fid.variables[quantity][:] 1124 1128 1125 1129 … … 1214 1218 1215 1219 for i in range(nrows): 1216 if verbose and i%((nrows+1 )/10)==0:1220 if verbose and i%((nrows+10)/10)==0: 1217 1221 print 'Doing row %d of %d' %(i, nrows) 1218 1222 -
inundation/ga/storm_surge/pyvolution/test_data_manager.py
r1170 r1171 595 595 self.domain.filename = 'datatest' 596 596 597 prjfile = self.domain.filename + ' .prj'598 ascfile = self.domain.filename + ' .asc'597 prjfile = self.domain.filename + '_elevation.prj' 598 ascfile = self.domain.filename + '_elevation.asc' 599 599 swwfile = self.domain.filename + '.sww' 600 600 … … 633 633 sww2asc(self.domain.filename, 634 634 quantity = 'elevation', 635 cellsize = cellsize) 635 cellsize = cellsize, 636 verbose = False) 636 637 637 638 638 639 #Check prj (meta data) 639 640 prjid = open(prjfile) 640 641 641 lines = prjid.readlines() 642 642 prjid.close() … … 737 737 self.domain.filename = 'datatest' 738 738 739 prjfile = self.domain.filename + ' .prj'740 ascfile = self.domain.filename + ' .asc'739 prjfile = self.domain.filename + '_stage.prj' 740 ascfile = self.domain.filename + '_stage.asc' 741 741 swwfile = self.domain.filename + '.sww' 742 742 … … 889 889 domain.filename = 'datatest' 890 890 891 prjfile = domain.filename + ' .prj'892 ascfile = domain.filename + ' .asc'891 prjfile = domain.filename + '_elevation.prj' 892 ascfile = domain.filename + '_elevation.asc' 893 893 swwfile = domain.filename + '.sww' 894 894 … … 922 922 sww2asc(domain.filename, 923 923 quantity = 'elevation', 924 cellsize = cellsize) 924 cellsize = cellsize, 925 verbose = False) 925 926 926 927
Note: See TracChangeset
for help on using the changeset viewer.