Changeset 2700
- Timestamp:
- Apr 11, 2006, 5:05:36 PM (17 years ago)
- Location:
- production/onslow_2006
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
production/onslow_2006/export_results.py
r2682 r2700 1 1 import project, os 2 from os import sep 2 import sys 3 3 4 4 from pyvolution.data_manager import sww2dem 5 5 from pyvolution.ermapper_grids import read_ermapper_grid 6 from pyvolution.util import Screen_Catcher 7 from os import sep 6 8 7 #name = project.outputname 8 9 time_dir = "20060328_094539_alpha_0.1" 9 time_dir = "20060327_095435" 10 10 directory = project.outputdir 11 11 name = directory + time_dir +sep + "source" 12 12 13 print'output dir:', name 13 #normal screen output is stored in 'outname' 14 screen_output_name = directory + time_dir + sep + "export_output.txt" 15 16 #used to catch screen output to file 17 sys.stdout = Screen_Catcher(screen_output_name) 18 sys.stderr = Screen_Catcher(screen_output_name) 19 20 print 'output dir:', name 14 21 #print 'Which variable do you want to export?' 15 22 #which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3 ' )) … … 38 45 quantityname = 'elevation' #Elevation 39 46 40 47 print 'start sww2dem' 41 48 sww2dem(name, basename_out = outname, 42 49 quantity = quantityname, 43 cellsize = 30, # Trevor would like this at 2550 cellsize = 1000, # Trevor would like this at 25 44 51 # define region for viz purposes 45 52 easting_min = project.e_min_area, … … 51 58 format = 'asc') 52 59 60 sys.stderr.write(sys.stdout.data) 61 53 62 #Check 54 63 -
production/onslow_2006/get_timeseries.py
r2683 r2700 11 11 12 12 13 ''' 14 time_dir = "20060 331_155157"13 14 time_dir = "20060410_054158_elevation_6_side_15000" 15 15 directory = project.outputdir 16 16 swwfile = directory + time_dir +sep + "source.sww" … … 18 18 directory = project.boundarydir 19 19 swwfile = directory + "SU-AU_high_res.sww" 20 20 ''' 21 21 #swwfile = project.outputname + '.sww' 22 22 … … 30 30 for line in lines[1:]: 31 31 fields = line.split(',') 32 # my gauge file set up as locationname, easting, northing32 # my gauge file set up as easting, northing locationname, 33 33 34 34 easting = float(fields[0]) 35 35 northing = float(fields[1]) 36 location = fields[2] 36 location = fields[2].strip() 37 print 'location',location 37 38 #z, easting, northing = redfearn(lat, lon) 38 39 gauges.append([easting, northing]) … … 207 208 208 209 whichone = '_%s' %myloc 209 thisfile = project.gaugetimeseries+whichone+'.csv' 210 # thisfile = project.gaugetimeseries+whichone+'.csv' 211 thisfile = directory + time_dir +sep +whichone+'.csv' 210 212 fid = open(thisfile, 'w') 211 213 s = 'Time, Depth, Momentum, Velocity \n'
Note: See TracChangeset
for help on using the changeset viewer.