Skip to content
Snippets Groups Projects
Commit 09a9156d authored by pierre.rousselot_ird.fr's avatar pierre.rousselot_ird.fr
Browse files

better warning tracking during clear-prep

parent 48e8205f
No related branches found
No related tags found
No related merge requests found
function [] = clear_prep(stn,ndigits)
% function [] = clear_prep(stn)
%
% clear the MAT files from prepare_cast
%
% input : stn - station number
%
% version 0.1 last change 06.03.2006
% G.Krahmann, IFM-GEOMAR, March 2006
if nargin<2
ndigits = 3;
end
if ischar(stn)
stn_str = stn;
else
stn_str = int2str0(stn,ndigits);
end
disp(' ')
disp(['clear_prep : removing mat-files for station ',stn_str])
delete(['data/ctdprof/ctdprof',stn_str,'.mat'])
delete(['data/ctdtime/ctdtime',stn_str,'.mat'])
delete(['data/nav/nav',stn_str,'.mat'])
delete(['data/sadcp/sadcp',stn_str,'.mat'])
delete(['data/sadcp/sadcp2',stn_str,'.mat'])
delete(['data/dvl/dvl',stn_str,'.mat'])
delete(['data/buc/buc',stn_str,'.mat'])
\ No newline at end of file
function [] = clear_prep(stn,ndigits)
% function [] = clear_prep(stn)
%
% clear the MAT files from prepare_cast
%
% input : stn - station number
%
% version 0.1 last change 06.03.2006
% G.Krahmann, IFM-GEOMAR, March 2006
if nargin<2
ndigits = 3;
end
if ischar(stn)
stn_str = stn;
else
stn_str = int2str0(stn,ndigits);
end
file_deleted = 0;
disp(' ')
disp(['clear_prep : removing mat-files for station ',stn_str])
matfile = ['LADCP/data/ctdprof/ctdprof',stn_str,'.mat'];
delete_file(matfile);
matfile = ['LADCP/data/ctdtime/ctdtime',stn_str,'.mat'];
delete_file(matfile);
matfile = ['LADCP/data/nav/nav',stn_str,'.mat'];
delete_file(matfile);
matfile = ['LADCP/data/sadcp/sadcp',stn_str,'.mat'];
delete_file(matfile);
matfile = ['LADCP/data/sadcp/sadcp2',stn_str,'.mat'];
delete_file(matfile);
matfile = ['LADCP/data/dvl/dvl',stn_str,'.mat'];
delete_file(matfile);
matfile = ['LADCP/data/buc/buc',stn_str,'.mat'];
delete_file(matfile);
fprintf(1, '%d file(s) deleted\n', file_deleted);
function delete_file(matfile)
if isfile(matfile)
delete(matfile)
fprintf(1, 'delete file %s\n', matfile);
file_deleted = file_deleted + 1;
end
end
end
\ No newline at end of file
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