diff --git a/AutomaticQC/imosSalinityFromPTQC.m b/AutomaticQC/imosSalinityFromPTQC.m index bc26aa894..3ba1c9fbc 100644 --- a/AutomaticQC/imosSalinityFromPTQC.m +++ b/AutomaticQC/imosSalinityFromPTQC.m @@ -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: @@ -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", diff --git a/IMOS/finaliseData.m b/IMOS/finaliseData.m index c04537fcb..8de3f135a 100644 --- a/IMOS/finaliseData.m +++ b/IMOS/finaliseData.m @@ -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); diff --git a/Parser/readXR620.m b/Parser/readXR620.m index c9a5c176a..768ff2721 100644 --- a/Parser/readXR620.m +++ b/Parser/readXR620.m @@ -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'; @@ -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'; @@ -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 diff --git a/Preprocessing/depthPP.m b/Preprocessing/depthPP.m index 037477bea..0c923d52a 100644 --- a/Preprocessing/depthPP.m +++ b/Preprocessing/depthPP.m @@ -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 @@ -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 @@ -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 @@ -353,7 +356,7 @@ end end -if ~auto +if ~auto && ~isProfile f = figure(... 'Name', 'Depth Computation',... 'Visible', 'off',... diff --git a/imosToolbox.m b/imosToolbox.m index 00a2c19aa..c58012717 100644 --- a/imosToolbox.m +++ b/imosToolbox.m @@ -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{:}); diff --git a/imosToolbox_Linux64.bin b/imosToolbox_Linux64.bin index 1df4551b2..7a240ee68 100755 Binary files a/imosToolbox_Linux64.bin and b/imosToolbox_Linux64.bin differ diff --git a/imosToolbox_Win32.exe b/imosToolbox_Win32.exe index a519c211f..ee1e8976a 100644 Binary files a/imosToolbox_Win32.exe and b/imosToolbox_Win32.exe differ diff --git a/imosToolbox_Win64.exe b/imosToolbox_Win64.exe index 257107987..2169890af 100644 Binary files a/imosToolbox_Win64.exe and b/imosToolbox_Win64.exe differ