/[MITgcm]/MITgcm_contrib/gael/profilesMatlabProcessing/profiles_misc/MITprof_struct.m
ViewVC logotype

Diff of /MITgcm_contrib/gael/profilesMatlabProcessing/profiles_misc/MITprof_struct.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by roquet, Thu Apr 14 20:12:07 2011 UTC revision 1.6 by gforget, Mon Mar 30 15:30:54 2015 UTC
# Line 1  Line 1 
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
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}
# Line 22  function [MITprof]=MITprof_struct(nProf, Line 22  function [MITprof]=MITprof_struct(nProf,
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={};
28          'prof_S','prof_Sweight','prof_Sestim','prof_Serr','prof_Sflag'};  for ii=2:length(dataset.var_out);
29        list_vars={list_vars{:},['prof_' dataset.var_out{ii} ]};
30        list_vars={list_vars{:},['prof_' dataset.var_out{ii} 'weight']};
31        list_vars={list_vars{:},['prof_' dataset.var_out{ii} 'estim']};
32        %if dataset.outputMore;
33        list_vars={list_vars{:},['prof_' dataset.var_out{ii} 'err']};
34        list_vars={list_vars{:},['prof_' dataset.var_out{ii} 'flag']};
35        %end;
36    end;
37    % list_vars={'prof_T','prof_Tweight','prof_Testim','prof_Terr','prof_Tflag',...
38    %     'prof_S','prof_Sweight','prof_Sestim','prof_Serr','prof_Sflag'};
39    % if ~strcmp(dataset.coord,'depth'); list_vars={list_vars{:},'prof_D','prof_Destim'}; end;
40  if nargin>2,  if nargin>2,
41      list_vars=varargin{1};      list_vars=varargin{1};
42  end  end

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22