MHKiT-Software / MHKiT-MATLAB

MHKiT-MATLAB 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
15 stars 23 forks source link

WDRT functionality: Short and Long Term Extremes #98

Open Alex-McVey opened 2 years ago

Alex-McVey commented 2 years ago

Companion to PR#96

This PR is to integrate the WDRT functionality that exists in python for matlab users. The functions will be written as standalone matlab code and will not depend on the python repository.

Alex-McVey commented 1 year ago

This PR is ready for review

rpauly18 commented 1 year ago

@Alex-McVey I am OK with the classes if you can do two things: 1) Figure out how the class function will show up in the documentation. Since we show the class in action in the example, we should include it in the documentation page 2) The first time the class is called in the example provide a bit of discussion explaining how the call works

Otherwise on this PR, please still verifyy that different systems will not have issues with the solution converging as I did.

Lastly, is there still a plan to add long-term extremes to this PR as well?

Alex-McVey commented 1 year ago

@rpauly18 long term extreme seems like a pretty small extension of the short term extreme solution and I will be adding it, I was just waiting to see if we wanted to shift directions on the class situation for STE first. Thanks for reviewing

Alex-McVey commented 1 year ago

Just as a note: this PR now contains part of the wave.contours module that I added for the long term extreme sample problem

Alex-McVey commented 1 year ago

This PR now also contains edits to the jonswap spectrum and surface elevation algorithms to remove python dependencies. Any other matlab code that calls python and returns very small numbers should be examined to make sure the numbers line up between matlab and python (I found that they did not for the above functions).

Additionally, this PR is now ready for final review and merge with the exception of a test for long term extreme. In python we utilize a scipy.stats._continuous_distns function to test and the equivalent Matlab function is locked behind a Toolbox. I'm open to suggestions or we can push this forward without that test.