source: Roms_tools/Preprocessing_tools/test_r.m @ 1

Last change on this file since 1 was 1, checked in by cholod, 13 years ago

import Roms_Agrif

File size: 1.2 KB
Line 
1clear all
2close all
3
4grdname='scoast_his.nc';
5theta_s=5.7;
6theta_b=0.;
7hc=7.;
8N=40;
9%
10% Read in the grid
11%
12disp(' ')
13disp(' Read in the grid...')
14nc=netcdf(grdname);
15Lp=length(nc('xi_rho'));
16Mp=length(nc('eta_rho'));
17h=nc{'h'}(:);
18result=close(nc);
19
20
21
22
23z_w=zlevs(h,0.*h,theta_s,theta_b,hc,N,'w');
24
25my_rx0=max(max(max(abs((z_w(1,:,2:end)-z_w(1,:,1:end-1))./...
26                       (z_w(1,:,2:end)+z_w(1,:,1:end-1))))));
27my_rx1=max(max(max(abs((z_w(2:end,:,2:end)-z_w(1:end-1,:,2:end)+...
28                        z_w(2:end,:,1:end-1)-z_w(1:end-1,:,1:end-1))./...
29                       (z_w(2:end,:,2:end)+z_w(1:end-1,:,2:end)-...
30                        z_w(2:end,:,1:end-1)-z_w(1:end-1,:,1:end-1))))));
31my_ry0=max(max(max(abs((z_w(:,2:end,1)-z_w(:,1:end-1,1))./...
32                       (z_w(:,2:end,1)+z_w(:,1:end-1,1))))));
33my_ry1=max(max(max(abs((z_w(:,2:end,2:end)-z_w(:,1:end-1,2:end)+...
34                        z_w(:,2:end,1:end-1)-z_w(:,1:end-1,1:end-1))./...
35                       (z_w(:,2:end,2:end)+z_w(:,1:end-1,2:end)-...
36                        z_w(:,2:end,1:end-1)-z_w(:,1:end-1,1:end-1))))));
37my_rx0=max(max(max(abs((h(:,2:end)-h(:,1:end-1))./...
38                       (h(:,2:end)+h(:,1:end-1))))));
Note: See TracBrowser for help on using the repository browser.