Reference Layer Calculations
(contains instructions for "refsm")
The ADCP only measures the velocity of the water past the package. Since
the instrument is mounted under a ship, most of what it measures is the negative
of the ship speed. If we remove the ship's speed from the measured
velocity (i.e. add it to the measured velocity), the part remaining is the
ocean velocity. In reality, this is a bit complicated. Navigation
fixes are used to calculate the ship's velocity, but this calculation can
have varying amounts of noise depending on what kind of navigation is used.
We use the assumption that "the ocean velocity in a reference layer
should vary slowly" to correct the navigation fixes. The ocean velocity
in a reference layer is the measured velocity in that reference layer plus
the ship's velocity (which, in turn, comes from the navigation fixes). Any
jumps in the reference layer velocity must come from jumps in the navigation.
So, we use the positions to calculate the ship's velocity, determine
the reference layer velocity, and then attempt to move the positions slightly
to obtain a smooth reference layer velocity. In the end, we have a smooth
ocean reference layer velocity and a new collection of (slightly different)
navigation points for each ensemble. These positions are put back into
the database and are used for all subsequent calculations of ship speed,
and hence ocean velocity.
NOTE: "refsm" only replaces the smoothed navigation calculation. Watertrack
(regular or reciprocal) and reference layer plots still require you to run
the other three steps. Just remember to put the correct smoothed navigation
output in your "putnav.cnt" file.
smoothed navigation: the original scheme
In process.txt, the steps are laid out as:
(1) adcpsect adcpsect.cnt (extract time and measured velocity in the
reference layer)
(2) refabs refabs.cnt (create a text file with time, position and
ocean reference layer velocity)
(3) smoothr smoothr.cnt (read previous two files and create new (smoothed)
positions)
(4) putnav putnav.cnt (put the positions from "smoothr" into the database).
Advantages: complicated algorithm is specifically designed for older, less
frequent navigation fixes.
Disadvantages: Simple vertical mean does not cope with rapidly changing penetration
(for instance, due to steeply sloping topography or signal deterioration)
smoothed navigation: the new scheme
(1) smoothed navigation is created by one matlab program, "refsm".
(2) putnav putnav.cnt (put the positions from "refsm" into the database).
NOTES:
(1) refsm is run as follows:
- go to the nav/ subdirectory of your processing tree, and create a file
called "refsm.m", and edit it for your own cruise:
%%% begin refsm stub here.
%%% This file initializes a few variables and then runs the real engine.
yearbase = 1999;
% yearbase for decimal day calculations
dbname = 'a9902';
% do not include the path, just use the
name
fixfile = 'a9902.ags';
% position file: must have [dday, lon, lat]
%%% end of section to be edited by user %%
% add the matlab/codas3 directory
adcppath
%now call the engine, refsm_core
refsm_core(dbname, fixfile, yearbase);
%%% end of refsm
- then run it as "refsm" from a matlab window. It may take a while
- Look at the refsm output on the matlab screen. If there are isolated
navigation points being interpolated, that's OK. However, if you see
a group of positions being interpolated, you should fill the navigation file
with better estimates, OR if it's really bad, you'll have to go back to smoothr.
Disadvantages: Simple interpolation for missing fixes can cause bogus
values (do not use if navigation has gaps)
Advantage: Reference layer calculation includes a vertically dependent mean
profile as well as the time-dependent part used to calculate ocean velocity,
making a more robust calculation in the presence of rapidly changing data
penetration (for instance, due to steeply sloping topography or signal deterioration)