4 |
% nProf: number of profiles |
% nProf: number of profiles |
5 |
% prof_depth: list of depth levels |
% prof_depth: list of depth levels |
6 |
% list_var: specify name of created fields |
% list_var: specify name of created fields |
7 |
% |
% |
8 |
% list of fields always created: |
% list of fields always created: |
9 |
% prof_depth [nDepth x 1] |
% prof_depth [nDepth x 1] |
10 |
% prof_descr {nProf x 1} |
% prof_descr {nProf x 1} |
24 |
|
|
25 |
prof_depth=dataset.z_std; |
prof_depth=dataset.z_std; |
26 |
|
|
27 |
list_vars={'prof_T','prof_Tweight','prof_Testim','prof_Terr','prof_Tflag',... |
if isfield(dataset,'var_tmp'); |
28 |
|
var_tmp=dataset.var_tmp; |
29 |
|
var_out=dataset.var_out; |
30 |
|
jj=find(~strcmp(var_tmp,'z')); |
31 |
|
var_tmp={var_tmp{jj}}; |
32 |
|
var_out={var_out{jj}}; |
33 |
|
list_vars={}; |
34 |
|
for ii=1:length(var_tmp); |
35 |
|
list_vars={list_vars{:},['prof_' var_out{ii} ]}; |
36 |
|
list_vars={list_vars{:},['prof_' var_out{ii} 'weight']}; |
37 |
|
list_vars={list_vars{:},['prof_' var_out{ii} 'estim']}; |
38 |
|
list_vars={list_vars{:},['prof_' var_out{ii} 'err']}; |
39 |
|
list_vars={list_vars{:},['prof_' var_out{ii} 'flag']}; |
40 |
|
end; |
41 |
|
else; |
42 |
|
list_vars={'prof_T','prof_Tweight','prof_Testim','prof_Terr','prof_Tflag',... |
43 |
'prof_S','prof_Sweight','prof_Sestim','prof_Serr','prof_Sflag'}; |
'prof_S','prof_Sweight','prof_Sestim','prof_Serr','prof_Sflag'}; |
44 |
if ~strcmp(dataset.coord,'depth'); |
if ~strcmp(dataset.coord,'depth'); |
45 |
list_vars={list_vars{:},'prof_D','prof_Destim'}; |
list_vars={list_vars{:},'prof_D','prof_Destim'}; |
46 |
|
end; |
47 |
end; |
end; |
48 |
if nargin>2, |
if nargin>2, |
49 |
list_vars=varargin{1}; |
list_vars=varargin{1}; |