Code: Select all
% svn $Id: hslope.m 796 2016-05-11 01:45:21Z arango $
%===========================================================================%
% Copyright (c) 2002-2016 The ROMS/TOMS Group %
% Licensed under a MIT/X style license %
% See License_ROMS.txt Hernan G. Arango %
%===========================================================================%
Code: Select all
hx(1:L,1:Mp)=0.5.*(pm(1:L,1:Mp)+pm(2:Lp,1:Mp)).*(h(2:Lp,1:Mp)-h(1:L,1:Mp));
hy(1:Lp,1:M)=0.5.*(pm(1:Lp,1:M)+pm(1:Lp,2:Mp)).*(h(1:Lp,2:Mp)-h(1:Lp,1:M));
Rodrigo.