Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D3D #271

Merged
merged 35 commits into from
Nov 22, 2023
Merged

D3D #271

merged 35 commits into from
Nov 22, 2023

Conversation

browniea
Copy link
Contributor

@browniea browniea commented Oct 25, 2023

Added limits to variable_interpolation and added 3 array input capability to create_points

ssolson and others added 14 commits June 3, 2021 00:50
* delft 3d ploting function

* d3d flume data

* Reorganized headers

* Change Headers (#1)

* changing path to data following organizational update

* Reorganized headers

Co-authored-by: rpauly18 <rpauly@nrel.gov>
Co-authored-by: rpauly18 <50752018+rpauly18@users.noreply.github.com>

* center line section

* center line  update

* Add manual interpolation of variable

* automated interpolation

* adding xarray

* Used dataframe for slicing

* 3d interpolation in progress

* starting with minimal try/except statement

* added y interpolation

* interpolation looping fixed

* added z interpolation to centerline plots

* added z interpolation

* d3d with interpolation for irregular grid

* psuedo code for new function get_variable_points

* psuedo code for new function get_variable_points (#4)

* unknown changes

* adding warning

* retrying build

* removing warning

* trying new key

* editing .hscfg file

* trying a different os

* trying mac and windows

* adding nose install to windows

* modifting nostest call for windows

* undoing last commit

* trying pytest

* try again

* plots center line plot for input points

* added DataFrames

* reverting travis yml and upgrading h5pyd

* fixing typo

* re-adding warning message

* updated doc string

* added creat_points code for a contour plot

* updated creat_points centerlinea nd point logic

* updating virtual buoy results based on updated data (MHKiT-Software#107)

* adding plot def, still has errors

* Add files via upload

* finged plotting isses

* fixed plotting

* changed d3d.irregualar_grids to d3d.py

* added turbulence layers in get_all_data_points def

* added turbulent intensity def

* unneeded file

* updated turbulent intensity

* added unorm function and Turbulent intensity defal

* updated labeling

* Psuedo code for undefined points

Co-authored-by: browniea <eabrowning@alaska.edu>
Co-authored-by: rpauly18 <rpauly@nrel.gov>
Co-authored-by: rpauly18 <50752018+rpauly18@users.noreply.github.com>
Co-authored-by: Emily Browning <63879572+browniea@users.noreply.github.com>
Co-authored-by: Browning <eabrow@sandia.gov>
@browniea browniea marked this pull request as ready for review October 31, 2023 21:02
@ssolson ssolson self-requested a review November 3, 2023 16:48
@ssolson ssolson changed the title D3d D3D Nov 6, 2023
altered "test_create_points_three_points" and "test_create_points_user_made_two_arrays_one_point"
@ssolson ssolson merged commit 4eeb598 into MHKiT-Software:develop Nov 22, 2023
13 checks passed
@ssolson ssolson mentioned this pull request Apr 24, 2024
@browniea browniea deleted the d3d_umerc branch April 25, 2024 00:12
@ssolson ssolson mentioned this pull request May 6, 2024
ssolson added a commit that referenced this pull request May 8, 2024
# MHKiT v0.8.0
We're excited to announce the release of MHKiT v0.8.0, which brings a host of new features, enhancements, and bug fixes across various modules, ensuring compatibility with Python 3.10 and 3.11, and introducing full xarray support for more flexible data handling. Significant updates in the Wave and DOLfYN modules improve functionality and extend capabilities.

## Python 3.10 & 3.11 Support
MHKiT now supports python 3.10 and 3.11. Support for 3.12 will follow in the next minor update.
- #240


## Wave Module
### Enhancements:
**Automatic Threshold Calculation for Peaks-Over-Threshold**: We've introduced a new feature that automatically calculates the "best" threshold for identifying significant wave events. This method, originally developed by Neary, V. S., et al. in their 2020 study, has now been translated from Matlab to Python, enhancing our existing peaks-over-threshold functionality.

**Wave Heights Analysis**: A new function, `wave_heights`, has been added to extract the heights of individual waves from a time series. This function uses zero up-crossing analysis to accurately measure wave heights, improving upon our previous methods which only provided the maximum value between up-crossings.

**Enhanced Zero Crossing Analysis**: Building on the above, the zero crossing code previously embedded in `global_peaks` has been isolated into a helper function. This modular approach not only refines the codebase but also supports new functionalities such as calculating wave heights, zero crossing periods, and identifying crests.

### Bug Fixes:
**Contour Sampling Error in Wave Contours**: A bug identified in `mhkit.wave.contours.samples_contour` has been resolved. The issue occurred when period samples defined using the maximum period resulted in values outside the interpolation range of the contour data. This was corrected by ensuring that all sampling points are within the interpolation range and adjusting the contour data selection process accordingly.

- #268 
- #252 
- #278


## Xarray Support
MHKiT functions now fully support the use of xarray for passing and returning data.

- #279 
- #282
- #285
- #302
- #310


## DOLfYN

Thanks to the many user contributions and users of MHKiT the DOLFYN module include a significant number of enhancements and bug fixes. 

### Enhancements:
**Altimeter Support**: Enhanced the Nortek Signature Reader to add capability for reading ADCP dual profile configurations.

**Data Handling Improvements**: Introduced logic to skip messy header data that can accumulate during measurements collected via Nortek software on PCs and Macs.

**Instrument Noise Subtraction**: Added a function to subtract instrument noise from turbulence intensity estimation using RMS calculations, providing results that differ by approximately 1% from the existing standard deviation-based "I" property.

**Improved File Handling**: Updates for RDI files to handle changing "number of cells" and variable "cell sizes," which are now bin-averaged into the largest cell size.

### Bug Fixes:
**Power Spectra Calculation**: Fixed a bug where a given noise value was not being subtracted from the power spectra, and noise was inadvertently added as an input to dissipation rate calculations.

**Improved Header Handling**: Allowed RDI reader to skip junk headers effectively.

**Nortek Reader C Types Update**: Adjusted C types in the Nortek reader to handle below-zero water temperatures and to allow pitch and roll values to go negative.


- #280 
- #289
- #290
- #292
- #293
- #294
- #299


## River & Tidal: D3D
Added limits to `variable_interpolation` and added 3 array input capability to `create_points`
- #271

## Developer Experience
### Black formatting
Black formatting is now enforced on all MHKiT files. This ensures consistent formatting across the MHKiT package.
- #281

### Linting & Type Hints
MHKiT is in the process of enforcing pylint and adding type hints to all functions. Currently this has been achieved and is enforced in the Loads and Power modules.
- #288 
- #296 

### CI/CD
This release introduces significant reduction in testing time for development. This is achieved by reducing the number of tests for pulls against the develop branch and only running hindcast test when changes are made to it. A bug in the hindcast CI was fixed which only ran on changes to the hindcast tests instead of the hindcast module. Additionally the wave and wind hindcast needed to be separated in 2 jobs due to the excessive time taken to run a wind cache. This created a number of follow on PRs around solidifying the logic of these job. A special case for Python 3.8, pip, and Mac OS was added to use homebrew to install NetCDF and HDF5 to get tests to pass.
- #241
- #270
- #306
- #311
- #317
- #318
- #319
- #320
- #324

### Clean Up
MHKiT fixed an implementation error where functions used assert instead of built in errors for type and value checking. Additionally these PRs removed unused files, fixed typos, and created an argument which allows users to run CDIP API calls silently.
- #276
- #272
- #273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants