7 |
% Input arguments: |
% Input arguments: |
8 |
% The incoming field data (d) and grid data (g) must be in a structured |
% The incoming field data (d) and grid data (g) must be in a structured |
9 |
% array format (which is the format that comes from rdmnc): |
% array format (which is the format that comes from rdmnc): |
10 |
% d [Field data] Kwx, Kwy (Skew flux form) or GM_PsiX, GM_PsiY (advective form) |
% d [structure] Kwx, Kwy (Skew flux form) or GM_PsiX, GM_PsiY (advective form) |
11 |
% g [Grid data ] drF,rA,dxC,dyC,dxG,dyG,HFacW,HFacS |
% g [structure] drF,rA,dxC,dyC,dxG,dyG,HFacW,HFacS |
12 |
% GMform [string] GM form: 'Skew' or 'Advc' |
% GMform [string] GM form: 'Skew' or 'Advc' |
13 |
% blkFile [file name] Broken line file |
% blkFile [string] Broken line file |
14 |
% mask [structure] Optional: Mask field for computation per basin, it assumes that |
% mask [structure] Optional: Mask field for computation per basin, it assumes that |
15 |
% maskW and maskS are provided in a structure |
% maskW and maskS are provided in a structure |
16 |
% Output arguments: |
% Output arguments: |
17 |
% PsiB : bolus streamfunction at interface level (in Sv) |
% PsiB : bolus streamfunction at interface level (in Sv) |
18 |
% ylat : meridional coordinate of PsiB |
% ylat : meridional coordinate of PsiB |
130 |
psiX_all = reshape(d.GM_PsiX(1:6*nc,:,:,1:nt),6*nc*nc,nr,nt); |
psiX_all = reshape(d.GM_PsiX(1:6*nc,:,:,1:nt),6*nc*nc,nr,nt); |
131 |
psiY_all = reshape(d.GM_PsiY(:,1:nc,:,1:nt) ,6*nc*nc,nr,nt); |
psiY_all = reshape(d.GM_PsiY(:,1:nc,:,1:nt) ,6*nc*nc,nr,nt); |
132 |
|
|
|
%if masking == 1 |
|
|
% psiX_all = repmat(reshape(mask.maskW,6*nc*nc,1),[1 nr nt]) .* psiX_all; |
|
|
% psiY_all = repmat(reshape(mask.maskS,6*nc*nc,1),[1 nr nt]) .* psiY_all; |
|
|
%end |
|
|
|
|
133 |
otherwise |
otherwise |
134 |
disp(['C est Portnawak: GMform should be Skew or Advc: ',GMform]) |
disp(['C est Portnawak: GMform should be Skew or Advc: ',GMform]) |
135 |
end |
end |