Changeset 7340 for anuga_core/source
- Timestamp:
- Aug 8, 2009, 2:19:58 AM (16 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/test_util.py
r7276 r7340 17 17 from anuga.pmesh.mesh import Mesh 18 18 from anuga.shallow_water import Domain, Transmissive_boundary 19 from anuga.shallow_water.data_manager import get_dataobject19 from anuga.shallow_water.data_manager import SWW_file 20 20 from csv import reader,writer 21 21 import time … … 169 169 #Now read data from sww and check 170 170 from Scientific.IO.NetCDF import NetCDFFile 171 filename = domain1.get_name() + '. ' + domain1.format171 filename = domain1.get_name() + '.sww' 172 172 fid = NetCDFFile(filename) 173 173 … … 381 381 #Now read data from sww and check 382 382 from Scientific.IO.NetCDF import NetCDFFile 383 filename = domain1.get_name() + '. ' + domain1.format383 filename = domain1.get_name() + '.sww' 384 384 fid = NetCDFFile(filename) 385 385 … … 630 630 domain.set_name(filename) 631 631 domain.store = True 632 domain.format = 'sww' #Native netcdf visualisation format633 632 634 633 #print points … … 656 655 #Store and advance time 657 656 domain.time = t 658 domain.store_timestep( domain.conserved_quantities)657 domain.store_timestep() 659 658 t += dt 660 659 … … 796 795 domain.set_name(filename) 797 796 domain.store = True 798 domain.format = 'sww' #Native netcdf visualisation format799 797 800 798 #print points … … 1614 1612 1615 1613 domain.set_name('datatest' + str(time.time())) 1616 domain.format = 'sww'1617 1614 domain.smooth = True 1618 1615 domain.reduction = mean 1619 1616 1620 1617 1621 sww = get_dataobject(domain)1618 sww = SWW_file(domain) 1622 1619 sww.store_connectivity() 1623 1620 sww.store_timestep(['stage', 'xmomentum', 'ymomentum','elevation']) … … 1687 1684 from anuga.pmesh.mesh import Mesh 1688 1685 from anuga.shallow_water import Domain, Transmissive_boundary 1689 from anuga.shallow_water.data_manager import get_dataobject1690 1686 from csv import reader,writer 1691 1687 import time … … 1737 1733 1738 1734 domain.set_name('datatest' + str(time.time())) 1739 domain.format = 'sww'1740 1735 domain.smooth = True 1741 1736 domain.reduction = mean 1742 1737 1743 sww = get_dataobject(domain)1738 sww = SWW_file(domain) 1744 1739 sww.store_connectivity() 1745 1740 sww.store_timestep(['stage', 'xmomentum', 'ymomentum']) … … 1857 1852 1858 1853 domain.set_name('datatest' + str(time.time())) 1859 domain.format = 'sww'1860 1854 domain.smooth = True 1861 1855 domain.reduction = mean 1862 1856 1863 sww = get_dataobject(domain)1857 sww = SWW_file(domain) 1864 1858 sww.store_connectivity() 1865 1859 sww.store_timestep(['stage', 'xmomentum', 'ymomentum','elevation']) -
anuga_core/source/anuga/damage_modelling/test_inundation_damage.py
r7276 r7340 15 15 from anuga.shallow_water import Domain, Transmissive_boundary 16 16 from anuga.utilities.numerical_tools import mean 17 from anuga.shallow_water.data_manager import get_dataobject17 from anuga.shallow_water.data_manager import SWW_file 18 18 19 19 import numpy as num … … 112 112 self.domain.reduction = mean 113 113 114 sww = get_dataobject(self.domain)114 sww = SWW_file(self.domain) 115 115 sww.store_connectivity() 116 116 sww.store_timestep(['stage', 'xmomentum', 'ymomentum']) … … 182 182 domain.reduction = mean 183 183 184 sww = get_dataobject(domain)184 sww = SWW_file(domain) 185 185 sww.store_connectivity() 186 186 sww.store_timestep(['stage', 'xmomentum', 'ymomentum']) … … 282 282 domain.reduction = mean 283 283 284 sww = get_dataobject(domain)284 sww = SWW_file(domain) 285 285 sww.store_connectivity() 286 286 sww.store_timestep(['stage', 'xmomentum', 'ymomentum']) … … 354 354 domain.reduction = mean 355 355 356 sww = get_dataobject(domain)356 sww = SWW_file(domain) 357 357 sww.store_connectivity() 358 358 sww.store_timestep(['stage', 'xmomentum', 'ymomentum']) -
anuga_core/source/anuga/fit_interpolate/test_interpolate.py
r7276 r7340 24 24 from anuga.shallow_water import Domain, Transmissive_boundary 25 25 from anuga.utilities.numerical_tools import mean, NAN 26 from anuga.shallow_water.data_manager import get_dataobject26 from anuga.shallow_water.data_manager import SWW_file 27 27 from anuga.geospatial_data.geospatial_data import Geospatial_data 28 28 from anuga.pmesh.mesh import Mesh … … 1710 1710 1711 1711 domain.set_name('datatest' + str(time.time())) 1712 domain.format = 'sww'1713 1712 domain.smooth = True 1714 1713 domain.reduction = mean 1715 1714 1716 sww = get_dataobject(domain)1715 sww = SWW_file(domain) 1717 1716 sww.store_connectivity() 1718 1717 sww.store_timestep(['stage', 'xmomentum', 'ymomentum']) -
anuga_core/source/anuga/shallow_water/data_manager.py
r7339 r7340 329 329 ## 330 330 # @brief Class for storing output to e.g. visualisation 331 class Data_format_sww(Data_format):331 class SWW_file(Data_format): 332 332 """Interface to native NetCDF format (.sww) for storing model output 333 333 … … 434 434 fid = NetCDFFile(self.filename, netcdf_mode_a) 435 435 436 # # Get the variables437 # x = fid.variables['x']438 # y = fid.variables['y']439 # z = fid.variables['elevation']440 # volumes = fid.variables['volumes']441 442 436 # Get X, Y and bed elevation Z 443 437 Q = domain.quantities['elevation'] … … 456 450 457 451 ## 458 # @brief Store time and named quantities to the underlying data file. 459 # @param names The names of the quantities to store. 460 # @note If 'names' not supplied, store a standard set of quantities. 452 # @brief Store time and time dependent quantities 453 # to the underlying data file. 461 454 def store_timestep(self, names=None): 462 """Store time and named quantities to file455 """Store time and time dependent quantities 463 456 """ 464 457 … … 468 461 from os import stat 469 462 470 if names is None: 471 # Standard shallow water wave equation quantitites in ANUGA 472 names = ['stage', 'xmomentum', 'ymomentum'] 463 # Get names of quantities to be stored every time step 464 names = self.writer.dynamic_quantities 473 465 474 466 # Get NetCDF … … 521 513 522 514 # Build a new data_structure. 523 next_data_structure = Data_format_sww(self.domain, mode=self.mode,515 next_data_structure = SWW_file(self.domain, mode=self.mode, 524 516 max_size=self.max_size, 525 517 recursion=self.recursion+1) … … 618 610 ## 619 611 # @brief Class for handling checkpoints data 620 class Data_format_cpt(Data_format): 621 """Interface to native NetCDF format (.cpt) 612 # @note This is not operational at the moment 613 class CPT_file(Data_format): 614 """Interface to native NetCDF format (.cpt) to be 615 used for checkpointing (one day) 622 616 """ 623 617 … … 705 699 706 700 ## 707 # @brief Store ti emand named quantities to underlying data file.701 # @brief Store time and named quantities to underlying data file. 708 702 # @param name 709 703 def store_timestep(self, name): … … 1464 1458 infile.close() 1465 1459 outfile.close() 1466 1467 1468 ##1469 # @brief Return instance of class of given format using filename.1470 # @param domain Data domain (eg, 'sww', etc).1471 # @param mode The mode to open domain in.1472 # @return A class instance of required domain and mode.1473 #Get data objects1474 def get_dataobject(domain, mode=netcdf_mode_w):1475 """Return instance of class of given format using filename1476 """1477 1478 cls = eval('Data_format_%s' % domain.format)1479 return cls(domain, mode)1480 1460 1481 1461 … … 3987 3967 domain.format)) 3988 3968 3989 sww = get_dataobject(domain)3969 sww = SWW_file(domain) 3990 3970 sww.store_connectivity() 3991 3971 sww.store_timestep() … … 5323 5303 volumes = mesh_dic['generatedtrianglelist'] 5324 5304 5325 # write sww intro and grid stuff.5305 # Write sww intro and grid stuff. 5326 5306 if basename_out is None: 5327 5307 swwname = basename_in + '.sww' … … 5983 5963 outfile.variables[q+Write_sww.RANGE][1] = -max_float # Max 5984 5964 5985 # FIXME: Backwartds compat get rid of z once old view has retired 5986 5965 # FIXME: Backwards compat - get rid of z once old view has retired 5987 5966 outfile.createVariable('z', sww_precision, 5988 ('number_of_points',)) 5967 ('number_of_points',)) 5989 5968 5990 5969 for q in self.dynamic_quantities: … … 6000 5979 6001 5980 if isinstance(times, (list, num.ndarray)): 6002 outfile.variables['time'][:] = times # Store time relative5981 outfile.variables['time'][:] = times # Store time relative 6003 5982 6004 5983 if verbose: … … 6097 6076 log.critical('------------------------------------------------') 6098 6077 6099 #z = resize(bath_grid, outfile.variables['z'][:].shape)6100 6078 outfile.variables['x'][:] = points[:,0] #- geo_ref.get_xllcorner() 6101 6079 outfile.variables['y'][:] = points[:,1] #- geo_ref.get_yllcorner() … … 6118 6096 # @param verbose True if this function is to be verbose. 6119 6097 # @param **quant 6120 def store_quantities(self, outfile, sww_precision=num.float32, 6121 slice_index=None, time=None, 6122 verbose=False, **quant): 6098 def store_quantities(self, 6099 outfile, 6100 sww_precision=num.float32, 6101 slice_index=None, 6102 time=None, 6103 verbose=False, 6104 **quant): 6123 6105 """ 6124 Write the quantity info .6106 Write the quantity info at each timestep. 6125 6107 6126 6108 **quant is extra keyword arguments passed in. These must be 6127 the sww quantities, currently; stage, xmomentum, ymomentum.6109 the numpy arrays to be stored in the sww file at each timestep. 6128 6110 6129 6111 if the time array is already been built, use the slice_index … … 6140 6122 6141 6123 Precondition: 6142 triangulation and6143 header have been called.6124 store_triangulation and 6125 store_header have been called. 6144 6126 """ 6145 6127 … … 6149 6131 file_time[slice_index] = time 6150 6132 else: 6151 slice_index = int(slice_index) # In case it was numpy.int 6152 6153 # Write the conserved quantities from Domain. 6154 # Typically stage, xmomentum, ymomentum 6155 # other quantities will be ignored, silently. 6156 # Also write the ranges: stage_range, 6157 # xmomentum_range and ymomentum_range 6133 slice_index = int(slice_index) # Has to be cast in case it was numpy.int 6134 6135 # Write the named dynamic quantities 6136 # The dictionary quant must contain numpy arrays for each name. 6137 # These will typically be the conserved quantities from Domain 6138 # (Typically stage, xmomentum, ymomentum). 6139 # 6140 # Arrays not listed in dynamic_quantitiues will be ignored, silently. 6141 # 6142 # This method will also write the ranges for each quantity, 6143 # e.g. stage_range, xmomentum_range and ymomentum_range 6158 6144 for q in self.dynamic_quantities: 6159 6145 if not quant.has_key(q): 6160 msg = 'SWW file can not write quantity %s' % q 6146 msg = 'Values for quantity %s was not specified in ' % q 6147 msg += 'store_quantities so they cannot be stored.' 6161 6148 raise NewQuantity, msg 6162 6149 else: -
anuga_core/source/anuga/shallow_water/data_manager_joaquims_patch.py
r4814 r7340 292 292 293 293 #Class for storing output to e.g. visualisation 294 class Data_format_sww(Data_format):294 class SWW_file(Data_format): 295 295 """Interface to native NetCDF format (.sww) for storing model output 296 296 … … 487 487 # Build a new data_structure. 488 488 next_data_structure=\ 489 Data_format_sww(self.domain, mode=self.mode,\489 SWW_file(self.domain, mode=self.mode,\ 490 490 max_size = self.max_size,\ 491 491 recursion = self.recursion+1) … … 1226 1226 infile.close() 1227 1227 outfile.close() 1228 1229 1230 #Get data objects1231 def get_dataobject(domain, mode='w'):1232 """Return instance of class of given format using filename1233 """1234 1235 cls = eval('Data_format_%s' %domain.format)1236 return cls(domain, mode)1237 1238 1228 1239 1229 … … 3579 3569 print "Output written to " + domain.get_datadir() + sep + \ 3580 3570 domain.get_name() + "." + domain.format 3581 sww = get_dataobject(domain)3571 sww = SWW_file(domain) 3582 3572 sww.store_connectivity() 3583 3573 sww.store_timestep('stage') -
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r7326 r7340 209 209 # Stored output 210 210 self.store = True 211 self.format = 'sww'211 #self.format = 'sww' 212 212 self.set_store_vertices_uniquely(False) 213 213 self.minimum_storable_height = minimum_storable_height … … 638 638 if self.store is True and self.time == 0.0: 639 639 self.initialise_storage() 640 else:641 pass642 # print 'Results will not be stored.'643 # print 'To store results set domain.store = True'644 # FIXME: Diagnostic output should be controlled by645 # a 'verbose' flag living in domain (or in a parent class)646 640 647 641 # Call basic machinery from parent class … … 651 645 # Store model data, e.g. for subsequent visualisation 652 646 if self.store is True: 653 self.store_timestep(self.quantities_to_be_stored) 654 655 # FIXME: Could maybe be taken from specified list 656 # of 'store every step' quantities 647 self.store_timestep() 657 648 658 649 # Pass control on to outer loop for more specific actions … … 666 657 """ 667 658 668 from anuga.shallow_water.data_manager import get_dataobject659 from anuga.shallow_water.data_manager import SWW_file 669 660 670 661 # Initialise writer 671 self.writer = get_dataobject(self, mode=netcdf_mode_w)662 self.writer = SWW_file(self) 672 663 673 664 # Store vertices and connectivity … … 677 668 # @brief 678 669 # @param name 679 def store_timestep(self , name):680 """Store named quantityand time.670 def store_timestep(self): 671 """Store time dependent quantities and time. 681 672 682 673 Precondition: 683 self.write has been initialised684 """ 685 686 self.writer.store_timestep( name)674 self.writer has been initialised 675 """ 676 677 self.writer.store_timestep() 687 678 688 679 ## -
anuga_core/source/anuga/shallow_water/test_data_manager.py
r7339 r7340 179 179 self.domain.smooth = False 180 180 181 sww = get_dataobject(self.domain)181 sww = SWW_file(self.domain) 182 182 sww.store_connectivity() 183 183 … … 211 211 self.domain.smooth = False 212 212 213 sww = get_dataobject(self.domain)213 sww = SWW_file(self.domain) 214 214 sww.store_connectivity() 215 215 … … 240 240 self.domain.set_store_vertices_uniquely(True) 241 241 242 sww = get_dataobject(self.domain)242 sww = SWW_file(self.domain) 243 243 244 244 dqs = self.domain.get_quantity('stage') … … 327 327 328 328 329 sww = get_dataobject(domain)329 sww = SWW_file(domain) 330 330 331 331 for t in domain.evolve(yieldstep = 1, finaltime = 1): … … 379 379 self.domain.smooth = True 380 380 381 sww = get_dataobject(self.domain)381 sww = SWW_file(self.domain) 382 382 sww.store_connectivity() 383 383 … … 419 419 self.domain.reduction = mean 420 420 421 sww = get_dataobject(self.domain)421 sww = SWW_file(self.domain) 422 422 sww.store_connectivity() 423 423 sww.store_timestep() … … 466 466 self.domain.reduction = mean 467 467 468 sww = get_dataobject(self.domain)468 sww = SWW_file(self.domain) 469 469 sww.store_connectivity() 470 470 sww.store_timestep() … … 522 522 self.domain.reduction = min 523 523 524 sww = get_dataobject(self.domain)524 sww = SWW_file(self.domain) 525 525 sww.store_connectivity() 526 526 sww.store_timestep() … … 624 624 self.domain.minimum_storable_height = 100 625 625 626 sww = get_dataobject(self.domain)626 sww = SWW_file(self.domain) 627 627 sww.store_connectivity() 628 628 sww.store_timestep() … … 678 678 self.domain.reduction = mean 679 679 680 sww = get_dataobject(self.domain)680 sww = SWW_file(self.domain) 681 681 sww.store_connectivity() 682 682 sww.store_timestep() … … 1257 1257 self.domain.geo_reference = Geo_reference(56, 308500, 6189000) 1258 1258 1259 sww = get_dataobject(self.domain)1259 sww = SWW_file(self.domain) 1260 1260 sww.store_connectivity() 1261 1261 sww.store_timestep() … … 1458 1458 self.domain.geo_reference = Geo_reference(56,308500,6189000) 1459 1459 1460 sww = get_dataobject(self.domain)1460 sww = SWW_file(self.domain) 1461 1461 sww.store_connectivity() 1462 1462 sww.store_timestep() … … 1539 1539 self.domain.geo_reference = Geo_reference(56,308500,6189000) 1540 1540 1541 sww = get_dataobject(self.domain)1541 sww = SWW_file(self.domain) 1542 1542 sww.store_connectivity() 1543 sww.store_timestep() #'stage')1543 sww.store_timestep() 1544 1544 self.domain.evolve_to_end(finaltime = 0.01) 1545 sww.store_timestep() #'stage')1545 sww.store_timestep() 1546 1546 1547 1547 cellsize = 0.25 … … 1677 1677 self.domain.geo_reference = Geo_reference(56,308500,6189000) 1678 1678 1679 sww = get_dataobject(self.domain)1679 sww = SWW_file(self.domain) 1680 1680 sww.store_connectivity() 1681 1681 sww.store_timestep() #'stage') … … 1816 1816 self.domain.geo_reference = Geo_reference(56,308500,6189000) 1817 1817 1818 sww = get_dataobject(self.domain)1818 sww = SWW_file(self.domain) 1819 1819 sww.store_connectivity() 1820 1820 sww.store_timestep() … … 1823 1823 self.domain.set_name(base_name+'_P1_8') 1824 1824 swwfile2 = self.domain.get_name() + '.sww' 1825 sww = get_dataobject(self.domain)1825 sww = SWW_file(self.domain) 1826 1826 sww.store_connectivity() 1827 1827 sww.store_timestep() … … 1981 1981 1982 1982 # 1983 sww = get_dataobject(domain)1983 sww = SWW_file(domain) 1984 1984 sww.store_connectivity() 1985 1985 sww.store_timestep() … … 2172 2172 2173 2173 # 2174 sww = get_dataobject(domain)2174 sww = SWW_file(domain) 2175 2175 sww.store_connectivity() 2176 2176 sww.store_timestep() … … 2321 2321 2322 2322 2323 sww = get_dataobject(self.domain)2323 sww = SWW_file(self.domain) 2324 2324 sww.store_connectivity() 2325 2325 sww.store_timestep() … … 2433 2433 2434 2434 2435 sww = get_dataobject(self.domain)2435 sww = SWW_file(self.domain) 2436 2436 sww.store_connectivity() 2437 2437 sww.store_timestep() … … 2586 2586 domain.geo_reference = Geo_reference(56,308500,6189000) 2587 2587 2588 sww = get_dataobject(domain)2588 sww = SWW_file(domain) 2589 2589 sww.store_connectivity() 2590 2590 sww.store_timestep() … … 2692 2692 self.domain.geo_reference = Geo_reference(56,308500,6189000) 2693 2693 2694 sww = get_dataobject(self.domain)2694 sww = SWW_file(self.domain) 2695 2695 sww.store_connectivity() 2696 2696 sww.store_timestep() … … 2790 2790 self.domain.geo_reference = Geo_reference(56,308500,6189000) 2791 2791 2792 sww = get_dataobject(self.domain)2792 sww = SWW_file(self.domain) 2793 2793 sww.store_connectivity() 2794 2794 sww.store_timestep() … … 3548 3548 3549 3549 3550 sww = get_dataobject(self.domain)3550 sww = SWW_file(self.domain) 3551 3551 sww.store_connectivity() 3552 3552 sww.store_timestep() -
anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py
r7276 r7340 1465 1465 # Cleanup 1466 1466 try: 1467 os.remove(domain.get_name() + '. ' + domain.format)1467 os.remove(domain.get_name() + '.sww') 1468 1468 except: 1469 1469 pass … … 5148 5148 # Boundary conditions 5149 5149 Br = Reflective_boundary(domain2) 5150 Bf = Field_boundary(domain1.get_name() + '. ' + domain1.format, domain2)5150 Bf = Field_boundary(domain1.get_name() + '.sww', domain2) 5151 5151 domain2.set_boundary({'right':Br, 'bottom':Br, 'diagonal':Bf}) 5152 5152 domain2.check_integrity() … … 5168 5168 5169 5169 # Cleanup 5170 os.remove(domain1.get_name() + '. ' + domain1.format)5171 os.remove(domain2.get_name() + '. ' + domain2.format)5170 os.remove(domain1.get_name() + '.sww') 5171 os.remove(domain2.get_name() + '.sww') 5172 5172 5173 5173 def test_spatio_temporal_boundary_2(self): … … 5251 5251 # Read results for specific timesteps t=1 and t=2 5252 5252 from Scientific.IO.NetCDF import NetCDFFile 5253 fid = NetCDFFile(domain1.get_name() + '. ' + domain1.format)5253 fid = NetCDFFile(domain1.get_name() + '.sww') 5254 5254 5255 5255 x = fid.variables['x'][:] … … 5273 5273 # Boundary conditions 5274 5274 Br = Reflective_boundary(domain2) 5275 Bf = Field_boundary(domain1.get_name() + '. ' + domain1.format,5275 Bf = Field_boundary(domain1.get_name() + '.sww', 5276 5276 domain2, verbose=False) 5277 5277 domain2.set_boundary({'right':Br, 'bottom':Br, 'diagonal':Bf}) … … 5338 5338 5339 5339 # Cleanup 5340 os.remove(domain1.get_name() + '. ' + domain1.format)5340 os.remove(domain1.get_name() + '.sww') 5341 5341 5342 5342 def test_spatio_temporal_boundary_3(self): … … 5425 5425 # Read results for specific timesteps t=1 and t=2 5426 5426 from Scientific.IO.NetCDF import NetCDFFile 5427 fid = NetCDFFile(domain1.get_name() + '. ' + domain1.format)5427 fid = NetCDFFile(domain1.get_name() + '.sww') 5428 5428 5429 5429 x = fid.variables['x'][:] … … 5447 5447 # Boundary conditions 5448 5448 Br = Reflective_boundary(domain2) 5449 Bf = Field_boundary(domain1.get_name() + '. ' + domain1.format,5449 Bf = Field_boundary(domain1.get_name() + '.sww', 5450 5450 domain2, mean_stage=mean_stage, verbose=False) 5451 5451 … … 5516 5516 5517 5517 # Cleanup 5518 os.remove(domain1.get_name() + '. ' + domain1.format)5518 os.remove(domain1.get_name() + '.sww') 5519 5519 5520 5520 def test_spatio_temporal_boundary_outside(self): … … 5598 5598 # Read results for specific timesteps t=1 and t=2 5599 5599 from Scientific.IO.NetCDF import NetCDFFile 5600 fid = NetCDFFile(domain1.get_name() + '. ' + domain1.format)5600 fid = NetCDFFile(domain1.get_name() + '.sww') 5601 5601 5602 5602 x = fid.variables['x'][:] … … 5616 5616 # Boundary conditions 5617 5617 Br = Reflective_boundary(domain2) 5618 Bf = Field_boundary(domain1.get_name() + '. ' + domain1.format,5618 Bf = Field_boundary(domain1.get_name() + '.sww', 5619 5619 domain2, mean_stage=1, verbose=False) 5620 5620 … … 5632 5632 5633 5633 #Cleanup 5634 os.remove(domain1.get_name() + '. ' + domain1.format)5634 os.remove(domain1.get_name() + '.sww') 5635 5635 5636 5636 def test_extrema(self): … … 5730 5730 5731 5731 # Cleanup 5732 os.remove(domain.get_name() + '. ' + domain.format)5732 os.remove(domain.get_name() + '.sww') 5733 5733 5734 5734 def test_tight_slope_limiters(self): … … 5739 5739 import time, os 5740 5740 from Scientific.IO.NetCDF import NetCDFFile 5741 from data_manager import get_dataobject,extent_sww5741 from data_manager import extent_sww 5742 5742 from mesh_factory import rectangular 5743 5743 … … 5787 5787 5788 5788 domain.set_name('tight_limiters') 5789 domain.format = 'sww'5790 5789 domain.smooth = True 5791 5790 domain.reduction = mean -
anuga_core/source/anuga/shallow_water/tsh2sww.py
r7317 r7340 13 13 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 14 14 import time, os 15 from anuga.pyvolution.data_manager import get_dataobject15 from anuga.pyvolution.data_manager import SWW_file 16 16 from anuga.utilities.numerical_tools import mean 17 17 import anuga.utilities.log as log … … 49 49 % (domain.get_datadir(), sep, domain.get_name(), 50 50 domain.format) 51 sww = get_dataobject(domain)51 sww = SWW_file(domain) 52 52 sww.store_connectivity() 53 53 sww.store_timestep('stage')
Note: See TracChangeset
for help on using the changeset viewer.