203 REAL,
INTENT(in) :: alpha, cellSideLength, epsKernel
204 INTEGER,
INTENT(out) :: rad_c
206 INTEGER :: latwin, latwingr, latwinstart, latwinend, &
207 lonwin, lonwingr, lonwinstart, lonwinend, &
208 icellSideLengthFak, radMax
209 REAL :: krnlsm, radFac,rad_m, &
218 radfac = min(20., -log(epskernel))
219 rad_m = alpha * radfac
220 rad_c = int((rad_m)/cellsidelength + 1.0)
223 cellsidelengthmin = 1000.0/32.0
224 cellsidelengthmin = min(cellsidelengthmin, cellsidelength)
225 icellsidelengthfak = cellsidelength/cellsidelengthmin
226 radmax = rad_m / cellsidelengthmin + 1
234 kernellat:
do latwin = 0, radmax
235 kernellon:
do lonwin = 0, radmax
236 kernelfine(latwin, lonwin) = centertocentervalue(alpha, cellsidelengthmin, latwin, lonwin)
240 kernellat2:
do latwin = -radmax, radmax
241 kernellon2:
do lonwin = -radmax, radmax
242 if ((latwin < 0) .or. (lonwin < 0)) &
248 kernellat1:
do latwingr = -rad_c, rad_c
249 kernellon1:
do lonwingr = -rad_c, rad_c
250 latwinstart =
max(min(radmax, latwingr*icellsidelengthfak - icellsidelengthfak/2), -radmax)
251 latwinend =
max(min(radmax, latwingr*icellsidelengthfak + icellsidelengthfak/2), -radmax)
252 lonwinstart =
max(min(radmax, lonwingr*icellsidelengthfak - icellsidelengthfak/2), -radmax)
253 lonwinend =
max(min(radmax, lonwingr*icellsidelengthfak + icellsidelengthfak/2), -radmax)
254 do latwin = latwinstart, latwinend
255 do lonwin = lonwinstart, lonwinend
264 do latwingr = -rad_c, rad_c
265 do lonwingr = -rad_c, rad_c
266 krnlsm = krnlsm +
kernel(latwingr, lonwingr)
293SUBROUTINE doublekernel(dispFac, alfa1, alfa2, cellSideLength, epsKernel, rad_c)
298 REAL,
INTENT(in) :: alfa1, alfa2, dispFac, cellSideLength, epsKernel
300 INTEGER,
INTENT(out) :: rad_c
302 INTEGER :: rad1, rad2
304 if ((1.0 - dispfac) .gt. 0.0)
then
306 call singlekernel(alfa2, cellsidelength, epskernel, rad2)
310 call singlekernel(alfa1, cellsidelength, epskernel, rad1)
321 call singlekernel(alfa1, cellsidelength, epskernel, rad_c)