/[MITgcm]/MITgcm_contrib/mlosch/interp_llc/fill_potholes.m
ViewVC logotype

Annotation of /MITgcm_contrib/mlosch/interp_llc/fill_potholes.m

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


Revision 1.1 - (hide annotations) (download)
Thu May 3 21:07:20 2007 UTC (18 years, 2 months ago) by mlosch
Branch: MAIN
CVS Tags: HEAD
initial checkin of topography and hydrography interpolation scripts for
the llc-grid, based on old matlab scripts by Alistair Adcroft
Let's hope, they are useful.

1 mlosch 1.1 function [h,hx,hy]=fill_potholes(h,hx,hy)
2     %
3     % Fills "pot holes": holes deeper than all neighbouring sides
4     %
5     % e.g.
6     % [H2,Hx2,Hy2]=fill_potholes(H2,Hx2,Hy2);
7    
8     if size(h)~=size(hx) | size(h)~=size(hy)
9     error('Arguments must all be the same size!\n');
10     end
11    
12     % Fill-up cell-centers where all sides are higher
13     Hsides=min( hx, hx([2:end 1],:,:) );
14     Hsides=min( Hsides, hy );
15     Hsides=min( Hsides, hy(:,[2:end end],:) );
16     h=max( h, Hsides );
17    

  ViewVC Help
Powered by ViewVC 1.1.22