def get_HDF_cell_WSE(hf, cell_number, flow_area):
with h5py.File(hdf_filename,'r') as hf:
flow_areas = hf['Results']['Unsteady']['Output']['Output Blocks']\
['Base Output']['Unsteady Time Series']['2D Flow Areas']
dataset = flow_areas[flow_area]['Water Surface']
timesteps = dataset.shape[0]
data_list = np.zeros((timesteps,), dtype='Float64')
dataset.read_direct(data_list, np.s_[0:timesteps,cell_number], np.s_[0:timesteps])
data_list = np.array(data_list).tolist()
return data_list
# This will go through all of the 1D and 2D observed points listed in the two_dim_coords and one_dim_comp_paths txt files
# Without those two files, the program will not run. This function returns data dictionaries for each gage
评论列表
文章目录