Changeset 4378
- Timestamp:
- Apr 16, 2007, 11:30:52 AM (18 years ago)
- Location:
- anuga_core/source/anuga/shallow_water
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/data_manager.py
r4363 r4378 4116 4116 4117 4117 Specify only basename_in and read files of the form 4118 basefilename-z-mux, basefilename-e-mux and basefilename-n-mux containing 4119 relative height, x-velocity and y-velocity, respectively. 4118 basefilename_velocity-z-mux, basefilename_velocity-e-mux and 4119 basefilename_waveheight-n-mux containing relative height, 4120 x-velocity and y-velocity, respectively. 4120 4121 4121 4122 Also convert latitude and longitude to UTM. All coordinates are … … 4171 4172 4172 4173 The name of the urs file names must be; 4173 [basename_in]-z-mux 4174 [basename_in]-e-mux 4175 [basename_in]-n-mux 4176 4177 """ 4178 files_in = [basename_in+'-z-mux', 4179 basename_in+'-e-mux', 4180 basename_in+'-n-mux'] 4174 [basename_in]_velocity-z-mux 4175 [basename_in]_velocity-e-mux 4176 [basename_in]_waveheight-n-mux 4177 4178 """ 4179 4180 files_in = [basename_in + WAVEHEIGHT_MUX_LABEL, 4181 basename_in + EAST_VELOCITY_LABEL, 4182 basename_in + NORTH_VELOCITY_LABEL] 4181 4183 files_out = [basename_out+'_ha.nc', 4182 4184 basename_out+'_ua.nc', … … 4617 4619 """ 4618 4620 pass 4619 4621 4622 WAVEHEIGHT_MUX_LABEL = '_velocity-z-mux' 4623 EAST_VELOCITY_LABEL = '_velocity-e-mux' 4624 NORTH_VELOCITY_LABEL = '_waveheight-n-mux' 4620 4625 def urs_ungridded2sww(basename_in='o', basename_out=None, verbose=False, 4621 4626 mint=None, maxt=None, … … 4627 4632 sww format native to abstract_2d_finite_volumes. 4628 4633 4634 4629 4635 Specify only basename_in and read files of the form 4630 basefilename-z-mux, basefilename-e-mux and basefilename-n-mux containing 4631 relative height, x-velocity and y-velocity, respectively. 4636 basefilename_velocity-z-mux, basefilename_velocity-e-mux and 4637 basefilename_waveheight-n-mux containing relative height, 4638 x-velocity and y-velocity, respectively. 4632 4639 4633 4640 Also convert latitude and longitude to UTM. All coordinates are … … 4678 4685 from anuga.pmesh.mesh import Mesh 4679 4686 4680 files_in = [basename_in +'-z-mux',4681 basename_in +'-e-mux',4682 basename_in +'-n-mux']4687 files_in = [basename_in + WAVEHEIGHT_MUX_LABEL, 4688 basename_in + EAST_VELOCITY_LABEL, 4689 basename_in + NORTH_VELOCITY_LABEL] 4683 4690 quantities = ['HA','UA','VA'] 4684 4691 … … 4928 4935 Not finished or tested 4929 4936 """ 4930 files_in = [basename_in+'-z-mux', 4931 basename_in+'-e-mux', 4932 basename_in+'-n-mux'] 4937 4938 files_in = [basename_in + WAVEHEIGHT_MUX_LABEL, 4939 basename_in + EAST_VELOCITY_LABEL, 4940 basename_in + NORTH_VELOCITY_LABEL] 4933 4941 quantities = ['HA','UA','VA'] 4934 4942 -
anuga_core/source/anuga/shallow_water/test_data_manager.py
r4376 r4378 4722 4722 lonlatdeps = [] 4723 4723 quantities = ['HA','UA','VA'] 4724 mux_names = ['-z-mux','-e-mux','-n-mux'] 4724 mux_names = [WAVEHEIGHT_MUX_LABEL, 4725 EAST_VELOCITY_LABEL, 4726 NORTH_VELOCITY_LABEL] 4725 4727 quantities_init = [[],[],[]] 4726 4728 # urs binary is latitude fastest … … 4786 4788 lonlatdeps = [] 4787 4789 quantities = ['HA','UA','VA'] 4788 mux_names = ['-z-mux','-e-mux','-n-mux'] 4790 4791 mux_names = [WAVEHEIGHT_MUX_LABEL, 4792 EAST_VELOCITY_LABEL, 4793 NORTH_VELOCITY_LABEL] 4789 4794 quantities_init = [[],[],[]] 4790 4795 # urs binary is latitude fastest … … 4865 4870 files = [] 4866 4871 quantities = ['HA','UA','VA'] 4867 mux_names = ['-z-mux','-e-mux','-n-mux'] 4872 4873 mux_names = [WAVEHEIGHT_MUX_LABEL, 4874 EAST_VELOCITY_LABEL, 4875 NORTH_VELOCITY_LABEL] 4868 4876 for i,q in enumerate(quantities): 4869 4877 #Write C files … … 5348 5356 #print "quantity", quantity 5349 5357 #print "e", e 5350 #print "n", n 5351 if file[-5:] == 'z-mux' or file[-5:] == 'n-mux' : 5358 #print "n", n 5359 if file[-5:] == WAVEHEIGHT_MUX_LABEL[-5:] or \ 5360 file[-5:] == NORTH_VELOCITY_LABEL[-5:] : 5352 5361 assert allclose(e, quantity) 5353 if file[-5:] == 'e-mux':5362 if file[-5:] == EAST_VELOCITY_LABEL[-5:]: 5354 5363 assert allclose(n, quantity) 5355 5364 assert count == time_step_count … … 5917 5926 #suite = unittest.makeSuite(Test_Data_Manager,'cache_test_URS_points_needed_and_urs_ungridded2sww') 5918 5927 #suite = unittest.makeSuite(Test_Data_Manager,'test_urs2sww_momentum') 5919 suite = unittest.makeSuite(Test_Data_Manager,'test _sync')5920 runner = unittest.TextTestRunner( verbosity=2)5928 suite = unittest.makeSuite(Test_Data_Manager,'test') 5929 runner = unittest.TextTestRunner() #verbosity=2) 5921 5930 runner.run(suite) 5922 5931
Note: See TracChangeset
for help on using the changeset viewer.