Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix out of bound errors in block_atmos_copy routines #778

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cpl/module_block_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ subroutine block_array_copy_2d_r8_to_2d_r8(destin_ptr, source_arr, block, block_
jb = block%index(block_index)%jj(ix)
i = ib - block%isc + 1
j = jb - block%jsc + 1
destin_ptr(i,j) = factor * source_arr(ib,jb)
destin_ptr(i,j) = factor * source_arr(i,j)
enddo
localrc = ESMF_SUCCESS
end if
Expand Down Expand Up @@ -440,7 +440,7 @@ subroutine block_array_copy_3d_r8_to_3d_r8(destin_ptr, source_arr, block, block_
jb = block%index(block_index)%jj(ix)
i = ib - block%isc + 1
j = jb - block%jsc + 1
destin_ptr(i,j,k) = factor * source_arr(ib,jb,k)
destin_ptr(i,j,k) = factor * source_arr(i,j,k)
enddo
enddo
localrc = ESMF_SUCCESS
Expand Down Expand Up @@ -523,7 +523,7 @@ subroutine block_array_copy_3dslice_r8_to_3d_r8(destin_ptr, source_arr, slice, b
jb = block%index(block_index)%jj(ix)
i = ib - block%isc + 1
j = jb - block%jsc + 1
destin_ptr(i,j,k) = factor * source_arr(ib,jb,k,slice)
destin_ptr(i,j,k) = factor * source_arr(i,j,k,slice)
enddo
enddo
localrc = ESMF_SUCCESS
Expand Down Expand Up @@ -1004,7 +1004,7 @@ subroutine block_array_copy_2d_r4_to_2d_r8(destin_ptr, source_arr, block, block_
jb = block%index(block_index)%jj(ix)
i = ib - block%isc + 1
j = jb - block%jsc + 1
destin_ptr(i,j) = factor * source_arr(ib,jb)
destin_ptr(i,j) = factor * source_arr(i,j)
enddo
localrc = ESMF_SUCCESS
end if
Expand Down Expand Up @@ -1079,7 +1079,7 @@ subroutine block_array_copy_3d_r4_to_3d_r8(destin_ptr, source_arr, block, block_
jb = block%index(block_index)%jj(ix)
i = ib - block%isc + 1
j = jb - block%jsc + 1
destin_ptr(i,j,k) = factor * source_arr(ib,jb,k)
destin_ptr(i,j,k) = factor * source_arr(i,j,k)
enddo
enddo
localrc = ESMF_SUCCESS
Expand Down Expand Up @@ -1162,7 +1162,7 @@ subroutine block_array_copy_3dslice_r4_to_3d_r8(destin_ptr, source_arr, slice, b
jb = block%index(block_index)%jj(ix)
i = ib - block%isc + 1
j = jb - block%jsc + 1
destin_ptr(i,j,k) = factor * source_arr(ib,jb,k,slice)
destin_ptr(i,j,k) = factor * source_arr(i,j,k,slice)
enddo
enddo
localrc = ESMF_SUCCESS
Expand Down
Loading