MHKiT-Software / MHKiT-Python

MHKiT-Python provides the marine renewable energy (MRE) community tools for data processing, visualization, quality control, resource assessment, and device performance.
https://mhkit-software.github.io/MHKiT/
BSD 3-Clause "New" or "Revised" License
47 stars 45 forks source link

Delft 3D Turbulent Intensity Function #171

Open browniea opened 2 years ago

browniea commented 2 years ago

Describe the bug:

The Turbulent Intensity Function runs slow when a large data set in input.

To Reproduce:

d3d_data = netCDF4.Dataset('tanana50_map.nc') data x_centerline = np.linspace(xmin, xmax, num=100) y_centerline = np.mean([ymin,ymax]) z_centerline = np.mean([zmin,zmax]) centerline_points = d3d.create_points(x_centerline, y_centerline, z_centerline)

TI=d3d.turbulent_intensity(d3d_data, points= centerline_points ,intermediate_values = True)

Expected behavior:

Adding a slicing function to limit the data size processed through the function will speed up function.