Skip to content

Conversation

@jmcvey3
Copy link
Contributor

@jmcvey3 jmcvey3 commented Dec 8, 2025

Collection of bugfixes and documentation for Nortek Signature ADCPs.
I received a dual-profile datafile from a Nortek Signature250 deployed at PacWave that was collecting both water velocity and wave measurements, and I made some updates to the codebase when things would fail working through the standard ADCP workflow.

DOLfYN is currently set up to return individual profiles as individual datasets, so there is one dataset containing the wave-relevant variables, and one containing the water velocity variables. Both datasets contain water velocity information, so to differentiate between the two, the "_avg" tag is added to the dataset containing what Nortek calls the "averaging" profile. However, this dataset no longer comes out of the box "bin-averaged"; individual pings from each duty cycle are now saved in the output file.

I've been making updates to dolfyn so that the codebase will recognize "_avg" variables and default to them if untagged variables do not exist. The following updates are the latest:

  • The "U_mag" and "U_dir" shortcuts will using "vel_avg" to calculate speed and direction if "vel" does not exist in the dataset.
  • The shear functions in the ADCP turbulence API (dudz, dvdz, etc) can now utilize "vel_avg" if given as an input.
  • calc_declination will no longer complain if you try to update the magnetic declination in the Nortek-created bin-averaged binary file ("_avgd.ad2cp")

Two, I created an example notebook showing how to calculate wave statistics using DOLfYN's FFT tools. We've gotten questions about this in the past, and now that I have a good dataset, this is a good time to document this.

Three, I found a bug in the PSD functions where individual FFTs get a 50% overlap not once, but twice. The core FFT function applies a 50% overlap using a series of "for loops" (the more robust method), while the input FFT function cpsd was adding overlap via the "npad" input to the reshape function. This latter method pads the first and last FFT with a lot of zeros, which in turn corrupts the first and last spectrum of a timeseries. It appears the latter method was written first and improved upon via the second method and should have been removed. Removing it fixes said bug.

@jmcvey3 jmcvey3 marked this pull request as draft December 8, 2025 23:41
@akeeste akeeste self-requested a review December 9, 2025 17:31
@jmcvey3 jmcvey3 marked this pull request as ready for review December 10, 2025 23:56
@jmcvey3
Copy link
Contributor Author

jmcvey3 commented Dec 11, 2025

@akeeste @simmsa This is at a good point for review. I'm happy to take feedback on the example notebook I added here

Copy link
Contributor

@akeeste akeeste left a comment

Choose a reason for hiding this comment

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

Thanks @jmcvey3, great example notebook! I found it very clear and easy to walk through.

- earth: east
- principal: streamwise
"""
return self.ds["vel"][0].drop_vars("dir")
Copy link
Contributor

Choose a reason for hiding this comment

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

In your first comment you mention defaulting to average quantities if they exist. This will default to returning non avg velocity components. Is this intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, no, I edited the first comment to say "will return "avg" variables if untagged variables do not exist

@jmcvey3 jmcvey3 merged commit f3b9780 into MHKiT-Software:develop Jan 12, 2026
58 checks passed
@jmcvey3 jmcvey3 deleted the avg-profile-bugfixes branch January 12, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants