Package: gliderad2cp
gliderad2cpgliderad2cp 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.Installationgliderad2cp can be installed with pippython -m pip install gliderad2cpUsagegliderad2cp 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 functionprocess_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:fromgliderad2cpimportprocess_adcpadcp_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_adcpReturns an xarray dataset of gridded ADCP data in 3 coordinate systems (beam, XYZ and ENU) and a pandas dataframe of glider datagrid_shearCombines 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 functionvelocity_from_shearcan 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 optionsBy 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 theoptionskwarg 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.NotebooksNotebook01_calculate_velocity_shear.ipynbdemonstrates 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 shearNotebook02_integrate_velocity_shear.ipynbshows one method of integrating this velocity shear into earth relative absolute velocities.Both notebooks use data hosted on zenodo, downloaded withpooch. The datasets can be downloaded herehttps://zenodo.org/record/8431329Contributinggliderad2cp 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.