Skip to content
Snippets Groups Projects
Commit 682d8745 authored by Lucie Bakels's avatar Lucie Bakels
Browse files

Bugfix in nested fields: replace nint with int to not get negative weights in interpolation

parent 4a136e22
No related branches found
No related tags found
No related merge requests found
......@@ -136,8 +136,8 @@ subroutine find_grid_indices(xt,yt)
! jy=int(ytn)
! nix=nint(xtn)
! njy=nint(ytn)
nix=max(min(nint(xtn),nxn(ngrid)-1),0)
njy=max(min(nint(ytn),nyn(ngrid)-1),0)
nix=max(min(int(xtn),nxn(ngrid)-1),0)
njy=max(min(int(ytn),nyn(ngrid)-1),0)
ix=nix
jy=njy
ixp=ix+1
......
......@@ -273,8 +273,8 @@ subroutine outgrid_init
if (ngrid.gt.0) then
xtn=(xl-xln(ngrid))*xresoln(ngrid)
ytn=(yl-yln(ngrid))*yresoln(ngrid)
ix=max(min(nint(xtn),nxn(ngrid)-1),0)
jy=max(min(nint(ytn),nyn(ngrid)-1),0)
ix=max(min(int(xtn),nxn(ngrid)-1),0)
jy=max(min(int(ytn),nyn(ngrid)-1),0)
! ix=int(xtn)
! jy=int(ytn)
ddy=ytn-real(jy)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment