Skip to content

Commit

Permalink
Merge pull request #430 from aodn/2.5.26
Browse files Browse the repository at this point in the history
2.5.26
  • Loading branch information
ggalibert committed May 22, 2017
2 parents d228ae1 + 855adea commit 9ac27d5
Show file tree
Hide file tree
Showing 13 changed files with 2,267 additions and 952 deletions.
2 changes: 1 addition & 1 deletion IMOS/imosParameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ SLC2, 1, moles_of_silicate_per_unit_mass_in_sea_water,
SNR1, 0, signal_noise_ratio_from_acoustic_beam_1, decibel, , , A, 999999.0, 0.0, 150.0, float
SNR2, 0, signal_noise_ratio_from_acoustic_beam_2, decibel, , , A, 999999.0, 0.0, 150.0, float
SNR3, 0, signal_noise_ratio_from_acoustic_beam_3, decibel, , , A, 999999.0, 0.0, 150.0, float
SPCT, 0, awac_spectra_calculation_method, , , , , , , , char
SPCT, 0, awac_spectra_calculation_method, , , , , , , , byte
SPEC_CNDC, 0, sea_water_specific_electrical_conductivity, S m-1, , , C, 999999.0, 0.0, 50000.0, float
SRAD, 1, isotropic_shortwave_radiance_in_air, W m-1 sr-1, , , F, 999999.0, , , float
SSDS, 0, sea_surface_wave_directional_spread, degree, clockwise, true north, W, 999999.0, 0.0, 360.0, float
Expand Down
4 changes: 2 additions & 2 deletions NetCDF/template/spct_attributes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ N, accuracy =
N, precision =
N, resolution =
S, cell_methods =
S, spectra_method_values = 0 1 3
S, spectra_method_meanings = Pressure Velocity Acoustic_Surface_Tracking
S, flag_values = 0 1 3 9
S, flag_meanings = Pressure Velocity Acoustic_Surface_Tracking Unknown
53 changes: 44 additions & 9 deletions Parser/aquadoppProfilerParse.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,29 @@
if isfield(structures, 'Id42')
% this is a HR profiler velocity data
profilerType = 'Id42';
if ~strfind(hardware.instrumentType,'HR')
fprintf('%s\n', ['Warning : ' filename ' HR PROFILER instrumentType does not match Id42 sector type data']);
end
else
% this is a plain profiler velocity data
profilerType = 'Id33';
if strfind(hardware.instrumentType,'HR')
fprintf('%s\n', ['Warning : ' filename ' AQUADOPP PROFILER instrumentType does not match Id33 sector type data']);
end

end

% still to be implemented
value = bin2dec(num2str(bitget(user.TimCtrlReg, 7:-1:6)));
switch value
case 0
user.TimCtrlReg_PowerLevel_ = 'HIGH';
case 1
user.TimCtrlReg_PowerLevel_ = 'HIGH-';
case 2
user.TimCtrlReg_PowerLevel_ = 'LOW+';
case 3
user.TimCtrlReg_PowerLevel_ = 'LOW';
end

velocityProcessed = false;
Expand Down Expand Up @@ -102,6 +122,15 @@
cellSize: ...
blankDist + (ncells-1) * cellSize)';

%
velocityScaling = 1;
if bitget(user(1).Mode, 5) == 1
velocityScaling = 0.1;
end
if strfind(hardware(1).instrumentType, 'HR_PROFILER')
sampleRate = double(512 / user(1).T5);
end

% Note this is actually the distance between the ADCP's transducers and the
% middle of each cell
% See http://www.nortek-bv.nl/en/knowledge-center/forum/current-profilers-and-current-meters/579860330
Expand Down Expand Up @@ -163,18 +192,18 @@
roll = roll / 10.0;
pressure = pressure / 1000.0;
temperature = temperature / 100.0;
velocity1 = velocity1 / 1000.0;
velocity2 = velocity2 / 1000.0;
velocity3 = velocity3 / 1000.0;
velocity1 = velocity1 * velocityScaling / 1000.0;
velocity2 = velocity2 * velocityScaling / 1000.0;
velocity3 = velocity3 * velocityScaling / 1000.0;

if velocityProcessed
% velocity has been processed
% velocities / 1000.0 (mm/s -> m/s) assuming earth coordinates
% 20*log10(sig2noise) (counts -> dB)
% direction / 100.0 (0.01 deg -> deg)
velocity1 = velocity1Proc / 1000.0; % we update the velocity
velocity2 = velocity2Proc / 1000.0;
velocity3 = velocity3Proc / 1000.0;
velocity1 = velocity1Proc * velocityScaling / 1000.0; % we update the velocity
velocity2 = velocity2Proc * velocityScaling / 1000.0;
velocity3 = velocity3Proc * velocityScaling / 1000.0;
sig2noise1(sig2noise1==0) = NaN;
sig2noise2(sig2noise2==0) = NaN;
sig2noise3(sig2noise3==0) = NaN;
Expand All @@ -189,16 +218,22 @@
verticalDist = verticalDist / 1000.0; % since verticalDist is uint16, max value gives 65m but distance along beams can go up to 170m...???
end

if strfind(hardware.instrumentType, 'HR')
instrument_model = 'HR Aquadopp Profiler';
else
instrument_model = 'Aquadopp Profiler';
end

sample_data = struct;

sample_data.toolbox_input_file = filename;
sample_data.meta.featureType = ''; % strictly this dataset cannot be described as timeSeriesProfile since it also includes timeSeries data like TEMP
sample_data.meta.head = head;
sample_data.meta.hardware = hardware;
sample_data.meta.user = user;
sample_data.meta.binSize = cellSize;
sample_data.meta.instrument_make = 'Nortek';
sample_data.meta.instrument_model = 'Aquadopp Profiler';
sample_data.meta.instrument_model = instrument_model;
sample_data.meta.instrument_serial_no = hardware.SerialNo;
sample_data.meta.instrument_firmware = hardware.FWversion;
sample_data.meta.instrument_sample_interval = median(diff(time*24*3600));
Expand All @@ -207,7 +242,7 @@
sample_data.meta.beam_to_xyz_transform = head.TransformationMatrix;

% add dimensions with their data mapped
adcpOrientations = bin2dec(status(:, end));
adcpOrientations = single(bitget(status, 1, 'uint8'));
adcpOrientation = mode(adcpOrientations); % hopefully the most frequent value reflects the orientation when deployed
height = distance;
if adcpOrientation == 1
Expand Down
2 changes: 1 addition & 1 deletion Parser/awacParse.m
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
sample_data.meta.beam_to_xyz_transform = head.TransformationMatrix;

% add dimensions with their data mapped
adcpOrientations = bin2dec(status(:, end));
adcpOrientations = single(bitget(status,1,'uint8'));
adcpOrientation = mode(adcpOrientations); % hopefully the most frequent value reflects the orientation when deployed
height = distance;
if adcpOrientation == 1
Expand Down
2 changes: 1 addition & 1 deletion Parser/continentalParse.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
sample_data.meta.beam_to_xyz_transform = head.TransformationMatrix;

% add dimensions with their data mapped
adcpOrientations = bin2dec(status(:, end));
adcpOrientations = single(bitget(status,1,'uint8'));
adcpOrientation = mode(adcpOrientations); % hopefully the most frequent value reflects the orientation when deployed
height = distance;
if adcpOrientation == 1
Expand Down
4 changes: 2 additions & 2 deletions Parser/readAWACWaveAscii.m
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
waveData.Temperature(iHeader) = header(:,17);
clear header iHeader;

waveData.SpectraType = num2str(zeros(nTime, 1, 'uint16'));
waveData.SpectraType = 9*ones(nTime, 1, 'uint8');
waveData.SignificantHeight = nan(nTime, 1);
waveData.MeanZeroCrossingPeriod = nan(nTime, 1);
waveData.PeakPeriod = nan(nTime, 1);
Expand All @@ -240,7 +240,7 @@
waveData.MeanPressure = nan(nTime, 1);
waveData.UnidirectivityIndex = nan(nTime, 1);

waveData.SpectraType(iWave) = num2str(wave(:,7));
waveData.SpectraType(iWave) = wave(:,7);
waveData.SignificantHeight(iWave) = wave(:,8);
waveData.PeakPeriod(iWave) = wave(:,14);
waveData.MeanZeroCrossingPeriod(iWave) = wave(:,15);
Expand Down
Loading

0 comments on commit 9ac27d5

Please sign in to comment.