Changeset 7766 for trunk/anuga_core/source/anuga/file/mux.py
- Timestamp:
- Jun 2, 2010, 1:15:38 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/file/mux.py
r7760 r7766 1 """ 2 Read a mux2 file. 3 """ 4 1 5 from anuga.utilities.numerical_tools import ensure_numeric 2 6 import numpy as num 3 7 4 8 ################################################################################ 5 9 # READ MUX2 FILES line of points 6 10 ################################################################################ 11 12 WAVEHEIGHT_MUX_LABEL = '-z-mux' 13 EAST_VELOCITY_LABEL = '-e-mux' 14 NORTH_VELOCITY_LABEL = '-n-mux' 7 15 8 16 WAVEHEIGHT_MUX2_LABEL = '-z-mux2' … … 43 51 # Convert verbose to int C flag 44 52 if verbose: 45 verbose =153 verbose = 1 46 54 else: 47 verbose =055 verbose = 0 48 56 49 57 if weights is None: … … 102 110 longitudes = num.zeros(number_of_selected_stations, num.float) 103 111 elevation = num.zeros(number_of_selected_stations, num.float) 104 quantity = num.zeros((number_of_selected_stations, parameters_index), num.float) 112 quantity = num.zeros((number_of_selected_stations, parameters_index), \ 113 num.float) 105 114 106 115 starttime = 1e16 … … 116 125 117 126 118 ##119 # @brief ??120 # @param mux_times ??121 # @param mint ??122 # @param maxt ??123 # @return ??124 def read_time_from_mux(mux_times, mint, maxt):125 """126 """127 127 128 if mint == None:129 mux_times_start_i = 0130 else:131 mux_times_start_i = num.searchsorted(mux_times, mint)132 133 if maxt == None:134 mux_times_fin_i = len(mux_times)135 else:136 maxt += 0.5 # so if you specify a time where there is137 # data that time will be included138 mux_times_fin_i = num.searchsorted(mux_times, maxt)139 140 return mux_times_start_i, mux_times_fin_i141 142 143
Note: See TracChangeset
for help on using the changeset viewer.