diff --git a/CHANGELOG.md b/CHANGELOG.md index 4458f034c4c7..4b18348a47b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed ### Fixed +Properly nullified the pointers to the per-grid-cell counters ### Removed diff --git a/generic/GenericCplComp.F90 b/generic/GenericCplComp.F90 index 953c4e2c781f..f4485057cba7 100644 --- a/generic/GenericCplComp.F90 +++ b/generic/GenericCplComp.F90 @@ -326,6 +326,12 @@ subroutine Initialize(CC, SRC, DST, CLOCK, RC) _VERIFY(STATUS) allocate(STATE%ARRAY_COUNT (NCPLS), STAT=STATUS) _VERIFY(STATUS) + DO J = 1, NCPLS + NULLIFY(STATE%ARRAY_COUNT(J)%ptr1c) + NULLIFY(STATE%ARRAY_COUNT(J)%ptr2c) + NULLIFY(STATE%ARRAY_COUNT(J)%ptr3c) + NULLIFY(STATE%ARRAY_COUNT(J)%ptr4c) + END DO allocate(STATE%ACCUM_RANK (NCPLS), STAT=STATUS) _VERIFY(STATUS) allocate(STATE%couplerType(NCPLS), STAT=STATUS)