Changeset 2773
- Timestamp:
- Apr 27, 2006, 11:11:05 AM (19 years ago)
- Location:
- production/onslow_2006
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
production/onslow_2006/export_results.py
r2706 r2773 7 7 from os import sep 8 8 9 time_dir = "20060 327_095435"9 time_dir = "20060419_071046" 10 10 directory = project.outputdir 11 11 name = directory + time_dir +sep + "source" … … 13 13 #normal screen output is stored in 'outname' 14 14 screen_output_name = directory + time_dir + sep + "export_output.txt" 15 screen_error_name = directory + time_dir + sep + "export_error.txt" 15 16 16 17 #used to catch screen output to file 17 18 sys.stdout = Screen_Catcher(screen_output_name) 18 sys.stderr = Screen_Catcher(screen_ output_name)19 sys.stderr = Screen_Catcher(screen_error_name) 19 20 20 21 print 'output dir:', name 21 22 #print 'Which variable do you want to export?' 22 23 #which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3 ' )) 23 which_var = 424 which_var = 2 24 25 sys.stderr.write(sys.stdout.data) 25 26 if which_var == 0: # Stage … … 49 50 sww2dem(name, basename_out = outname, 50 51 quantity = quantityname, 51 cellsize = 1000, # Trevor would like this at 2552 cellsize = 20, # Trevor would like this at 25 52 53 # define region for viz purposes 53 54 easting_min = project.e_min_area, -
production/onslow_2006/get_timeseries.py
r2700 r2773 12 12 13 13 14 time_dir = "2006041 0_054158_elevation_6_side_15000"14 time_dir = "20060419_071046" 15 15 directory = project.outputdir 16 16 swwfile = directory + time_dir +sep + "source.sww" 17 17 ''' 18 18 directory = project.boundarydir 19 swwfile = directory + "SU-AU_ high_res.sww"19 swwfile = directory + "SU-AU_clip.sww" 20 20 ''' 21 21 #swwfile = project.outputname + '.sww' … … 207 207 # raw_input('Next') 208 208 209 whichone = ' _%s' %myloc209 whichone = 'Onslow_%s' %myloc 210 210 # thisfile = project.gaugetimeseries+whichone+'.csv' 211 thisfile = directory + time_dir +sep +whichone+'.csv' 211 # thisfile = directory + time_dir + sep +whichone+'.csv' 212 thisfile = directory +whichone+'.csv' 213 212 214 fid = open(thisfile, 'w') 213 215 s = 'Time, Depth, Momentum, Velocity \n' -
production/onslow_2006/project.py
r2721 r2773 53 53 print'bound', boundarydir 54 54 55 gauge_filename = gaugedir + 'onslow_gauges.xya' 55 #gauge_filename = gaugedir + 'onslow_gauges.xya' 56 #for MOST 57 gauge_filename = gaugedir + 'onslow_gauges1.xya' 58 56 59 57 60 gaugetimeseries = gaugedir + 'onslow' … … 88 91 northingmax = 7700000 89 92 90 south = degminsec2decimal_degrees(-2 1,55,0)93 south = degminsec2decimal_degrees(-22,15,0) 91 94 north = degminsec2decimal_degrees(-20,30,0) 92 west = degminsec2decimal_degrees(114, 25,0)95 west = degminsec2decimal_degrees(114,15,0) 93 96 east = degminsec2decimal_degrees(115,50,0) 94 97 ''' … … 101 104 # region to export 102 105 103 e_min_area = 280000106 e_min_area = 300000 104 107 e_max_area = 310000 105 n_min_area = 7 590000106 n_max_area = 76 30000108 n_min_area = 7600000 109 n_max_area = 7610000 107 110 108 111 #Georeferencing … … 112 115 113 116 #Updated Main Domain of Onslow: first run NB 6/4/06 114 '''115 117 d0 = [310000, 7690000] 116 118 d1 = [280000, 7690000] … … 122 124 123 125 polyAll = [d0, d1, d2, d3, d4, d5, d6] 124 '''125 d0 = [310000, 7630000]126 d1 = [280000, 7630000]127 d2 = [280000, 7590000]128 d3 = [310000, 7590000]129 126 130 polyAll = [d0, d1, d2, d3]131 '''132 127 #Interior region - Onslow town 133 128 134 i0 = [304000, 7608000] 129 #i0 = [304000, 7608000] 130 i0 = [304000, 7607000] 135 131 i1 = [302000, 7605000] 136 i2 = [303000, 7602000] 137 i3 = [305000, 7601000] 132 #i2 = [303000, 7602000] 133 i2 = [304000, 7603000] 134 #i3 = [305000, 7601000] 135 i3 = [307000, 7602000] 138 136 i4 = [309000, 7603000] 139 i5 = [307000, 7606500] 137 #i5 = [307000, 7606500] 138 i5 = [307000, 7606000] 140 139 141 140 poly_onslow = [i0, i1, i2, i3, i4, i5] … … 149 148 poly_thevenard = [j0, j1, j2, j3] 150 149 150 ''' 151 151 # Direction Is 152 152 k0 = [309000, 7619000] … … 157 157 poly_direction = [k0, k1, k2, k3] 158 158 ''' 159 160 #med res around onslow 161 l0 = [300000, 7610000] 162 l1 = [285000, 7600000] 163 l2 = [300000, 7597500] 164 l3 = [310000, 7600000] 165 l4 = [315000, 7610000] 166 #l5 = [310000, 7612500] 167 168 #poly_coast = [l0, l1, l2, l3, l4, l5] 169 poly_coast = [l0, l1, l2, l3, l4] 170 171 #general coast and local area to onslow region 172 m0 = [270000, 7581000] 173 m1 = [300000, 7591000] 174 m2 = [339000, 7610000] 175 m3 = [330000, 7630000] 176 m4 = [290000, 7640000] 177 m5 = [260000, 7600000] 178 179 poly_region = [m0, m1, m2, m3, m4, m5] -
production/onslow_2006/run_onslow.py
r2707 r2773 66 66 #normal screen output is stored in 67 67 screen_output_name = project.outputtimedir + "screen_output.txt" 68 screen_error_name = project.outputtimedir + "screen_error.txt" 68 69 69 70 #used to catch screen output to file 70 71 sys.stdout = Screen_Catcher(screen_output_name) 71 sys.stderr = Screen_Catcher(screen_output_name) 72 #sys.stderr = Screen_Catcher(screen_output_name) 73 sys.stderr = Screen_Catcher(screen_error_name) 72 74 73 75 ''' … … 86 88 # print' most file', project.MOST_dir + project.boundary_basename 87 89 88 90 ''' 89 91 # fine data (clipping the points file to smaller area) 90 92 # creates DEM from asc data … … 111 113 print'export G' 112 114 G.export_points_file(project.combined_dem_name + '.pts') 113 115 ''' 114 116 115 117 #------------------------------------------------------------------------------- … … 120 122 121 123 from pmesh.mesh_interface import create_mesh_from_regions 122 124 ''' 123 125 # original 124 #interior_res = 1000 125 #interior_regions = [[project.poly_onslow, interior_res], 126 # [project.poly_thevenard, interior_res]] 127 128 print 'number of interior regions'#, len(interior_regions) 126 interior_res = 5000 127 high_res = 1500 128 interior_regions = [[project.poly_onslow, high_res], 129 [project.poly_thevenard, interior_res], 130 [project.poly_coast, interior_res]] 131 ''' 132 #new 133 region_res = 25000 134 coast_res = 2500 135 onslow_res = 500 136 interior_regions = [[project.poly_onslow, onslow_res], 137 [project.poly_coast, coast_res], 138 [project.poly_region, region_res]] 139 140 print 'number of interior regions', len(interior_regions) 129 141 130 142 from caching import cache … … 135 147 'bottom': [4], 'bottomright': [5], 136 148 'topright':[6]}, 137 'maximum_triangle_area': 500,138 'filename': meshname },139 #'interior_regions': interior_regions},140 149 'maximum_triangle_area': 100000, 150 'filename': meshname, 151 'interior_regions': interior_regions}, 152 verbose = True) 141 153 142 154 … … 155 167 domain.set_name(project.basename) 156 168 domain.set_datadir(project.outputtimedir) 157 domain.set_quantities_to_be_stored(['stage']) 158 169 domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum']) 159 170 160 171 #------------------------------------------------------------------------------- … … 191 202 use_cache = True, 192 203 verbose = True, 193 alpha = 0. 0204 alpha = 0.1 194 205 ) 195 206 … … 255 266 t0 = time.time() 256 267 257 for t in domain.evolve(yieldstep = 10, finaltime = 10): 258 domain.write_time() 259 domain.write_boundary_statistics(tags = 'top') 260 ''' 261 for t in domain.evolve(yieldstep = 120, finaltime = 31000): 262 ,skip_initial_step = True): 263 domain.write_time() 264 domain.write_boundary_statistics(tags = 'top') 265 ''' 268 for t in domain.evolve(yieldstep = 240, finaltime = 7201): 269 domain.write_time() 270 domain.write_boundary_statistics(tags = 'top') 271 272 for t in domain.evolve(yieldstep = 120, finaltime = 12601 273 ,skip_initial_step = True): 274 domain.write_time() 275 domain.write_boundary_statistics(tags = 'top') 276 277 for t in domain.evolve(yieldstep = 60, finaltime = 19801 278 ,skip_initial_step = True): 279 domain.write_time() 280 domain.write_boundary_statistics(tags = 'top') 281 282 for t in domain.evolve(yieldstep = 120, finaltime = 25201 283 ,skip_initial_step = True): 284 domain.write_time() 285 domain.write_boundary_statistics(tags = 'top') 286 287 for t in domain.evolve(yieldstep = 240, finaltime = 36001 288 ,skip_initial_step = True): 289 domain.write_time() 290 domain.write_boundary_statistics(tags = 'top') 291 266 292 print 'That took %.2f seconds' %(time.time()-t0) 267 293
Note: See TracChangeset
for help on using the changeset viewer.