New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#1817 (Uninitialized arrays in domzgr.F90) – NEMO

Opened 7 years ago

Closed 7 years ago

#1817 closed Bug (fixed)

Uninitialized arrays in domzgr.F90

Reported by: mdunphy Owned by: mathiot
Priority: low Milestone:
Component: OCE Version: v3.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 7 years ago.
Patch for misfdep and risfdep initialization in domzgr.F90

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by mdunphy

Patch for misfdep and risfdep initialization in domzgr.F90

comment:1 Changed 7 years ago by mathiot

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

comment:2 Changed 7 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.