Ignore:
Timestamp:
Aug 9, 2009, 5:34:33 PM (14 years ago)
Author:
ole
Message:

Verified that variable elevation can be stored as a time dependent quantity.
Also, ensured backwards compatibility with old viewer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/data_manager.py

    r7342 r7346  
    60036003            outfile.variables[q+Write_sww.RANGE][1] = -max_float # Max
    60046004
    6005         # FIXME: Backwards compat - get rid of z once old view has retired
    6006         outfile.createVariable('z', sww_precision,
    6007                                ('number_of_points',))
     6005        if 'elevation' in self.static_quantities:   
     6006            # FIXME: Backwards compat - get rid of z once old view has retired
     6007            outfile.createVariable('z', sww_precision,
     6008                                   ('number_of_points',))
    60086009                               
    60096010        for q in self.dynamic_quantities:
     
    61676168                # This populates the _range values
    61686169                outfile.variables[q + Write_sww.RANGE][0] = num.min(x)
    6169                 outfile.variables[q + Write_sww.RANGE][1] = num.max(x)               
     6170                outfile.variables[q + Write_sww.RANGE][1] = num.max(x)
    61706171                   
    6171         outfile.variables['z'][:] = outfile.variables['elevation'][:] #FIXME HACK
     6172        # FIXME: Hack for backwards compatibility with old viewer
     6173        if 'elevation' in self.static_quantities:
     6174            outfile.variables['z'][:] = outfile.variables['elevation'][:]
    61726175
    61736176                   
Note: See TracChangeset for help on using the changeset viewer.