Changeset 5597
- Timestamp:
- Aug 1, 2008, 6:54:25 PM (15 years ago)
- Location:
- anuga_core/source/anuga/shallow_water
- Files:
-
- 40 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/test_data_manager.py
r5593 r5597 6554 6554 sources = ['1-z.grd','2-z.grd','3-z.grd'] 6555 6555 6556 6557 6556 # Start times by source and station taken manually from urs header files 6558 6557 time_start_z = array([[10.0,11.5,13,14.5,17.7], 6559 6558 [9.8,11.2,12.7,14.2,17.4], 6560 6559 [9.5,10.9,12.4,13.9,17.1]]) 6561 6562 6560 6561 time_start_e = time_start_z 6562 time_start_n = time_start_e 6563 6563 6564 6564 6565 # Make sts file for each source … … 6593 6594 # For each station, compare urs2sts output to known urs output 6594 6595 6595 6596 delta_t = 0.1 6597 #time_start_e = time_start_z 6598 #time_start_n = time_start_z 6599 6596 6600 # Make sure start time from sts file is the minimum starttime 6597 6601 # across all stations (for this source) 6598 6602 #print k, time_start_z[k,:] 6599 6603 starttime = min(time_start_z[k, :]) 6604 sts_starttime = fid.starttime[0] 6600 6605 msg = 'Starttime for source %d was %f. Should have been %f'\ 6601 %(source_number, fid.starttime, starttime) 6602 assert allclose(fid.starttime, starttime), msg 6606 %(source_number, sts_starttime-delta_t, starttime) 6607 assert allclose(sts_starttime-delta_t, starttime), msg 6608 ## FIXME - have done a dodgy to get it through here ### 6603 6609 6604 6605 delta_t = 0.1 6606 #time_start_e = time_start_z 6607 #time_start_n = time_start_z 6610 6608 6611 6609 6612 for j in range(len(x)): … … 6613 6616 index_end = 0 6614 6617 count = 0 6615 urs_file_name = 'z_'+str(source_number)+'_'+str(j)+'.csv'6616 dict = csv2array(os.path.join(testdir, urs_file_name ))6618 urs_file_name_z = 'z_'+str(source_number)+'_'+str(j)+'.csv' 6619 dict = csv2array(os.path.join(testdir, urs_file_name_z)) 6617 6620 urs_stage = dict['urs_stage'] 6621 urs_file_name_e = 'e_'+str(source_number)+'_'+str(j)+'.csv' 6622 dict = csv2array(os.path.join(testdir, urs_file_name_e)) 6623 urs_e = dict['urs_e'] 6624 urs_file_name_n = 'n_'+str(source_number)+'_'+str(j)+'.csv' 6625 dict = csv2array(os.path.join(testdir, urs_file_name_n)) 6626 urs_n = dict['urs_n'] 6618 6627 for i in range(len(urs_stage)): 6619 6628 if urs_stage[i] == 0.0: … … 6677 6686 from Numeric import asarray,transpose,sqrt,argmax,argmin,arange,Float,\ 6678 6687 compress,zeros,fabs,take,size 6688 6689 # combined 6690 time_start_z = array([9.5,10.9,12.4,13.9,17.1]) 6691 time_start_e = time_start_z 6692 time_start_n = time_start_e 6679 6693 6680 6694 # make sts file for combined sources
Note: See TracChangeset
for help on using the changeset viewer.