Replies: 1 comment
-
This refactor performed no differently: do j = G%jsc,G%jec
h2d(G%isc:G%iec,:) = h(G%isc:G%iec,j,:)
dx2d(G%isc:G%iec,:) = dxInterface(G%isc:G%iec,j,:)
do m=1,ntr ! For each tracer
q2d(G%isc:G%iec,:) = Reg%Tr(m)%t(G%isc:G%iec,j,:)
do i = G%isc,G%iec
if (G%mask2dT(i,j)>0.) then
h1(:) = h2d(i,:)
dx(:) = dx2d(i,:)
call remapping_core(CS, nz, h1, q2d(i,:), nz, dx, u_column)
q2d(i,:) = u_column(:)
endif
enddo ! i
Reg%Tr(m)%t(G%isc:G%iec,j,:) = q2d(G%isc:G%iec,:)
enddo ! m
enddo ! j relative to the original: do j = G%jsc,G%jec
do i = G%isc,G%iec
if (G%mask2dT(i,j)>0.) then
h1(:) = h(i,j,:)
dx(:) = dxInterface(i,j,:)
do m=1,ntr ! For each tracer
call remapping_core(CS, nz, h1, Reg%Tr(m)%t(i,j,:), nz, dx, u_column)
Reg%Tr(m)%t(i,j,:) = u_column(:)
enddo ! m
endif
enddo ! i
enddo ! j when tracers are just T, S and age, even after hand-fusing the j -loops between tracers and u, v (to re-use the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The single-column nature of ALE code makes the pattern memory access to
(i,j,k)
while ALE loops are typicallydo j, do i, f(k=1:nk)
(k,i)
or(i,k)
so we are not making such large sparse strides through memory?i
loops inside the ALE code?(i,j,k,m)
and the ALE loop is currentlydo j, do i, do m, f(k=1:nk)
in order to re-use the regridding column data.(k,m,i)
or(i,k,m)
slices?Beta Was this translation helpful? Give feedback.
All reactions