/[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.4 by gforget, Sun Jun 2 16:48:20 2013 UTC revision 1.5 by gforget, Mon Mar 30 03:42:19 2015 UTC
# Line 4  function [MITprof]=MITprof_struct(nProf, Line 4  function [MITprof]=MITprof_struct(nProf,
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 24  function [MITprof]=MITprof_struct(nProf, Line 24  function [MITprof]=MITprof_struct(nProf,
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};

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22