- Timestamp:
- Jan 21, 2005, 2:40:39 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/test_interpolate_sww.py
r631 r773 46 46 47 47 bed = domain.quantities['elevation'].vertex_values 48 level= zeros(bed.shape, Float)48 stage = zeros(bed.shape, Float) 49 49 50 50 h = 0.3 51 for i in range( level.shape[0]):51 for i in range(stage.shape[0]): 52 52 if i % 2 == 0: 53 level[i,:] = bed[i,:] + h53 stage[i,:] = bed[i,:] + h 54 54 else: 55 level[i,:] = bed[i,:]55 stage[i,:] = bed[i,:] 56 56 57 domain.set_quantity(' level', level)57 domain.set_quantity('stage', stage) 58 58 59 59 domain.distribute_to_vertices_and_edges() … … 87 87 sww = get_dataobject(self.domain) 88 88 sww.store_connectivity() 89 sww.store_timestep(' level')89 sww.store_timestep('stage') 90 90 self.domain.time = 2. 91 sww.store_timestep(' level')91 sww.store_timestep('stage') 92 92 93 93 #Check contents … … 154 154 sww = get_dataobject(self.domain) 155 155 sww.store_connectivity() 156 sww.store_timestep(' level')156 sww.store_timestep('stage') 157 157 self.domain.time = 2. 158 sww.store_timestep(' level')158 sww.store_timestep('stage') 159 159 160 160 #print "self.domain.filename",self.domain.filename
Note: See TracChangeset
for help on using the changeset viewer.