-
Notifications
You must be signed in to change notification settings - Fork 49
Updates for DOLfYN: improved handling of "averaged" profiles, ADCP waves example, critical PSD bugfix #430
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
Conversation
…oneous estimation of first and last PSD in timeseries
akeeste
left a comment
There was a problem hiding this 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") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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:
dudz,dvdz, etc) can now utilize "vel_avg" if given as an input.calc_declinationwill 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
cpsdwas adding overlap via the "npad" input to thereshapefunction. 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.