Skip to content

Commit

Permalink
ice_grid: initialize 'uvm' to 0
Browse files Browse the repository at this point in the history
In subroutine 'makemask', the array 'uvm' is initialized in a loop on indices
{ilo, ihi} and {jlo, jhi}, but is then used in a loop on indices {1, nx_block} and
{1, ny_block}, causing an uninitialized value to be used (at line 1672).

Initialize the whole array to zero first, to avoid using uninitialized values.
The initialization to zero is actually commented out, following
CICE-Consortium#180, so uncomment it.
  • Loading branch information
phil-blain committed Dec 14, 2020
1 parent 2b22ba7 commit f8e4a15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cicecore/cicedynB/infrastructure/ice_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1635,7 +1635,7 @@ subroutine makemask
!-----------------------------------------------------------------

bm = c0
! uvm = c0
uvm = c0

!$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block)
do iblk = 1, nblocks
Expand Down

0 comments on commit f8e4a15

Please sign in to comment.