Changeset 6974
- Timestamp:
- May 5, 2009, 6:25:49 PM (16 years ago)
- Location:
- branches/numpy_anuga_validation/automated_validation_tests/patong_beach_validation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy_anuga_validation/automated_validation_tests/patong_beach_validation/cmpsww.py
r6919 r6974 74 74 filename1 = os.path.basename(file1) 75 75 filename2 = os.path.basename(file2) 76 width = max(len(filename1), len(filename2))77 filename1 = filename1.rjust(width)78 filename2 = filename2.rjust(width)76 # width = max(len(filename1), len(filename2)) 77 # filename1 = filename1.rjust(width) 78 # filename2 = filename2.rjust(width) 79 79 80 80 error = False … … 152 152 error_msg = ('\nFiles differ in global attributes:\n' 153 153 '%s: %s,\n' 154 '%s: %s\n' % (filename1, str(glob_vars1), 155 filename2, str(glob_vars2))) 154 '%s: %s\n' 155 % (filename1, str(glob_vars1), 156 filename2, str(glob_vars2))) 156 157 error = True 157 158 … … 179 180 if var_names1 != var_names2: 180 181 error_msg += ('\nVariables are not the same between files:\n' 181 '%s variables= 182 '%s variables =%s\n'182 '%s variables=%s,\n' 183 '%s variables=%s\n' 183 184 % (filename1, str(var_names1), filename2, str(var_names2))) 184 185 error = True … … 190 191 if num_timesteps1 != num_timesteps2: 191 192 error_msg += ('Files have different number of timesteps:\n' 192 '%s=%d,\n' 193 '%s=%d\n' 194 % (filename1, num_timesteps1, filename2, num_timesteps2)) 193 '%s=%s,\n' 194 '%s=%s\n' 195 % (filename1, str(num_timesteps1), 196 filename2, str(num_timesteps2))) 195 197 error = True 196 198 … … 208 210 '%s: %s\n' 209 211 % (var_name, filename1, str(var1_shape), 210 filename2, str(var2_shape)))212 filename2, str(var2_shape))) 211 213 error = True 212 214 … … 241 243 if var1[i] != var2[i]: 242 244 error_msg += ('\nFiles differ in variable ' 243 '%s[%d,%d]:\n' 244 '%s: %.14f\n' 245 '%s: %.14f\n' 245 '%s[%d,%d]:\n' 246 '%s: %f\n' 247 '%s: %f\n' 248 'difference=%f\n' 246 249 % (var_name, t, i, 247 250 filename1, var1[i], 248 filename2, var2[i])) 251 filename2, var2[i], 252 var1[i]-var2[i])) 249 253 break 250 254 error = True … … 258 262 error_msg += ('\nFiles differ in variable ' 259 263 '%s[%d]:\n' 260 '%s: %.14f\n' 261 '%s: %.14f\n' 264 '%s: %f\n' 265 '%s: %f\n' 266 'difference=%f\n' 262 267 % (var_name, j, 263 268 filename1, var1[j], 264 filename2, var2[j])) 269 filename2, var2[j], 270 var1[j]-var2[j])) 265 271 break 266 272 error = True -
branches/numpy_anuga_validation/automated_validation_tests/patong_beach_validation/validate.py
r6930 r6974 45 45 # these names must be of the form <scene>.sww.<type>.tgz 46 46 # as code below depends upon it. 47 Optional_Data_Objects = ( 'patong.sww.TRIAL.tgz',48 'patong.sww.BASIC.tgz',49 'patong.sww.FINAL.tgz' 47 Optional_Data_Objects = (#'patong.sww.TRIAL.tgz', 48 #'patong.sww.BASIC.tgz', 49 'patong.sww.FINAL.tgz', 50 50 ) 51 51
Note: See TracChangeset
for help on using the changeset viewer.