Ignore:
Timestamp:
Sep 6, 2007, 1:29:36 PM (17 years ago)
Author:
sexton
Message:

updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_validation/convergence_study/animatesww2d_alt.py

    r4703 r4709  
    7171    min_stages = zeros((n,m), Float)
    7272    min_stage = 100.
    73 
     73    fid = open('stage.csv', 'w')
    7474    for k, location in enumerate(x_points):
    7575        for i, t in enumerate(f.get_time()):
     
    8686
    8787            stage[i,k] = w
     88            s = '%.2f,' %(w)
     89            fid.write(s)
    8890            elevation[i,k] = z
    8991            xmom[i,k] = uh
     
    9698            max_stages[i,k] = max_stage
    9799            min_stages[i,k] = min_stage
     100        s = '\n'
     101        fid.write(s)
    98102
    99103    min_stage = min(min(min_stages))
     
    106110    #max_vec = zeros(100, Float)
    107111
    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)
    118123
    119124    close('all')
    120    
    121 animatesww2d('myexample2.sww')
     125
     126swwfile = join(getenv('INUNDATIONHOME'),'data','validation','convergence_study','5000','myexample2.sww')
     127animatesww2d(swwfile)
    122128
    123129# once png files have been created, they can then be dragged into
Note: See TracChangeset for help on using the changeset viewer.