Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
ladcp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
US191
ladcp
Commits
09a9156d
Commit
09a9156d
authored
4 years ago
by
pierre.rousselot_ird.fr
Browse files
Options
Downloads
Patches
Plain Diff
better warning tracking during clear-prep
parent
48e8205f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
m/ladcp/clear_prep.m
+49
-31
49 additions, 31 deletions
m/ladcp/clear_prep.m
with
49 additions
and
31 deletions
m/ladcp/clear_prep.m
100755 → 100644
+
49
−
31
View file @
09a9156d
function
[]
=
clear_prep
(
stn
,
ndigits
)
function
[]
=
clear_prep
(
stn
,
ndigits
)
% function [] = clear_prep(stn)
% function [] = clear_prep(stn)
%
%
% clear the MAT files from prepare_cast
% clear the MAT files from prepare_cast
%
%
% input : stn - station number
% input : stn - station number
%
%
% version 0.1 last change 06.03.2006
% version 0.1 last change 06.03.2006
% G.Krahmann, IFM-GEOMAR, March 2006
% G.Krahmann, IFM-GEOMAR, March 2006
if
nargin
<
2
if
nargin
<
2
ndigits
=
3
;
ndigits
=
3
;
end
end
if
ischar
(
stn
)
if
ischar
(
stn
)
stn_str
=
stn
;
stn_str
=
stn
;
else
else
stn_str
=
int2str0
(
stn
,
ndigits
);
stn_str
=
int2str0
(
stn
,
ndigits
);
end
end
disp
(
' '
)
file_deleted
=
0
;
disp
([
'clear_prep : removing mat-files for station '
,
stn_str
])
disp
(
' '
)
delete
([
'data/ctdprof/ctdprof'
,
stn_str
,
'.mat'
])
disp
([
'clear_prep : removing mat-files for station '
,
stn_str
])
delete
([
'data/ctdtime/ctdtime'
,
stn_str
,
'.mat'
])
matfile
=
[
'LADCP/data/ctdprof/ctdprof'
,
stn_str
,
'.mat'
];
delete
([
'data/nav/nav'
,
stn_str
,
'.mat'
])
delete_file
(
matfile
);
delete
([
'data/sadcp/sadcp'
,
stn_str
,
'.mat'
])
matfile
=
[
'LADCP/data/ctdtime/ctdtime'
,
stn_str
,
'.mat'
];
delete
([
'data/sadcp/sadcp2'
,
stn_str
,
'.mat'
])
delete_file
(
matfile
);
delete
([
'data/dvl/dvl'
,
stn_str
,
'.mat'
])
matfile
=
[
'LADCP/data/nav/nav'
,
stn_str
,
'.mat'
];
delete
([
'data/buc/buc'
,
stn_str
,
'.mat'
])
delete_file
(
matfile
);
\ No newline at end of file
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment