--- MITgcm_contrib/dfer/matlab_stuff/calcBolusPsiCube.m 2010/02/15 23:53:12 1.1 +++ MITgcm_contrib/dfer/matlab_stuff/calcBolusPsiCube.m 2018/04/19 00:03:59 1.3 @@ -2,15 +2,17 @@ % [PsiB,ylat]=calcBolusPsiCube(d,g,GMform,blkFile); % -% Compute bolus streamfunction from GM scheme +% Compute eddy-induced streamfunction from Gent and McWilliams scheme % % Input arguments: % The incoming field data (d) and grid data (g) must be in a structured % array format (which is the format that comes from rdmnc): -% d [Field data] Kwx,Kwy -% g [Grid data ] drF,rA,dxC,dyC,dxG,dyG,HFacW,HFacS -% GMform [string] GM form 'Skew' or 'Advc' -% blkFile [file name] Broken line file +% d [structure] Kwx, Kwy (Skew flux form) or GM_PsiX, GM_PsiY (advective form) +% g [structure] drF,rA,dxC,dyC,dxG,dyG,HFacW,HFacS +% GMform [string] GM form: 'Skew' or 'Advc' +% blkFile [string] Broken line file +% mask [structure] Optional: Mask field for computation per basin, it assumes that +% maskW and maskS are provided in a structure % Output arguments: % PsiB : bolus streamfunction at interface level (in Sv) % ylat : meridional coordinate of PsiB @@ -128,11 +130,6 @@ psiX_all = reshape(d.GM_PsiX(1:6*nc,:,:,1:nt),6*nc*nc,nr,nt); psiY_all = reshape(d.GM_PsiY(:,1:nc,:,1:nt) ,6*nc*nc,nr,nt); -%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 - otherwise disp(['C est Portnawak: GMform should be Skew or Advc: ',GMform]) end