Ignore:
Timestamp:
Mar 3, 2014, 9:58:02 AM (11 years ago)
Author:
davies
Message:

Minor updates to validation tests

Location:
trunk/anuga_work/development/gareth/tests/wave_runup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_work/development/gareth/tests/wave_runup/plotme.py

    r8867 r9056  
    6666for i in range(len(model_shore_x)):
    6767    # Compute index of shoreline
    68     vtmp = p2.stage[i,:]>p2.elev+shoreline_depth_thresh1
     68    #vtmp = p2.stage[i,:]>p2.elev+shoreline_depth_thresh1
     69    #model_shore_x[i]=p2.x[vtmp].min()
    6970   
    70     model_shore_x[i]=p2.x[vtmp].min()
     71    vtmp = p2.stage[i,:]<p2.elev+shoreline_depth_thresh1
     72    model_shore_x[i]=p2.x[vtmp].max()
     73    vtmp2=(p2.x>model_shore_x[i])
     74    model_shore_x[i]=p2.x[vtmp2].min()
    7175    #v_ind=(p2.stage[i,vtmp]-p2.elev[vtmp]).argmin()
    7276    # Store x and xvel
     
    7680    # Extract shoreline velocity. It is tricky, to avoid getting
    7781    # zero velocity points -- might be a better way to do it?
    78     vtmp2= (p2.stage[i,:]>p2.elev+shoreline_depth_thresh1)*\
    79            (p2.stage[i,:]<p2.elev+shoreline_depth_thresh2)
    80     mloc=abs(p2.xvel[i,vtmp2]).argmax()
     82    #vtmp2= (p2.stage[i,:]>p2.elev+shoreline_depth_thresh1)*\
     83    #       (p2.stage[i,:]<p2.elev+shoreline_depth_thresh2)
     84    #mloc=abs(p2.xvel[i,vtmp2]).argmax()
     85
    8186    #print abs(p2.xvel[i,vtmp2]).max(), mloc
    82     model_shore_u[i]=p2.xvel[i,vtmp2][mloc]
     87    #model_shore_u[i]=p2.xvel[i,vtmp2][mloc]
    8388    #vtmp2 = (p2.stage[i,:]>p2.elev+0.01)
    8489    #mloc= (vtmp2*(p2.stage[i,:]-p2.elev)).argmin()
    8590    #model_shore_u[i] = p2.xvel[i,mloc]
     91   
     92    vtmp2=vtmp
     93    mloc=model_shore_x[i]
     94    model_shore_u[i] = p2.xvel[i,p2.x==model_shore_x[i]].max()
    8695
    8796pyplot.plot(p2.time, model_shore_x-200.,'-o')
  • trunk/anuga_work/development/gareth/tests/wave_runup/runup.py

    r9038 r9056  
    1010
    1111from math import sin, pi, exp
    12 from bal_and import *
    13 #from anuga import Domain as Domain
     12#from bal_and import *
     13from anuga import Domain as Domain
    1414
    1515#from anuga_tsunami import *
     
    3232domain.set_datadir('.')                          # Use current folder
    3333#domain.set_quantities_to_be_stored({'stage': 2, 'xmomentum': 2, 'ymomentum': 2, 'elevation': 1})
    34 #domain.set_flow_algorithm('DE1')
     34domain.set_flow_algorithm('DE1')
    3535#------------------
    3636# Define topography
Note: See TracChangeset for help on using the changeset viewer.