| 24 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 25 |
% PRE-PROCESS and ERROR CHECK % |
% PRE-PROCESS and ERROR CHECK % |
| 26 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 27 |
|
pv_checkpath |
| 28 |
|
|
| 29 |
% Check number of input: |
% Check number of input: |
| 30 |
if nargin ~= 4 |
if nargin ~= 4 |
| 86 |
[I2 I2mat dI2] = subfct_getsurf(TRACER,LAT,LONG,[OUTCROPS(2) LAT_MAX LONG_MAX]); |
[I2 I2mat dI2] = subfct_getsurf(TRACER,LAT,LONG,[OUTCROPS(2) LAT_MAX LONG_MAX]); |
| 87 |
|
|
| 88 |
% Then we determine the outcrop surface limits: |
% Then we determine the outcrop surface limits: |
| 89 |
I1mat(find(I1mat==0))=NaN; |
I1mat = abs(I1mat - 1); |
| 90 |
I2mat(find(I2mat==0))=NaN; |
Imat = (I1mat + I2mat)./2; |
| 91 |
I1mat(find(I1mat==1))=0; |
Imat(find(Imat<1)) = 0; |
|
I2mat(find(I2mat==1))=0; |
|
|
Imat = I1mat + I2mat; |
|
|
Imat(find(Imat==0))=1; |
|
|
Imat(isnan(Imat))=0; |
|
| 92 |
Imat = logical(Imat); |
Imat = logical(Imat); |
| 93 |
|
|
| 94 |
% And the integral of the TRACER on it: |
% And the integral of the TRACER on it: |
| 101 |
% OUTPUTS % |
% OUTPUTS % |
| 102 |
%%%%%%%%%%% |
%%%%%%%%%%% |
| 103 |
switch nargout |
switch nargout |
| 104 |
case 1 |
case {0,1} |
| 105 |
varargout(1) = {I}; |
varargout(1) = {I}; |
| 106 |
case 2 |
case 2 |
| 107 |
varargout(1) = {I}; |
varargout(1) = {I}; |