Ignore:
Timestamp:
Sep 7, 2004, 10:29:42 PM (20 years ago)
Author:
ole
Message:

Got datamanager for sww smooth to work.
Non-smooth does not work yet and tests are unfinished

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/shallow_water.py

    r280 r281  
    4242        #Stored output
    4343        self.store=False
    44         self.format = 'dat'   
     44        self.format = 'sww'   
    4545        self.smooth = True
    4646
     
    110110        #Store model data, e.g. for visualisation   
    111111        if self.store is True and self.time == 0.0:
    112             #FIXME: Could be wrapped into local store_bathymetry and store_timestep
    113             self.intialise_storage()
    114             self.store_quantity('elevation')       
     112            self.initialise_storage()   
     113           
    115114
    116115        #Call basic machinery from parent class
     
    122121            #Store model data, e.g. for subsequent visualisation   
    123122            if self.store is True:
    124                 self.store_timestep() #FIXME: An idea               
    125                 self.store_quantity('level')
     123                self.writer.store_timestep('level')
     124                #FIXME: Could maybe be taken from specified list
     125                #of 'store every step' quantities       
    126126
    127127
     
    130130       
    131131
     132    def initialise_storage(self):       
     133        """Save x,y and bed elevation
     134        """
     135
     136        import data_manager
     137       
     138        #Initialise writer
     139        self.writer = data_manager.get_dataobject(self, mode = 'w')
     140
     141        #Store vertices and connectivity
     142        self.writer.store_connectivity()                   
     143       
     144       
    132145
    133146    def store_quantity(self, name):
    134         """Store named quantity to file using foormat and filename
     147        """Store named quantity to file using format and filename
    135148        """
    136149
     150        #FIXME: NOT IN USE
     151       
    137152        Q = self.quantities[name]
    138153        Q.store(self.filename, self.format)
Note: See TracChangeset for help on using the changeset viewer.