pyHDF_DSS.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:HaD-to-Py 作者: latomkovic 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号