Changeset 4254
- Timestamp:
- Feb 12, 2007, 5:18:20 PM (18 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py
r4253 r4254 21 21 from anuga.geospatial_data.geospatial_data import Geospatial_data 22 22 from anuga.fit_interpolate.fit import fit_to_mesh 23 from anuga.config import points_file_block_line_size as default_block_line_size 23 24 24 25 class Quantity: … … 356 357 use_cache = use_cache) 357 358 elif filename is not None: 359 if hasattr(self.domain, 'points_file_block_line_size'): 360 max_read_lines = self.domain.points_file_block_line_size 361 else: 362 max_read_lines = default_block_line_size 358 363 self.set_values_from_file(filename, attribute_name, alpha, 359 364 location, indices, 360 365 verbose = verbose, 366 max_read_lines=max_read_lines, 361 367 use_cache = use_cache) 362 368 else: … … 738 744 coordinates = self.domain.get_nodes(absolute=True) 739 745 triangles = self.domain.triangles #FIXME 740 746 741 747 vertex_attributes = fit_to_mesh(coordinates, triangles,filename, 742 748 alpha=alpha, -
anuga_core/source/anuga/config.py
r4239 r4254 129 129 130 130 minimum_storable_height = 1.0e-5 #Water depth below which it is *stored* as 0 131 132 points_file_block_line_size = 500 # Number of lines read in from a points file 133 # when blocking -
anuga_core/source/anuga/geospatial_data/geospatial_data.py
r4252 r4254 20 20 from anuga.coordinate_transforms.redfearn import convert_from_latlon_to_utm 21 21 from anuga.utilities.anuga_exceptions import ANUGAError 22 23 MAX_READ_LINES = 500 22 from anuga.config import points_file_block_line_size as MAX_READ_LINES 23 24 24 class Geospatial_data: 25 25 -
anuga_core/source/anuga/shallow_water/data_manager.py
r4238 r4254 4427 4427 geo = URS_points_needed(boundary_polygon, ll_lat, ll_long, grid_spacing, 4428 4428 lat_amount, long_amount, zone=zone) 4429 if not file [-4:] == ".urs":4430 file += ".urs"4429 if not file_name[-4:] == ".urs": 4430 file_name += ".urs" 4431 4431 geo.export_points_file(file_name) 4432 4432 … … 4444 4444 4445 4445 """ 4446 4446 4447 from sets import ImmutableSet 4447 4448 -
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r4239 r4254 227 227 228 228 229 def set_points_file_block_line_size(self,points_file_block_line_size): 230 """ 231 Set the minimum depth that will be recognised when writing 232 to an sww file. This is useful for removing thin water layers 233 that seems to be caused by friction creep. 234 235 The minimum allowed sww depth is in meters. 236 """ 237 self.points_file_block_line_size = points_file_block_line_size 238 229 239 def set_quantities_to_be_stored(self, q): 230 240 """Specify which quantities will be stored in the sww file. -
anuga_core/source/anuga/shallow_water/test_data_manager.py
r4238 r4254 5092 5092 assert False 5093 5093 5094 5095 def dave_test_URS_points_needed(self): 5096 ll_lat = -21.51667 5097 ll_long = 114.51667 5098 grid_spacing = 2./60. 5099 lat_amount = 15 5100 long_amount = 15 5101 5102 5103 boundary_polygon = [[250000,7660000],[280000,7660000], 5104 [280000,7630000],[250000,7630000]] 5105 URS_points_needed_to_file('a_test_example',boundary_polygon, ll_lat, ll_long, grid_spacing, \ 5106 lat_amount, long_amount) 5094 5107 5095 5108 def X_test_URS_points_neededII(self): … … 5101 5114 5102 5115 # change this so lats and longs are inputed, then converted 5116 5103 5117 #boundary_polygon = [[7660000,250000],[7660000,280000], 5104 5118 # [7630000,280000],[7630000,250000]] … … 5110 5124 #------------------------------------------------------------- 5111 5125 if __name__ == "__main__": 5112 suite = unittest.makeSuite(Test_Data_Manager,'test_URS_points_needed')5113 #suite = unittest.makeSuite(Test_Data_Manager,' test_get_min_max_indexes_lat_ascending')5126 #suite = unittest.makeSuite(Test_Data_Manager,'test_URS_points_needed') 5127 #suite = unittest.makeSuite(Test_Data_Manager,'dave_test_URS_points_needed') 5114 5128 #suite = unittest.makeSuite(Test_Data_Manager,'test_ferret2sww_lat_long') 5115 #suite = unittest.makeSuite(Test_Data_Manager,'test')5129 suite = unittest.makeSuite(Test_Data_Manager,'test') 5116 5130 runner = unittest.TextTestRunner() 5117 5131 runner.run(suite)
Note: See TracChangeset
for help on using the changeset viewer.