Changeset 9162
- Timestamp:
- Jun 16, 2014, 5:40:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/utilities/plot_utils.py
r9161 r9162 940 940 print myTSi 941 941 for output_quantity in output_quantities: 942 # 943 myTS=myTSi 944 #import pdb 945 #pdb.set_trace() 946 # 942 943 if(myTSi is not 'max'): 944 myTS=myTSi 945 else: 946 # We have already extracted the max, and e.g. 947 # p2.stage is an array of dimension (1, number_of_pointS). 948 myTS=0 949 947 950 if(type(myTS)==int): 948 951 if(output_quantity=='stage'): … … 960 963 if(output_quantity=='elevation'): 961 964 gridq=p2.elev[gridqInd] 962 timestepString=str(round(p2.time[myTS])) 963 elif (myTS=='max'): 964 if(output_quantity=='stage'): 965 gridq=p2.stage.max(axis=0)[gridqInd] 966 if(output_quantity=='depth'): 967 gridq=p2.height.max(axis=0)[gridqInd] 968 gridq=gridq*(gridq>=0.) # Force positive depth (tsunami alg) 969 if(output_quantity=='velocity'): 970 gridq=p2.vel.max(axis=0)[gridqInd] 971 if(output_quantity=='depthIntegratedVelocity'): 972 swwDIVel=((p2.xmom**2+p2.ymom**2).max(axis=0))**0.5 973 gridq=swwDIVel[gridqInd] 974 if(output_quantity=='elevation'): 975 gridq=p2.elev[gridqInd] 976 if(output_quantity=='friction'): 977 gridq=p2.friction[gridqInd] 978 timestepString='max' 965 966 if(myTSi is 'max'): 967 timestepString='max' 968 else: 969 timestepString=str(round(p2.time[myTS])) 979 970 elif(myTS=='pointData'): 980 971 gridq=xyzPoints[:,2][gridqInd]
Note: See TracChangeset
for help on using the changeset viewer.