Commit f3b9780
Updates for DOLfYN: improved handling of "averaged" profiles, ADCP waves example, critical PSD bugfix (#430)
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
("<filename>_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.
---------
Co-authored-by: Adam Keester <72414466+akeeste@users.noreply.github.com>1 parent 323e741 commit f3b9780
10 files changed
Lines changed: 1767 additions & 211 deletions
File tree
- examples
- data/dolfyn
- test_data
- mhkit/dolfyn
- adp
- io
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
Large diffs are not rendered by default.
0 commit comments