Skip to content
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
14 changes: 7 additions & 7 deletions config_src/infra/FMS2/MOM_io_infra.F90
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,10 @@ subroutine get_field_size(filename, fieldname, sizes, field_found, no_domain)

! Currently no z-test is supported, so disable assignment with 0
size_indices = [ &
find_index(is_x, .true.), &
find_index(is_y, .true.), &
find_index(is_x), &
find_index(is_y), &
0, &
find_index(is_t, .true.) &
find_index(is_t) &
]

do i = 1, size(size_indices)
Expand Down Expand Up @@ -690,14 +690,14 @@ end subroutine get_field_size
!> Return the index of the first True element of a logical array.
!!
!! If all elements are false, return zero.
integer function find_index(vec) result(idx)
function find_index(vec) result(loc)
! NOTE: This function acts as a replacement for findloc() F2008 intrinsic,
! which is not available on some compilers, or may not support logicals.
integer, intent(in) :: vec(:)
integer :: idx

logical, intent(in) :: vec(:)
integer :: loc

integer :: i

loc = 0
do i = 1, size(vec)
if (vec(i)) then
Expand Down