Changeset 3915
- Timestamp:
- Nov 3, 2006, 5:15:13 PM (17 years ago)
- Location:
- anuga_validation/okushiri_2005
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_validation/okushiri_2005/compare_timeseries.py
r3913 r3915 37 37 for key in gauge_names: 38 38 validation_data[key] = [] 39 40 41 #expected_covariances = {'Boundary': 5.288392008865989e-05,42 # 'ch5': 1.166748190444681e-04,43 # 'ch7': 1.121816242516758e-04,44 # 'ch9': 1.249543278366778e-04}45 46 # old limiters47 #expected_covariances = {'Boundary': 5.288601162783020386e-05,48 # 'ch5': 1.167001054284431472e-04,49 # 'ch7': 1.121474766904651861e-04,50 # 'ch9': 1.249244820847215335e-04}51 #52 #expected_differences = {'Boundary': 8.361144081847830638e-04,53 # 'ch5': 3.423673831653336816e-03,54 # 'ch7': 2.799962153549145211e-03,55 # 'ch9': 3.198560464876740433e-03}56 57 58 #expected_covariances = {'Boundary': 5.288392008865989237e-05,59 # 'ch5': 1.166748190444680592e-04,60 # 'ch7': 1.121816242516757850e-04,61 # 'ch9': 1.249543278366777640e-04}62 #63 #expected_differences = {'Boundary': 8.373150808730501615e-04,64 # 'ch5': 3.425914311580337875e-03,65 # 'ch7': 2.802327594773105189e-03,66 # 'ch9': 3.198733498646373370e-03}67 68 69 #expected_covariances = {'Boundary': 5.299487474489660856e-05,70 # 'ch5': 1.169650160375980370e-04,71 # 'ch7': 1.123947836450141360e-04,72 # 'ch9': 1.248329330436513066e-04}73 #74 #expected_differences = {'Boundary': 8.269932106586290379e-04,75 # 'ch5': 3.411769502897898498e-03,76 # 'ch7': 2.777024544282339583e-03,77 # 'ch9': 3.183530359567784788e-03}78 #79 80 81 expected_covariance = {'Boundary': 5.265850426352561254e-05,82 'ch5': 1.171913883449135149e-04,83 'ch7': 1.130834789656423632e-04,84 'ch9': 1.257648236914514148e-04}85 86 expected_difference = {'Boundary': 9.188561500629542633e-04,87 'ch5': 3.439740513194261117e-03,88 'ch7': 2.868914369295409543e-03,89 'ch9': 3.287722754612562841e-03}90 91 expected_maximum_diff = {'Boundary': 4.865498851439054029e-05,92 'ch5': 1.808007760316858448e-03,93 'ch7': 5.464055727564115506e-04,94 'ch9': 1.856547605566957748e-03}95 96 expected_minimum_diff = {'Boundary': 2.293007809784416290e-04,97 'ch5': 1.494336068527772621e-04,98 'ch7': 4.515664278503157131e-03,99 'ch9': 3.406785970601119290e-03}100 101 expected_argmax_timelag = {'Boundary': 3.000000000000007105e-01,102 'ch5': 9.999999999999786837e-02,103 'ch7': 0.000000000000000000e+00,104 'ch9': 0.000000000000000000e+00}105 106 expected_argmin_timelag = {'Boundary': 3.000000000000007105e-01,107 'ch5': 8.499999999999996447e-01,108 'ch7': 4.500000000000010658e-01,109 'ch9': 9.499999999999992895e-01}110 111 112 # Results from lwru2_variable_mesh.sww113 #114 #Validating Boundary115 #Covariance = 5.265850426352561254e-05116 #Accumulated difference = 9.188561500629542633e-04117 #Difference in maxima = 4.865498851439054029e-05118 #Difference in minima = 2.293007809784416290e-04119 #Timelag between maxima = 3.000000000000007105e-01120 #Timelag between minima = 3.000000000000007105e-01121 #Next122 #123 #Validating ch5124 #Covariance = 1.171913883449135149e-04125 #Accumulated difference = 3.439740513194261117e-03126 #Difference in maxima = 1.808007760316858448e-03127 #Difference in minima = 1.494336068527772621e-04128 #Timelag between maxima = 9.999999999999786837e-02129 #Timelag between minima = 8.499999999999996447e-01130 #Next#131 #132 #Validating ch7133 #Covariance = 1.130834789656423632e-04134 #Accumulated difference = 2.868914369295409543e-03135 #Difference in maxima = 5.464055727564115506e-04136 #Difference in minima = 4.515664278503157131e-03137 #Timelag between maxima = 0.000000000000000000e+00138 #Timelag between minima = 4.500000000000010658e-01139 #140 #Next141 #Validating ch9142 #Covariance = 1.257648236914514148e-04143 #Accumulated difference = 3.287722754612562841e-03144 #Difference in maxima = 1.856547605566957748e-03145 #Difference in minima = 3.406785970601119290e-03146 #Timelag between maxima = 0.000000000000000000e+00147 #Timelag between minima = 9.499999999999992895e-01148 149 39 150 40 … … 193 83 sww_filename = project.output_filename 194 84 195 #f = file_function('okushiri_new_limiters.sww', #The best so far196 #f = file_function('okushiri_as2005_with_mxspd=0.1.sww',197 85 f = file_function(sww_filename, 198 86 quantities='stage', … … 222 110 print 'Covariance = %.18e' %res 223 111 224 if res < expected_covariance[name]-eps:225 print ' Result is better than expected by: %.18e'\226 %(res-expected_covariance[name])227 print ' Expect = %.18e' %expected_covariance[name]228 elif res > expected_covariance[name]+eps:229 print ' FAIL: Result is worse than expected by: %.18e'\230 %(res-expected_covariance[name])231 print ' Expect = %.18e' %expected_covariance[name]232 else:233 pass234 235 236 112 # Difference measures 237 113 res = sum(abs(observed_timeseries-model))/len(model) 238 114 print 'Accumulated difference = %.18e' %res 239 240 if res < expected_difference[name]-eps:241 print ' Result is better than expected by: %.18e'\242 %(res-expected_difference[name])243 print ' Expect = %.18e' %expected_difference[name]244 elif res > expected_difference[name]+eps:245 print ' FAIL: Result is worse than expected by: %.18e'\246 %(res-expected_difference[name])247 print ' Expect = %.18e' %expected_difference[name]248 else:249 pass250 115 251 116 … … 254 119 print 'Difference in maxima = %.18e' %res 255 120 256 if res < expected_maximum_diff[name]-eps:257 print ' Result is better than expected by: %.18e'\258 %(res-expected_maximum_diff[name])259 print ' Expect = %.18e' %expected_maximum_diff[name]260 elif res > expected_maximum_diff[name]+eps:261 print ' FAIL: Result is worse than expected by: %.18e'\262 %(res-expected_maximum_diff[name])263 print ' Expect = %.18e' %expected_maximum_diff[name]264 else:265 pass266 267 268 121 269 122 res = abs(min(observed_timeseries)-min(model)) 270 123 print 'Difference in minima = %.18e' %res 271 272 if res < expected_minimum_diff[name]-eps:273 print ' Result is better than expected by: %.18e'\274 %(res-expected_minimum_diff[name])275 print ' Expect = %.18e' %expected_minimum_diff[name]276 elif res > expected_minimum_diff[name]+eps:277 print ' FAIL: Result is worse than expected by: %.18e'\278 %(res-expected_minimum_diff[name])279 print ' Expect = %.18e' %expected_minimum_diff[name]280 else:281 pass282 283 124 284 125 # Locations of extrema … … 287 128 res = abs(reference_time[i1] - reference_time[i0]) 288 129 print 'Timelag between maxima = %.18e' %res 289 290 if res < expected_argmax_timelag[name]-eps:291 print ' Result is better than expected by: %.18e'\292 %(res-expected_argmax_timelag[name])293 print ' Expect = %.18e' %expected_argmax_timelag[name]294 elif res > expected_argmax_timelag[name]+eps:295 print ' FAIL: Result is worse than expected by: %.18e'\296 %(res-expected_argmax_timelag[name])297 print ' Expect = %.18e' %expected_argmax_timelag[name]298 else:299 pass300 130 301 131 … … 304 134 res = abs(reference_time[i1] - reference_time[i0]) 305 135 print 'Timelag between minima = %.18e' %res 306 if res < expected_argmin_timelag[name]-eps:307 print ' Result is better than expected by: %.18e'\308 %(res-expected_argmin_timelag[name])309 print ' Expect = %.18e' %expected_argmin_timelag[name]310 elif res > expected_argmin_timelag[name]+eps:311 print ' FAIL: Result is worse than expected by: %.18e'\312 %(res-expected_argmin_timelag[name])313 print ' Expect = %.18e' %expected_argmin_timelag[name]314 else:315 pass316 136 317 137 -
anuga_validation/okushiri_2005/create_okushiri.py
r3913 r3915 153 153 154 154 # Island area and drawdown region (original) 155 #island_0 = [xleft + 2*(xright-xleft)/3+1.2, ytop-0.5] 156 #island_1 = [xleft + 2*(xright-xleft)/3+0.5, ybottom + 2*(ytop-ybottom)/3] 157 #island_2 = [xleft + (xright-xleft)/2+0.3, ybottom + 2*(ytop-ybottom)/3-0.3] 158 #island_3 = [xleft + (xright-xleft)/2+0.3, ybottom + (ytop-ybottom)/3+0.3] 159 #island_4 = [xleft + 2*(xright-xleft)/3+0.4, ybottom + (ytop-ybottom)/3-0.3] 160 #island_5 = [xleft + 2*(xright-xleft)/3+1.2, ybottom+0.2] 161 #island_6 = [xl-.01, yb] #OK 162 #island_7 = [xl-.01, yt] #OK 163 164 165 # Island area and drawdown region 155 166 island_0 = [xleft + 2*(xright-xleft)/3+1.2, ytop-0.5] 156 167 island_1 = [xleft + 2*(xright-xleft)/3+0.5, ybottom + 2*(ytop-ybottom)/3] 157 island_2 = [xleft + (xright-xleft)/2+0.3, ybottom + 2*(ytop-ybottom)/3-0.3] 158 island_3 = [xleft + (xright-xleft)/2+0.3, ybottom + (ytop-ybottom)/3+0.3] 159 island_4 = [xleft + 2*(xright-xleft)/3+0.4, ybottom + (ytop-ybottom)/3-0.3] 160 island_5 = [xleft + 2*(xright-xleft)/3+1.2, ybottom+0.2] 161 island_6 = [xl-.01, yb] #OK 162 island_7 = [xl-.01, yt] #OK 163 164 165 # Island area and drawdown region 166 #island_0 = [xleft + 2*(xright-xleft)/3+1.2, ytop-0.5] 167 #island_1 = [xleft + 2*(xright-xleft)/3+0.5, ybottom + 2*(ytop-ybottom)/3] 168 #island_2 = [xleft + (xright-xleft)/2+0.4, ybottom + 2*(ytop-ybottom)/3-0.3] 169 #island_3 = [xleft + (xright-xleft)/2+0.4, ybottom + (ytop-ybottom)/3+0.3] 170 #island_4 = [xleft + 2*(xright-xleft)/3+0.4, ybottom + (ytop-ybottom)/3-0.3] 171 #island_5 = [xleft + 2*(xright-xleft)/3+1.2, ybottom+0.8] 172 #island_6 = [xl-.01, yb] # Keep right edge just off the gulleys 173 #island_7 = [xl-.01, yt] 168 island_2 = [xleft + (xright-xleft)/2+0.4, ybottom + 2*(ytop-ybottom)/3-0.3] 169 island_3 = [xleft + (xright-xleft)/2+0.4, ybottom + (ytop-ybottom)/3+0.3] 170 island_4 = [xleft + 2*(xright-xleft)/3+0.4, ybottom + (ytop-ybottom)/3-0.3] 171 island_5 = [xleft + 2*(xright-xleft)/3+1.2, ybottom+0.8] 172 island_6 = [xl-.01, yb] # Keep right edge just off the gulleys 173 island_7 = [xl-.01, yt] 174 174 175 175 island = [island_0, island_1, island_2, … … 179 179 180 180 # Region spanning half right hand side of domain just inside boundary (org) 181 rhs_nw = [xleft + (xright-xleft)/3+1, ytop-0.02]182 rhs_sw = [xleft + (xright-xleft)/3+1, ybottom+0.02]183 rhs_se = [xright-0.02, ybottom+0.02]184 rhs_ne = [xright-0.02, ytop-0.02]181 #rhs_nw = [xleft + (xright-xleft)/3+1, ytop-0.02] 182 #rhs_sw = [xleft + (xright-xleft)/3+1, ybottom+0.02] 183 #rhs_se = [xright-0.02, ybottom+0.02] 184 #rhs_ne = [xright-0.02, ytop-0.02] 185 185 186 186 # Region spanning half right hand side of domain just inside boundary 187 #rhs_nw = [xleft + (xright-xleft)/3+1, ytop-1.4]188 #rhs_sw = [xleft + (xright-xleft)/3+1, ybottom+0.5]189 #rhs_se = [xright-0.1, ybottom+0.2]190 #rhs_ne = [xright-0.1, ytop-0.2]187 rhs_nw = [xleft + (xright-xleft)/3+1, ytop-1.4] 188 rhs_sw = [xleft + (xright-xleft)/3+1, ybottom+0.5] 189 rhs_se = [xright-0.1, ybottom+0.2] 190 rhs_ne = [xright-0.1, ytop-0.2] 191 191 192 192 rhs_region = [rhs_nw, rhs_ne, rhs_se, rhs_sw] 193 194 193 195 194 196 195 # Interior regions and creation of mesh 197 196 interior_regions = [[rhs_region, 0.0005], 198 [island, 0.000 3*base_resolution],199 [gulleys, 0.0000 3*base_resolution]]197 [island, 0.0002*base_resolution], 198 [gulleys, 0.00002*base_resolution]] 200 199 201 200 meshname = project.mesh_filename + '.msh' … … 206 205 interior_regions=interior_regions, 207 206 filename=project.mesh_filename, 208 use_cache=True,209 207 verbose=True) 210 208 -
anuga_validation/okushiri_2005/project.py
r3913 r3915 17 17 18 18 # Model output 19 output_filename = 'okushiri_new .sww'19 output_filename = 'okushiri_new_smaller.sww' 20 20 21 21
Note: See TracChangeset
for help on using the changeset viewer.