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

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

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

revision 1.2 by gforget, Thu Jan 27 05:10:42 2011 UTC revision 1.4 by gforget, Tue Dec 11 19:06:35 2012 UTC
# Line 33  for iSub=1:nSub; Line 33  for iSub=1:nSub;
33          end;          end;
34      else;      else;
35          KK=varargin{(iSub-1)*2+2};          KK=varargin{(iSub-1)*2+2};
36          prof_sub=[1:MITprofSub.np]';          prof_sub=[1:length(MITprofSub.prof_lon)]';
37          if iSub~=1; error('''list'' subset should come first'); end;          if iSub~=1; error('''list'' subset should come first'); end;
38      end;      end;
39        KK=reshape(KK,length(KK),1);
40            
41      %  [varargin{(iSub-1)*2+1} ' -- ' num2str(length(KK))]      %  [varargin{(iSub-1)*2+1} ' -- ' num2str(length(KK))]
42      for iFld=1:length(fldNames);      for iFld=1:length(fldNames);
# Line 43  for iSub=1:nSub; Line 44  for iSub=1:nSub;
44          if strcmp('depth',varargin{(iSub-1)*2+1}) & strcmp(fldNames{iFld},'prof_depth');          if strcmp('depth',varargin{(iSub-1)*2+1}) & strcmp(fldNames{iFld},'prof_depth');
45              tmp1=tmp1(KK);              tmp1=tmp1(KK);
46          elseif strcmp('depth',varargin{(iSub-1)*2+1});          elseif strcmp('depth',varargin{(iSub-1)*2+1});
47              if size(tmp1,2)==length(MITprofSub.prof_depth); tmp1=tmp1(:,KK); end;              if size(tmp1,2)==length(MITprof.prof_depth); tmp1=tmp1(:,KK); end;
48          else;          else;
49              if size(tmp1,1)==size(prof_sub,1); tmp1=tmp1(KK,:); end;              if size(tmp1,1)==size(prof_sub,1); tmp1=tmp1(KK,:); end;
50          end;          end;

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

  ViewVC Help
Powered by ViewVC 1.1.22