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

Tidal power performance #236

Merged
merged 23 commits into from
Aug 11, 2023
Merged

Tidal power performance #236

merged 23 commits into from
Aug 11, 2023

Conversation

jmcvey3
Copy link
Contributor

@jmcvey3 jmcvey3 commented Apr 14, 2023

Tidal power performance capabilities specified in IEC/TS 6200-200.

TODOs left:

  • Add "assertions" to input arguments
  • Add tests
  • Flesh out jupyter notebook example
  • Extend profiles to seafloor and surface

I would appreciate a second set of eyes and would be happy to discuss interpretation of the standards. The mathematical section is not well written, and I was relying on information conveyed in the text and plots in the appendix to figure out what was being asked. (My TS copy is heavily loaded with comments and corrections to keep track of things).

Also includes bugfixes, docstring clarifications, and useability edits for the Tidal module in general that I came across from a users standpoint. Changelog as follows:

  • Bugfixes:
    - Standardized function inputs to accept both numpy.ndarrays and pandas.Series (some functions already have this implemented).
    - Fixed assertions so that if a numpy array is supplied, the following assertions that rely on pandas don't fail (some functions already have this implemented).
    - Added a (temporary) fix so that assertions can handle nans
    - Fixed river.performance capture area calculation the multiplies by instead of dividing by 4.
    - Fixed a misnamed variable in tidal.performance.principal_flow_directions.
    - Corrected the "Returns" statement in the tidal.performance.principal_flow_directions docstring and added a "Notes" section.

  • API/useability
    - Added 'ax' argument passthrough to tidal.graphics.plot_rose and tidal.graphics.plot_joint_prob_distribution to enable more complex matplotlib capabilities outside of the function.
    - Added check and updated docstring in tidal.performance.principal_flow_directions to make sure directions are between 0 and 360 degrees, which the function requires.

@jmcvey3 jmcvey3 added enhancement New feature or request tidal module labels Apr 14, 2023
@ssolson ssolson linked an issue May 8, 2023 that may be closed by this pull request
3 tasks
@ssolson ssolson self-requested a review May 8, 2023 19:45
@jmcvey3
Copy link
Contributor Author

jmcvey3 commented May 25, 2023

@ssolson This should be ready for review

Also, the tests are failing because of something I thought it an error in river.performance.py capture area functions: the area of a circle is 1/4 pi d^2, not sure if the original 4 pi d^2 is an error or not

@jmcvey3
Copy link
Contributor Author

jmcvey3 commented Jun 13, 2023

@ssolson I just remembered there are some changes in the dolfyn PR (namely to the function/shortcut dolfyn.velocity.U_dir) that will affect this one. I'll try to wrap the dolfyn PR soon here so we can merge these back to back.

Copy link
Contributor

@ssolson ssolson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

James I still need to review the example notebooks which I will get to later next week.

mhkit/tidal/resource.py Show resolved Hide resolved
mhkit/tidal/graphics.py Outdated Show resolved Hide resolved
mhkit/tidal/graphics.py Outdated Show resolved Hide resolved
mhkit/tidal/graphics.py Outdated Show resolved Hide resolved
mhkit/tidal/graphics.py Outdated Show resolved Hide resolved
mhkit/tidal/graphics.py Outdated Show resolved Hide resolved
mhkit/tidal/performance.py Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created a PR to address the change needed for this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged

@jmcvey3
Copy link
Contributor Author

jmcvey3 commented Aug 3, 2023

@ssolson This one should also be good to merge in if you want to give it one more review

@ssolson
Copy link
Contributor

ssolson commented Aug 4, 2023

@jmcvey3 merging #232 created a conflict with the adcp example.

I created PR jmcvey3#5 on your branch which resolves the issue.

@jmcvey3
Copy link
Contributor Author

jmcvey3 commented Aug 7, 2023

Thanks @ssolson - made some last fixes to the notebooks

@ssolson
Copy link
Contributor

ssolson commented Aug 11, 2023

All tests pass excluding hindcast. Hindcast functionality was not changed in this PR.
image

@ssolson ssolson merged commit 5e0aed8 into MHKiT-Software:develop Aug 11, 2023
@ssolson ssolson mentioned this pull request Aug 11, 2023
ssolson added a commit that referenced this pull request Aug 11, 2023
**MHKiT 0.7.0 Release Notes**

This release introduces exciting new features and improvements to the MHKiT package:

- **Mooring Module**: We are pleased to introduce the new mooring module. This addition primarily supports outputs from MoorDyn. Within this module, users can:
  - Import data
  - Calculate lay length
  - Visualize mooring line movements in 2D and 3D with graphical animations.
  
  Accompanying this module is an example notebook to guide users on its functionalities.

- **Dolfyn Module Revamp**: The Dolfyn module has been overhauled. Enhancements include:
  - Turbulence calculation capability
  - Performance measures for tidal power as outlined in IEC/TS 6200-200.

- **New Contributions**: A big shoutout to our community member, @mbruggs, for adding the ability to compute surface elevation using IFFT.

- **NDBC Buoy Metadata**: Users can now fetch NDBC buoy metadata directly through MHKiT.

- **Delft3D Module Update**: Stay up to date with support for the latest Delft3D NetCDF format.

**Additions**
- #235
- #232 
- #236 
- #250
- #239
- #248

**Bug Fixes**
- #226 
- #238

**Meta/Minor Changes**
- #220
- #243
- #225 
- #231
- #224

Thank you to all of the contributers who helpped with this release:
@mbruggs @Graham-EGI @castillocesar @jmcvey3 @hivanov-nrel  @browniea @cmichelenstrofer @akeeste  @maxwelllevin @rpauly18 @ssolson
@jmcvey3 jmcvey3 deleted the tidal_prf branch October 3, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tidal module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tidal Power Performance Functions
2 participants