Skip to content

Commit

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

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.

(cherry picked from commit ca2f4d2)
  • Loading branch information
phil-blain committed Oct 14, 2020
1 parent dee4436 commit 66f3f51
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 @@ -384,7 +384,7 @@ subroutine init_grid2
! T-grid cell and U-grid cell quantities
!-----------------------------------------------------------------

! tarea(:,:,:) = c0
tarea(:,:,:) = c0

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

0 comments on commit 66f3f51

Please sign in to comment.