Changeset 5414
- Timestamp:
- Jun 24, 2008, 10:19:54 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/test_data_manager.py
r5412 r5414 6423 6423 ua=5*ones((n,time_step_count),Float) 6424 6424 va=-10*ones((n,time_step_count),Float) 6425 6425 6426 # Create two identical mux files to be combined by urs2sts 6426 6427 base_nameI, filesI = self.write_mux2(lat_long_points, 6427 time_step_count, time_step,6428 first_tstep, last_tstep,6429 depth=gauge_depth,6430 ha=ha,6431 ua=ua,6432 va=va)6428 time_step_count, time_step, 6429 first_tstep, last_tstep, 6430 depth=gauge_depth, 6431 ha=ha, 6432 ua=ua, 6433 va=va) 6433 6434 6434 6435 base_nameII, filesII = self.write_mux2(lat_long_points, 6435 time_step_count, time_step, 6436 first_tstep, last_tstep, 6437 depth=gauge_depth, 6438 ha=ha, 6439 ua=ua, 6440 va=va) 6441 6442 urs2sts([base_nameI,base_nameII],weights=[1.0,1.0],mean_stage=tide, 6436 time_step_count, time_step, 6437 first_tstep, last_tstep, 6438 depth=gauge_depth, 6439 ha=ha, 6440 ua=ua, 6441 va=va) 6442 6443 # Call urs2sts with multiple mux files 6444 urs2sts([base_nameI, base_nameII], weights=[1.0,1.0], 6445 mean_stage=tide, 6443 6446 verbose=False) 6444 6447 … … 6446 6449 sts_file = base_nameI + '.sts' 6447 6450 6448 #Let's inter igate the swwfile6449 # Note, the s wwinfo is not gridded. It is point data.6451 #Let's interrogate the sts file 6452 # Note, the sts info is not gridded. It is point data. 6450 6453 fid = NetCDFFile(sts_file) 6451 6454 … … 6483 6486 6484 6487 # Set original data used to write mux file to be zero when gauges are 6485 # not recdoring6488 # not recdoring 6486 6489 6487 6490 ha[0][0]=0.0 … … 6497 6500 # The stage stored in the .sts file should be the sum of the stage 6498 6501 # in the two mux2 files because both have weights = 1. In this case 6499 #the mux2 files are the same so stage == 2.0 * ha 6500 assert allclose(2.0*transpose(ha),stage) #Meters 6502 # the mux2 files are the same so stage == 2.0 * ha 6503 #print 2.0*transpose(ha) - stage 6504 assert allclose(2.0*transpose(ha), stage) #Meters 6501 6505 6502 6506 #Check the momentums - ua … … 6512 6516 # The xmomentum stored in the .sts file should be the sum of the ua 6513 6517 # in the two mux2 files multiplied by the depth. 6514 assert allclose(2.0*transpose(ua*depth), xmomentum)6518 assert allclose(2.0*transpose(ua*depth), xmomentum) 6515 6519 6516 6520 #Check the momentums - va … … 6521 6525 # The ymomentum stored in the .sts file should be the sum of the va 6522 6526 # in the two mux2 files multiplied by the depth. 6523 assert allclose(2.0*transpose(va*depth), ymomentum)6527 assert allclose(2.0*transpose(va*depth), ymomentum) 6524 6528 6525 6529 # check the elevation values.
Note: See TracChangeset
for help on using the changeset viewer.