Skip to content

Conversation

@simmsa
Copy link
Contributor

@simmsa simmsa commented Sep 3, 2025

This PR takes the wave module code from PR #167 but specifically excludes short_term_extreme.m changes which are failing tests and require additional effort.

List of changes:

  • wave/resource/standardize_wave_spectra_frequency.m:
    • New helper function to standardize frequency filtering and shaping for all wave resource functions
    • Uses arguments block for input validation
  • wave/resource/frequency_moment.m:
    • Converted to native MATLAB
    • Uses arguments block for input validation
  • wave/resource/energy_period.m:
    • Converted to native MATLAB
    • Uses frequency_moment function
    • Uses arguments block for input validation
  • wave/resource/significant_wave_height.m:
    • Converted to native MATLAB
    • Uses frequency_moment function
    • Uses arguments block for input validation
  • wave/resource/jonswap_spectrum.m:
    • Converted to native MATLAB
    • Uses arguments block for input validation
    • Uses standardize_wave_spectra_frequency helper
  • wave/resource/pierson_moskowitz_spectrum.m:
    • Converted to native MATLAB
    • Uses arguments block for input validation
    • Now uses jonswap_spectrum with gamma=1 implementation
  • wave/resource/surface_elevation.m:
    • Converted to native MATLAB
    • Uses same ifft method as MHKiT-Python
    • Uses arguments block for input validation
  • examples/SWAN_example.{m, mlx, html}
    • Remove examples from input file path
  • examples/wave_example.{m, mlx, html}
    • Remove examples from input file path

Copy link
Contributor

@MShabara MShabara left a comment

Choose a reason for hiding this comment

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

@simmsa The PR looks good to me after review. I made minor modifications to some of the examples—if everything looks good on your end, feel free to go ahead and merge it.

@simmsa
Copy link
Contributor Author

simmsa commented Sep 9, 2025

@MShabara sounds good! Thank you for taking a look. I just need to update the changelog and then I will merge this.

@simmsa simmsa force-pushed the ndbc_examples_wave_module_only branch from f58ae31 to 6dc9b36 Compare September 23, 2025 00:30
@simmsa simmsa marked this pull request as ready for review September 23, 2025 13:24
@simmsa simmsa merged commit 23f8381 into MHKiT-Software:develop Sep 23, 2025
30 checks passed
This was referenced Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants