1 |
function [MITprof]=MITprof_struct(nProf,prof_depth,varargin); |
function [MITprof]=MITprof_struct(nProf,dataset,varargin); |
2 |
% [MITprof]=MITprof_struct; |
% [MITprof]=MITprof_struct; |
3 |
% create an empty struct variable using the format MITprof |
% create an empty struct variable using the format MITprof |
4 |
% nProf: number of profiles |
% nProf: number of profiles |
22 |
% prof_S, prof_Sflag, prof_Serr, prof_Sweight, prof_Sestim |
% prof_S, prof_Sflag, prof_Serr, prof_Sweight, prof_Sestim |
23 |
% array size: [nProf x nLev] |
% array size: [nProf x nLev] |
24 |
|
|
25 |
|
prof_depth=dataset.z_std; |
26 |
|
|
27 |
list_vars={'prof_T','prof_Tweight','prof_Testim','prof_Terr','prof_Tflag',... |
list_vars={'prof_T','prof_Tweight','prof_Testim','prof_Terr','prof_Tflag',... |
28 |
'prof_S','prof_Sweight','prof_Sestim','prof_Serr','prof_Sflag'}; |
'prof_S','prof_Sweight','prof_Sestim','prof_Serr','prof_Sflag'}; |
29 |
|
if ~strcmp(dataset.coord,'depth'); |
30 |
|
list_vars={list_vars{:},'prof_D','prof_Destim'}; |
31 |
|
end; |
32 |
if nargin>2, |
if nargin>2, |
33 |
list_vars=varargin{1}; |
list_vars=varargin{1}; |
34 |
end |
end |