Skip to content

Commit c17239c

Browse files
Update src/WaterFlow.jl
Co-authored-by: Albert de Montserrat <58044444+albert-de-montserrat@users.noreply.github.com>
1 parent af993c4 commit c17239c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/WaterFlow.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export waterflows
1111
Computes the spacing with central differences
1212
"""
1313
function spacing(lon,lat)
14-
dlon = zero(lon.val[:,:,1])
15-
dlat = zero(lat.val[:,:,1])
14+
dlon = zero(size(lon.val)[1:2])
15+
dlat = zero(size(lat.val)[1:2])
1616
dlon[2:end-1,:] = (lon.val[3:end,:,1] - lon.val[1:end-2,:,1])/2
1717
dlon[1,:], dlon[end,:] = dlon[2,:], dlon[end-1,:]
1818
dlat[:,2:end-1] = (lat.val[:,3:end,1] - lat.val[:,1:end-2,1])/2

0 commit comments

Comments
 (0)