/[MITgcm]/MITgcm_contrib/gag_subduction_scripts/diag_induction.m
ViewVC logotype

Annotation of /MITgcm_contrib/gag_subduction_scripts/diag_induction.m

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


Revision 1.1 - (hide annotations) (download)
Wed Apr 21 21:12:13 2004 UTC (20 years ago) by gebbie
Branch: MAIN
CVS Tags: HEAD
Added some diagnostics for Eulerian maps, and some utilities.

1 gebbie 1.1 function [induction,gradx,grady] = diag_induction(ustar,vstar,h,dxc,dyc);
2     %function [induction,gradx,grady] = diag_induction(ustar,vstar,h,dxc,dyc)
3     %
4     % Diagnose lateral induction u_h . grad h
5     %
6     % G. Gebbie, 2003.
7    
8     [nx,ny] = size(ustar);
9    
10     gradx(2:nx,:) = (h(2:nx,:) - h(1:nx-1,:));
11     grady(:,2:ny) = h(:,2:ny) - h(:,1:ny-1);
12    
13     gradx = gradx ./ dxc;
14     grady = grady ./ dyc;
15    
16     udelh = ustar .* gradx;
17     vdelh = vstar .* grady;
18    
19     %% now move udelh from U points to H points, in order to match up with W*.
20     %% involves an average.
21     udelh2 = (udelh(2:nx,:)+udelh(1:nx-1,:))./2;
22     vdelh2 = (vdelh(:,2:ny)+vdelh(:,1:ny-1))./2;
23    
24     udelh2(nx,:) = 0;
25     vdelh2(:,ny)=0;
26    
27     induction = udelh2 + vdelh2;
28    

  ViewVC Help
Powered by ViewVC 1.1.22