jessecusack / vmpproc

Wrapper around Rockland's ODAS toolbox to simplify VMP processing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VMP processing toolbox

Requirements

  • odas - a proprietary matlab package written by Rockland Scientific Instruments
  • gsw - the latest Gibbs Sea Water thermodynamic toolbox

Usage

Processing follows three steps:

  1. Convert Rockland's raw .p file format into a series of .mat profiles using generate_diss_profiles.
  2. Depth bin average the generated profiles using generate_binned_profiles. Bin averaging is performed using the arithmetic mean for all quantities.
  3. Combine the binned profiles into one dataset using join_binned.

See scripts in the examples directory for templates that apply these functions.

Data stored as .mat may be converted into a (mostly) CF compliant netCDF file using binned_to_netcdf for binned data or profile_to_netcdf for profile data.

The parameters of the dissipation calculation, such as fft_length, diss_length, etc. are set via the info struct. The default info struct is generated by the function get_info.m. It is recommended to modify the default values in the processing, e.g.

pFile = "example.p"
saveDir = "proc"
info = get_info();
info.overwrite = false;
info.pMin = 1;
info.diss_length = 1024;
info.fft_length = 512;
generate_diss_profiles(pFile, saveDir, info=info);

GPS information may also be included when generating profiles. This must take the form of a struct with the fields lon, lat, and optionally, time. E.g.

generate_diss_profiles(pFile, saveDir, info=info, gps=gps);

If no GPS data is provided then default longitude and latitude are used in the thermodynamic calculations.

Future developments

The code to optimize dissipation calculations for the bottom boundary layer is still in progress and is yet to be implemented. The essential code is contained in find_impact, which searches for the moment of VMP impact with the sea floor using vertical velocity and accelerometer data. Once the index of the deepest data is identified the profile is trimmed to maximize data retention in the bottom boundary (a small amount of data near the top of the profile may be lost).

About

Wrapper around Rockland's ODAS toolbox to simplify VMP processing


Languages

Language:MATLAB 100.0%