Changeset 4709 for anuga_validation/convergence_study/animatesww2d_alt.py
- Timestamp:
- Sep 6, 2007, 1:29:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_validation/convergence_study/animatesww2d_alt.py
r4703 r4709 71 71 min_stages = zeros((n,m), Float) 72 72 min_stage = 100. 73 73 fid = open('stage.csv', 'w') 74 74 for k, location in enumerate(x_points): 75 75 for i, t in enumerate(f.get_time()): … … 86 86 87 87 stage[i,k] = w 88 s = '%.2f,' %(w) 89 fid.write(s) 88 90 elevation[i,k] = z 89 91 xmom[i,k] = uh … … 96 98 max_stages[i,k] = max_stage 97 99 min_stages[i,k] = min_stage 100 s = '\n' 101 fid.write(s) 98 102 99 103 min_stage = min(min(min_stages)) … … 106 110 #max_vec = zeros(100, Float) 107 111 108 for i in range(0,n,20): 109 #max_vec[i] = max(stage[i,:]) 110 plot(x_points,stage[i,:]) #x_points,max_vec,'+') 111 xlabel('x (m)') 112 ylabel('stage (m)') 113 axis(stage_axis) 114 name = 'time_%i' %i 115 savefig(name) 116 title(name) 117 figs.append(name) 112 if sys.platform == 'win32': 113 for i in range(0,n,20): 114 #max_vec[i] = max(stage[i,:]) 115 plot(x_points,stage[i,:]) #x_points,max_vec,'+') 116 xlabel('x (m)') 117 ylabel('stage (m)') 118 axis(stage_axis) 119 name = 'time_%i' %i 120 savefig(name) 121 title(name) 122 figs.append(name) 118 123 119 124 close('all') 120 121 animatesww2d('myexample2.sww') 125 126 swwfile = join(getenv('INUNDATIONHOME'),'data','validation','convergence_study','5000','myexample2.sww') 127 animatesww2d(swwfile) 122 128 123 129 # once png files have been created, they can then be dragged into
Note: See TracChangeset
for help on using the changeset viewer.