Skip to content
Snippets Groups Projects
Commit 4db72eeb authored by Yves Gouriou's avatar Yves Gouriou
Browse files

readBucketData and readCoriolisData :

sort the records with increasing date
parent eccf0026
No related branches found
No related tags found
No related merge requests found
......@@ -49,8 +49,8 @@ if fid ~= -1
% --------------------------------------------
code = get(tsg.qc.hash, 'GOOD', 'code');
% pre-allocate and fill SSPS_WS_QC with 'NO_CONTROL' code value
% -------------------------------------------------------------
% pre-allocate and fill SSPS_WS_QC with 'GOOD' code value
% -------------------------------------------------------
tsg.SSPS_WS_QC = code * ones(size(tsg.SSPS_WS));
%@ completer ces 2 champs !!!!!!!!
......@@ -58,6 +58,17 @@ if fid ~= -1
%tsg.PSAL_WS_BOTTLE = ;
% remplace pour l'instant sample.TYPE !!!!!!
%tsg.SSPS_WS_TYPE = ones(size(tsg.SSPS_WS));
% Sort the struct tsg - increasing time.
% -----------------------------------------
if ~isempty(tsg.DAYD_WS)
[tsg.DAYD_WS, iOrder] = sort(tsg.DAYD_WS);
tsg.DATE_WS = tsg.DATE_WS(iOrder);
tsg.LATX_WS = tsg.LATX_WS(iOrder);
tsg.LONX_WS = tsg.LONX_WS(iOrder);
tsg.SSPS_WS = tsg.SSPS_WS(iOrder);
tsg.SSPS_WS_QC = tsg.SSPS_WS_QC(iOrder);
end
% Save the data in the application GUI
% ------------------------------------
......
......@@ -68,16 +68,28 @@ if fid ~= -1
% Only keep data within TSG data time-limit
% -----------------------------------------
ind = find( tsg.DAYD_EXT < tsg.DAYD(1) | tsg.DAYD_EXT > tsg.DAYD(end));
tsg.DAYD_EXT(ind) = [];
tsg.DATE_EXT(ind, :) = [];
tsg.LONX_EXT(ind) = [];
tsg.LATX_EXT(ind) = [];
tsg.SSPS_EXT(ind) = [];
tsg.SSPS_EXT_QC(ind) = [];
tsg.SSTP_EXT(ind) = [];
tsg.SSTP_EXT_QC(ind) = [];
tsg.DAYD_EXT(ind) = [];
tsg.DATE_EXT(ind, :) = [];
tsg.LONX_EXT(ind) = [];
tsg.LATX_EXT(ind) = [];
tsg.SSPS_EXT(ind) = [];
tsg.SSPS_EXT_QC(ind) = [];
tsg.SSTP_EXT(ind) = [];
tsg.SSTP_EXT_QC(ind) = [];
tsg.SSPS_EXT_TYPE(ind, :) = [];
% Sort the struct tsg - increasing time.
% -----------------------------------------
if ~isempty(tsg.DAYD_EXT)
[tsg.DAYD_EXT, iOrder] = sort(tsg.DAYD_EXT);
tsg.DATE_EXT = tsg.DATE_EXT(iOrder);
tsg.LATX_EXT = tsg.LATX_EXT(iOrder);
tsg.LONX_EXT = tsg.LONX_EXT(iOrder);
tsg.SSPS_EXT = tsg.SSPS_EXT(iOrder);
tsg.SSPS_EXT_QC = tsg.SSPS_EXT_QC(iOrder);
tsg.SSTP_EXT = tsg.SSTP_EXT(iOrder);
tsg.SSTP_EXT_QC = tsg.SSTP_EXT_QC(iOrder);
end
% Save the data in the application GUI
% ------------------------------------
setappdata( hTsgGUI, 'tsg_data', tsg );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment