Skip to content

Commit

Permalink
Merge pull request #448 from aodn/2.5.28
Browse files Browse the repository at this point in the history
2.5.28
  • Loading branch information
ggalibert authored Jun 22, 2017
2 parents 6f5bbc9 + 24b1a9c commit 4efea08
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 27 deletions.
9 changes: 5 additions & 4 deletions AutomaticQC/imosSalinityFromPTQC.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
function [data, flags, paramsLog] = imosSalinityFromPTQC ( sample_data, data, k, type, auto )
%IMOSSALINITYFROMPTQC Flags salinity data which is flagged in pressure/depth and temperature.
%IMOSSALINITYFROMPTQC Flags salinity data which is flagged in pressure/depth, conductivity
% and temperature.
%
% Looks for highest flags from pressure/depth and temperature variables and give
% Looks for highest flags from pressure/depth, conductivity and temperature variables and give
% them to salinity
%
% Inputs:
Expand Down Expand Up @@ -105,9 +106,9 @@
% initialise all flags to non QC'd
flags = ones(lenData, 1, 'int8')*rawFlag;

% we look for flags from pressure and temperature data to give them
% we look for flags from pressure, conductivity and temperature data to give them
% to salinity as well
paramNames = {'DEPTH', 'PRES_REL', 'PRES', 'TEMP'};
paramNames = {'DEPTH', 'PRES_REL', 'PRES', 'TEMP', 'CNDC'};

for i=1:length(sample_data.(type))
% let's handle the case we have multiple same param distinguished by "_1",
Expand Down
19 changes: 10 additions & 9 deletions IMOS/finaliseData.m
Original file line number Diff line number Diff line change
Expand Up @@ -217,20 +217,21 @@
end

function sam = forceMonotonic(sam, mode)
% We make sure that DEPTH/TIME coordinate variables appear
% ordered and that there is no redundant value.
% We make sure that TIME coordinate variable appears
% ordered monotically and that there is no redundant value.
switch mode
case 'profile'
if strcmpi(sam.dimensions{1}.name, 'MAXZ'), return; end % this case produces non compliant files anyway

dimensionName = 'DEPTH'; % so far we only produce downcasts to be compliant
sortMode = 'ascend';
sortModeStr = 'increasingly';

case 'timeSeries'
dimensionName = 'TIME';
sortMode = 'ascend';
sortModeStr = 'increasingly';

otherwise
% we do nothing, profile data should already be ordered
% monotically either because pre-processing Tim Ingleton's
% protocol was followed using SeaBird software or because
% CTDDepthBinPP is being used in the toolbox for non binned
% profiles.
return;

end
iDim = getVar(sam.dimensions, dimensionName);
Expand Down
12 changes: 8 additions & 4 deletions Parser/readXR620.m
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@
data.(vars{k}) = data.(vars{k})/10;

%Temperature (Celsius degree)
case {'Temp', 'temp02'}, name = 'TEMP';
case {'Temp', 'temp02', 'temp12'}, name = 'TEMP';

%Pressure (dBar)
case {'Pres', 'pres20'}, name = 'PRES';
case {'Pres', 'pres20', 'pres21'}, name = 'PRES';

%Relative Pressure (dBar)
case {'pres08'}, name = 'PRES_REL';
Expand Down Expand Up @@ -514,7 +514,7 @@
data.(fields{k}) = data.(fields{k})/10;

%Temperature (Celsius degree)
case {'Temp', 'temp02'}, name = 'TEMP';
case {'Temp', 'temp02', 'temp12'}, name = 'TEMP';

%Pressure (dBar)
case {'Pres', 'pres08'}, name = 'PRES';
Expand Down Expand Up @@ -881,7 +881,11 @@
if isempty(strfind(data.Date{1}, '-'))
data.time = datenum(data.Date, 'yyyy/mmm/dd') + datenum(data.Time, 'HH:MM:SS.FFF') - datenum('00:00:00', 'HH:MM:SS');
else
data.time = datenum(data.Date, 'dd-mmm-yyyy') + datenum(data.Time, 'HH:MM:SS.FFF') - datenum('00:00:00', 'HH:MM:SS');
% Ruskin version number <= 1.12 date format 'dd-mmm-yyyy'
% Ruskin version number 1.13 date format 'yyyy-mm-dd'
% can either do some simple date format test or see if datenum
% can figure it out
data.time = datenum(data.Date) + datenum(data.Time, 'HH:MM:SS.FFF') - datenum('00:00:00', 'HH:MM:SS');
end
end

Expand Down
21 changes: 12 additions & 9 deletions Preprocessing/depthPP.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@

% get the toolbox execution mode
mode = readProperty('toolbox.mode');

depthVarType = 'variables';
isProfile = false;
switch mode
case 'profile'
depthVarType = 'dimensions';

otherwise
depthVarType = 'variables';
isProfile = true;

end

Expand Down Expand Up @@ -160,7 +161,7 @@
useItsOwnPresRel(iCurSam) = readDatasetParameter(sample_data{iCurSam}.toolbox_input_file, currentPProutine, 'useItsOwnPresRel', useItsOwnPresRel(iCurSam));

% look for nearest instruments with depth or pressure information
if isSensorHeight || isSensorTargetDepth
if ~isProfile && (isSensorHeight || isSensorTargetDepth)
% let's see if part of a mooring with pressure data from other
% sensors
for iOtherSam = 1:nDatasets
Expand Down Expand Up @@ -309,10 +310,12 @@
secondNearestInst(iCurSam) = readDatasetParameter(sample_data{iCurSam}.toolbox_input_file, currentPProutine, 'secondNearestInst', secondNearestInst(iCurSam));
end
else
fprintf('%s\n', ['Warning : ' sample_data{iCurSam}.toolbox_input_file ...
' please document either instrument_nominal_height or instrument_nominal_depth '...
'global attributes so that an actual depth can be '...
'computed from other pressure sensors in the mooring']);
if ~isProfile
fprintf('%s\n', ['Warning : ' sample_data{iCurSam}.toolbox_input_file ...
' please document either instrument_nominal_height or instrument_nominal_depth '...
'global attributes so that an actual depth can be '...
'computed from other pressure sensors in the mooring']);
end
continue;
end
end
Expand Down Expand Up @@ -353,7 +356,7 @@
end
end

if ~auto
if ~auto && ~isProfile
f = figure(...
'Name', 'Depth Computation',...
'Visible', 'off',...
Expand Down
2 changes: 1 addition & 1 deletion imosToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function imosToolbox(auto, varargin)
end

% Set current toolbox version
toolboxVersion = ['2.5.27 - ' computer];
toolboxVersion = ['2.5.28 - ' computer];

switch auto
case 'auto', autoIMOSToolbox(toolboxVersion, varargin{:});
Expand Down
Binary file modified imosToolbox_Linux64.bin
Binary file not shown.
Binary file modified imosToolbox_Win32.exe
Binary file not shown.
Binary file modified imosToolbox_Win64.exe
Binary file not shown.

0 comments on commit 4efea08

Please sign in to comment.