Parent Directory
|
Revision Log
|
Revision Graph
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 [msk] = findocean_fast( oldmsk ); |
| 2 | |||
| 3 | msk=oldmsk; | ||
| 4 | |||
| 5 | [nx ny nt nk]=size(msk); | ||
| 6 | xp=[2:nx 1]; | ||
| 7 | xm=[nx 1:nx-1]; | ||
| 8 | yp=[2:ny 1]; | ||
| 9 | ym=[ny 1:ny-1]; | ||
| 10 | |||
| 11 | C=msk.*(msk+msk(xp,:,:,:)+msk(xm,:,:,:)+msk(:,ym,:,:)+msk(:,yp,:,:)); | ||
| 12 | jj=find(C==1 | C==2 ); | ||
| 13 | while size(jj) | ||
| 14 | msk( jj )=0; | ||
| 15 | C=msk.*(msk+msk(xp,:,:,:)+msk(xm,:,:,:)+msk(:,ym,:,:)+msk(:,yp,:,:)); | ||
| 16 | jj=find(C==1 | C==2); | ||
| 17 | end |
| ViewVC Help | |
| Powered by ViewVC 1.1.22 |