Changeset 4311
- Timestamp:
- Mar 22, 2007, 8:49:47 AM (18 years ago)
- Location:
- anuga_work/production/dampier_2006
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/dampier_2006/get_timeseries.py
r4308 r4311 26 26 #'20070307_224017_run': 'URS boundary normal' 27 27 } 28 >>>>>>> .r4304 28 29 29 30 … … 59 60 texname, elev_output = sww2timeseries(swwfiles, 60 61 project.gauges_dir_name_simple, 62 >>>>>>> .r4304 61 63 production_dirs, 62 64 report = False, -
anuga_work/production/dampier_2006/get_timeseries_and.py
r4308 r4311 35 35 bo = 'boundaries' 36 36 37 run_time = '200703 12_030201_run'37 run_time = '20070321_164505_run' 38 38 production_dirs = {#run_time: 'URS evolved data'#, 39 39 'boundaries': 'URS boundary condition' … … 97 97 print 'boundaries' 98 98 # file_loc = project.boundaries_in_dir 99 #swwfile = project.boundaries_dir_name3 + '.sww'100 swwfile = project.boundaries_dir_name6+'.sww'99 swwfile = project.boundaries_dir_name3 + '.sww' 100 # swwfile = project.boundaries_dir_name6+'.sww' 101 101 else: 102 102 # file_loc = project.output_dir + label_id + sep … … 124 124 125 125 126 e_time, e_stage, e_momentum, e_speed, e_elevation = get_data_from_file(evolved_dir_filename) 126 e_header, e_data = get_data_from_file(evolved_dir_filename) 127 128 e_time = e_data[:,0] 129 e_stage = e_data[:,1] 130 e_momentum = e_data[:,2] 131 e_speed = e_data[:,3] 132 e_elevation = e_data[:,4] 127 133 128 134 print'boundary_dir_filename',boundary_dir_filename 129 b_time, b_stage, b_momentum, b_speed, b_elevation = get_data_from_file(boundary_dir_filename) 135 b_header, b_data = get_data_from_file(boundary_dir_filename) 136 137 b_time = b_data[:,0] 138 b_stage = b_data[:,1] 139 b_momentum = b_data[:,2] 140 b_speed = b_data[:,3] 141 b_elevation = b_data[:,4] 142 130 143 131 144 # compares the 2 models … … 139 152 b_sample.append(float(b_stage[i])) 140 153 e_sample.append(float(e_stage[k])) 154 print 'out:', b_time[i], b_stage[i],i, j, b_sample[j],e_stage[j] 141 155 if k <len(e_time): print 'time e equal b:', b_time[i], b_stage[i],i, j, b_sample[j],e_stage[j], e_stage[k],(len(e_time)-1) 142 156 j = j +1 … … 144 158 145 159 146 e_stage.pop() 147 e_stage.pop() 160 print len(b_sample), len(e_stage) 161 e_stage = e_stage.tolist().pop() 162 e_stage = e_stage.tolist().pop() 148 163 149 164 print len(b_sample), len(e_stage) … … 157 172 158 173 174 159 175 -
anuga_work/production/dampier_2006/project.py
r4308 r4311 113 113 #gauges 114 114 gauge_name = 'dampier_gauges_up2.csv' #'dampier.csv' 115 gauge_name_simple = 'dampier_gauges_simple.csv' 115 116 gauge_name_test = 'dampier_gauges_up_test.csv' #'dampier.csv' 116 gauge_name_simple = 'dampier_gauges_simple.csv'117 117 gauges_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'gauges'+sep 118 118 gauges_dir_name = gauges_dir + gauge_name 119 gauges_dir_name_simple = gauges_dir + gauge_name_simple 119 120 gauges_dir_name_test = gauges_dir + gauge_name_test 120 gauges_dir_name_simple = gauges_dir + gauge_name_simple121 121 122 122 -
anuga_work/production/dampier_2006/run_dampier_simple.py
r4307 r4311 36 36 from anuga.caching import myhash 37 37 # Application specific imports 38 #import project # Definition of file names and polygons38 import project # Definition of file names and polygons 39 39 40 40 #------------------------------------------------------------------------------ … … 43 43 #------------------------------------------------------------------------------ 44 44 45 #start_screen_catcher(project.output_run_time_dir, myid, numprocs)45 start_screen_catcher(project.output_run_time_dir, myid, numprocs) 46 46 print "Processor Name:",get_processor_name() 47 47 … … 52 52 #boundaries_dir_name = project.boundaries_dir_name 53 53 54 #tide = project.tide54 tide = project.tide 55 55 56 56 # creates copy of code in output dir 57 '''58 57 if myid == 0: 59 58 copy_code_files(project.output_run_time_dir,__file__, 60 59 dirname(project.__file__)+sep+ project.__name__+'.py' ) 61 60 barrier() 62 ''' 63 #print 'USER: ', project.user64 #print 'min triangles', project.trigs_min,61 62 print 'USER: ', project.user 63 print 'min triangles', project.trigs_min, 65 64 print 'Note: This is generally about 20% less than the final amount' 66 65 … … 117 116 verbose=True) 118 117 ''' 119 all = [[469000,7760000],[470000,7758000],[468000,7758000]]120 #all = [[470000,7760000],[469000,7758000],[468000,7760000]]118 #all = [[469000,7760000],[470000,7758000],[468000,7758000]] 119 all = [[470000,7760000],[469000,7758000],[468000,7760000]] 121 120 create_mesh_from_regions(all, 122 # boundary_tags={'ocean': [0,1,2]}, 123 boundary_tags={'ocean': [ 2],'side': [0, 1]}, 124 # boundary_tags={'ocean': [ 2],'ref_side': [0, 1]}, 125 maximum_triangle_area=100000, 126 filename=meshes_dir_name, 127 use_cache=True, 128 verbose=True) 129 import sys 130 sys.exit() 121 boundary_tags={'ocean': [0,1,2]}, 122 # boundary_tags={'ocean': [ 2],'side': [0, 1]}, 123 maximum_triangle_area=50000, 124 filename=meshes_dir_name, 125 use_cache=False, 126 verbose=True) 127 131 128 #------------------------------------------------------------------------- 132 129 # Setup computational domain … … 134 131 print 'Setup computational domain' 135 132 domain = Domain( meshes_dir_name, verbose=True) 136 137 133 ''' 138 134 from caching import cache … … 199 195 print 'Start Set quantity' 200 196 201 domain.set_quantity('elevation',197 #domain.set_quantity('elevation', 202 198 # filename = project.combined_dir_name + '.pts', 203 199 # MUST USE TXT FILES FOR CACHING TO WORK! 204 filename = project.combined_smallest_dir_name + '.txt', 205 use_cache = True, 206 verbose = True, 207 alpha = 0.1) 200 # filename = project.combined_smallest_dir_name + '.txt', 201 # use_cache = True, 202 # verbose = True, 203 # alpha = 0.1) 204 domain.set_quantity('elevation', -42.3) 205 208 206 print 'Finished Set quantity' 209 207 … … 252 250 Bd = Dirichlet_boundary([tide,0,0]) 253 251 254 Bo = Dirichlet_boundary([tide+4.0,0,0])255 256 252 print'set_boundary' 257 253 ##domain.set_boundary({'back': Br, … … 259 255 ## 'ocean': Bf}) 260 256 domain.set_boundary({#'back': Br, 261 'side': Br, 262 'ref_side': Br, 263 'ocean': Bd 257 'side': Bd, 258 'ocean': Bf 264 259 }) 265 260 print'finish set boundary' … … 271 266 t0 = time.time() 272 267 273 for t in domain.evolve(yieldstep = 10, finaltime = 3400):268 for t in domain.evolve(yieldstep = 60, finaltime = 3400): 274 269 domain.write_time() 275 270 domain.write_boundary_statistics(tags = 'ocean') 276 277 if allclose(t, 120):278 domain.set_boundary({'side': Br, 'ocean': Bo})279 280 if allclose(t, 1020):281 domain.set_boundary({'side': Br, 'ocean': Bd})282 271 283 272 #for t in domain.evolve(yieldstep = 120, finaltime = 9000): … … 305 294 306 295 307 308 309 310 311 312 313 314 315
Note: See TracChangeset
for help on using the changeset viewer.