[1] | 1 | clear all |
---|
| 2 | close all |
---|
| 3 | |
---|
| 4 | grdname='scoast_his.nc'; |
---|
| 5 | theta_s=5.7; |
---|
| 6 | theta_b=0.; |
---|
| 7 | hc=7.; |
---|
| 8 | N=40; |
---|
| 9 | % |
---|
| 10 | % Read in the grid |
---|
| 11 | % |
---|
| 12 | disp(' ') |
---|
| 13 | disp(' Read in the grid...') |
---|
| 14 | nc=netcdf(grdname); |
---|
| 15 | Lp=length(nc('xi_rho')); |
---|
| 16 | Mp=length(nc('eta_rho')); |
---|
| 17 | h=nc{'h'}(:); |
---|
| 18 | result=close(nc); |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | z_w=zlevs(h,0.*h,theta_s,theta_b,hc,N,'w'); |
---|
| 24 | |
---|
| 25 | my_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)))))); |
---|
| 27 | my_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)))))); |
---|
| 31 | my_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)))))); |
---|
| 33 | my_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)))))); |
---|
| 37 | my_rx0=max(max(max(abs((h(:,2:end)-h(:,1:end-1))./... |
---|
| 38 | (h(:,2:end)+h(:,1:end-1)))))); |
---|