0
|
1 |
%======================================================================
|
2
|
2 |
% E X P O R T _ L A D C P . M
|
0
|
3 |
% doc: Tue Sep 16 12:04:42 2008
|
2
|
4 |
% dlm: Fri Nov 13 13:16:26 2009
|
0
|
5 |
% (c) 2008 A.M. Thurnherr
|
2
|
6 |
% uE-Info: 33 30 NIL 0 0 72 2 2 4 NIL ofnI
|
0
|
7 |
%======================================================================
|
|
8 |
%
|
|
9 |
% Synopsis: export list of LADCP stations to ANTS
|
|
10 |
%
|
|
11 |
% Usage: export_LADCP(stns)
|
|
12 |
%
|
|
13 |
% Notes:
|
|
14 |
% - file format (LDEO, UH, IfM) determined automatically
|
|
15 |
% - UH not yet implemented (different file names; no structures in mat files)
|
|
16 |
% - 3-digit zero-padded station basename assumed
|
|
17 |
% - non-existing stations are skipped
|
|
18 |
|
|
19 |
|
|
20 |
% HISTORY:
|
|
21 |
% Sep 16, 2008: - created
|
2
|
22 |
% Nov 13, 2009: - adapted to new LDEO_LADCP2ANTS
|
0
|
23 |
|
|
24 |
function [] = export_LADCP(stns)
|
|
25 |
|
|
26 |
for s = stns
|
|
27 |
bn = sprintf('%03d',s);
|
|
28 |
if exist([bn '.mat'],'file')
|
|
29 |
load(bn);
|
|
30 |
if exist('d_samp','var') % UH processed
|
|
31 |
error('UH file format not yet implemented');
|
|
32 |
elseif isfield(p,'magdev') % IfM processed
|
|
33 |
IfM_LADCP2ANTS(dr,p,bn);
|
|
34 |
else % LDEO processed
|
2
|
35 |
LDEO_LADCP2ANTS(dr,f,p,bn);
|
0
|
36 |
end
|
|
37 |
else
|
|
38 |
disp(sprintf('skipping station %d',s));
|
|
39 |
end % if exist mat file
|
|
40 |
end % station loop
|