This function costs steadily 8% time in every "swm_xxxx.exe". Hope you can optimize it.
You can try from here(Line 115-132):
do k = ks, ke
do j = js, je
if (ngrid(j) > 1) then
n = ngrid(j)
hn = (n - 1) / 2
do i = is, ie
tmp(i) = sum(wgt(:n,j) * x%d(i-hn:i+hn,j,k))
end do
if (present(y)) then
y%d(:,j,k) = tmp
else
x%d(:,j,k) = tmp
end if
else if (present(y)) then
y%d(:,j,k) = x%d(:,j,k)
end if
end do
end do
Function name:![image](https://github.com/jamesnulliu/SHUBYD_GMCORE/assets/60540798/5260fec8-ba26-424b-a1b3-75778e1951c2)
filter_run_3d(filter, x, y)
This function costs steadily 8% time in every "swm_xxxx.exe". Hope you can optimize it.
You can try from here(Line 115-132):