Opened 4 years ago

Closed 4 years ago

#1817 closed Bug (fixed)

Uninitialized arrays in domzgr.F90

Reported by: mdunphy Owned by: mathiot
Priority: low Milestone:
Component: OCE Version: release-3.6
Severity: Keywords:
Cc:

Description

Context

The arrays misfdep and risfdep are not initialized in routine zgr_bat in domzgr.F90 for the case where ln_zco=TRUE

Analysis

Without the initialization, array mikt gets built from random data, and that causes out of bounds / segfaults later on in routine sbc_ssm in sbcssm.F90.

Fix

Hoist the initialization of misfdep and risfdep to the top of routine zgr_bat such that the arrays are always initialized. Patch attached.

Commit History (1)

ChangesetAuthorTimeChangeLog
7524mathiot2017-01-03T18:32:32+01:00

Fix for ticket #1817 (uninitialised misfdep/risfdep)

Attachments (1)

domzgr_initialize.patch (1.4 KB) - added by mdunphy 4 years ago.
Patch for misfdep and risfdep initialization in domzgr.F90

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by mdunphy

Patch for misfdep and risfdep initialization in domzgr.F90

comment:1 Changed 4 years ago by mathiot

  • Owner changed from nemo to mathiot
  • Status changed from new to assigned

comment:2 Changed 4 years ago by mathiot

  • Resolution set to fixed
  • Status changed from assigned to closed

I agree on the suggested patch. Results of SETTE configuration are identical.
Patch included in revision 7524.

Note: See TracTickets for help on using tickets.