/[MITgcm]/MITgcm_contrib/dfer/matlab_stuff/calcBolusPsiCube.m
ViewVC logotype

Diff of /MITgcm_contrib/dfer/matlab_stuff/calcBolusPsiCube.m

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

revision 1.2 by dfer, Wed Mar 7 22:01:18 2018 UTC revision 1.3 by dfer, Thu Apr 19 00:03:59 2018 UTC
# Line 7  function [PsiB,ylat]=calcBolusPsiCube(va Line 7  function [PsiB,ylat]=calcBolusPsiCube(va
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
# Line 130  case 'Advc' Line 130  case 'Advc'
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

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

  ViewVC Help
Powered by ViewVC 1.1.22