process glider AD2CP data
Project description
gliderad2cp
gliderad2cp processes data from the Nortek AD2CP acoustic doppler current profiler (ADCP) mounted on a glider. gliderad2cp takes data from the ADCP unit and the glider and combines them to produce estimates of vertical shear of velocity. It also prodives functionality to integrate these velocity shear profiles into absolute earth relative water vlocities.
Installation
gliderad2cp can be installed with pip
python -m pip install gliderad2cp
Usage
gliderad2cp requires 2 inputs:
- A netcdf (.nc) file of Nortek AD2CP data as output by the Nortek MIDAS post-processing software. This software should be procured from Nortek.
- Glider data in a timeseries csv or parquet file (.pqt) file with the following variables: ["time", "temperature", "salinity", "latitude", "pressure", "longitude", "profile_number", "declination", ]
N.B. if declination data are not present in the datafile, they can be added with the function process_adcp.get_declination
.
The primary functionality of gliderad2cp is to produce a gridded dataset of velocity shear using data from the glider and AD2CP. This is achieved with two steps:
from gliderad2cp import process_adcp
adcp_file_path = "path/to/adcp/files"
glider_file_path = "path/to/glider/files"
ds_adcp, df_glider = process_adcp.shear_from_adcp(adcp_file_path, glider_file_path)
ds_shear = process_adcp.grid_shear(ds_adcp, df_glider)
shear_from_adcp
Returns an xarray dataset of gridded ADCP data in 3 coordinate systems (beam, XYZ and ENU) and a pandas dataframe of glider data
grid_shear
Combines the ADCP and glider data into a gridded xarray dataset with velocity shear binned on a per-glider profile basis at 1 m vertical resolution.
Additionally, the function velocity_from_shear
can be used to estimate absolute velocity profiles:
ds_vel = process_adcp.velocity_from_shear(adcp_file_path, glider_file_path, ds_adcp, df_glider)
This requires estimates of speed through water and the following additional variables in the glider file: ["speed_vert", "speed_horz", "dead_reckoning", "nav_resource", "dive_number"]
Additional options
By default, the following options are used during processing:
default_options = {
'debug_plots': True,
'correctADCPHeading': True,
'ADCP_discardFirstBins': 0,
'ADCP_correlationThreshold': 70,
'ADCP_amplitudeThreshold': 75,
'ADCP_velocityThreshold': 0.8,
'correctXshear': False,
'correctYshear': False,
'correctZshear': False,
'correctZZshear': False,
'ADCP_regrid_correlation_threshold': 20,
'plots_directory': 'plots',
}
These options can be changed by using the options
kwarg in the relevant functions.
These utility functions can be controlled with much greater granularity by calling their constittuent functions individually. This process is detailed in the two example notebooks.
Notebooks
Notebook 01_calculate_velocity_shear.ipynb
demonstrates the core functionality of gliderad2cp. It takes a glider timeseries and a netCDF file created by a Nortek MIDAS from AD2CP data and produces a gridded dataset of velocity shear
Notebook 02_integrate_velocity_shear.ipynb
shows one method of integrating this velocity shear into earth relative absolute velocities.
Both notebooks use data hosted on zenodo, downloaded with pooch. The datasets can be downloaded here https://zenodo.org/record/8431329
Contributing
gliderad2cp welcomes contributions. Feel free to submit an Issue or Pull Request if you have recommendations or have experienced issues with the package. Please see the community guidelines, CONTRIBUTING.md and make use of the Issue and Pull Request templates.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gliderad2cp-0.0.7.tar.gz
.
File metadata
- Download URL: gliderad2cp-0.0.7.tar.gz
- Upload date:
- Size: 7.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f87b73bc742a2173929130b552bdbd5503a7ad36b28f02383c6394b75556c341 |
|
MD5 | d55a42485038a087cd1daaa98171e14b |
|
BLAKE2b-256 | 32eb817a1580428a0522e0ff81d6b59833fa48567ea744bc6310b55b1697500a |
File details
Details for the file gliderad2cp-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: gliderad2cp-0.0.7-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6587b1e4243237c556102bd27fbfc33b829bc258a0e4864fdeaee0a7b192737 |
|
MD5 | 993faffcc81f2cde5b1bc2a05bb2174e |
|
BLAKE2b-256 | 54180b074d460b713997903dcb8158e149b4eb09399cc6cd25a0933447fb057f |