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.
  • Loading branch information
phil-blain committed Sep 30, 2020
1 parent dacea48 commit ca2f4d2
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 @@ -383,7 +383,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 ca2f4d2

Please sign in to comment.