/[MITgcm]/MITgcm_contrib/gmaze_pv/surfbet2outcrops.m
ViewVC logotype

Diff of /MITgcm_contrib/gmaze_pv/surfbet2outcrops.m

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

revision 1.1 by gmaze, Thu Jun 15 15:20:34 2006 UTC revision 1.3 by gmaze, Fri Jun 16 21:09:16 2006 UTC
# Line 1  Line 1 
1  %  %
2  % S  = surfbet2outcrops(TRACER,LIMITS,LAT,LONG)  % S  = surfbet2outcrops(TRACER,LIMITS,LAT,LONG)
3  %  %
4  % This function computes the horizontal surface between two 2 outcrops,  % This function computes the horizontal surface between two outcrops,
5  % given fixed limits eastward, westward and southward.  % given fixed limits eastward, westward and southward.
6  %  %
7  % TRACER = TRACER(LAT,LONG) : surface tracer variable in 2D  % TRACER = TRACER(LAT,LONG) : surface tracer variable in 2D
# Line 23  function varargout = surfbet2outcrops(TR Line 23  function varargout = surfbet2outcrops(TR
23  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
24  % PRE-PROCESS and ERROR CHECK %  % PRE-PROCESS and ERROR CHECK %
25  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26    pv_checkpath
27    
28  % Check number of input:  % Check number of input:
29  if nargin ~= 4  if nargin ~= 4
# Line 89  LONG_MAX = sort( LIMITS(5:6) ); Line 90  LONG_MAX = sort( LIMITS(5:6) );
90  S = max(S1,S2)-min(S1,S2);  S = max(S1,S2)-min(S1,S2);
91    
92    
93    % Last we determine the outcrop surface limits:
94    S1mat = abs(S1mat - 1);
95    Smat  = (S1mat + S2mat)./2;
96    Smat(find(Smat<1)) = 0;
97    Smat = logical(Smat);
98    
99    
100    
101    
102  %%%%%%%%%%%  %%%%%%%%%%%
103  % OUTPUTS %  % OUTPUTS %
104  %%%%%%%%%%%  %%%%%%%%%%%
105  switch nargout  switch nargout
106   case 1   case {0 , 1}
107    varargout(1) = {S};    varargout(1) = {S};
108   case 2   case 2
109    varargout(1) = {S};    varargout(1) = {S};
110    varargout(2) = {S1mat};    varargout(2) = {Smat};
111   case 3   case 3
112    varargout(1) = {S};    varargout(1) = {S};
113    varargout(2) = {S1mat};    varargout(2) = {Smat};
114    varargout(3) = {dS1};    varargout(3) = {dS1};
115  end %switch nargout  end %switch nargout
116    

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

  ViewVC Help
Powered by ViewVC 1.1.22