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.
#1922 (Uninitialized variable in sbcapr.F90) – NEMO

Opened 7 years ago

Closed 5 years ago

#1922 closed Bug (duplicate)

Uninitialized variable in sbcapr.F90

Reported by: mdunphy Owned by: jchanut
Priority: low Milestone:
Component: OCE Version: v3.6
Severity: minor Keywords:
Cc:

Description

Context

If ln_apr_dyn is false, then we do not call sbc_apr and we do not read namelist namsbc_apr, and thus we do not initialize ln_apr_obc

However, bdydta.F90 makes use of ln_apr_obc, and this can lead to a segfault

Analysis

We must not use uninitialized vars

Fix

Two choices:
A) Add IF ( ln_apr_dyn ) THEN ... ENDIF around the code in bdydta.F90 that uses ln_apr_obc
B) Initialize ln_apr_obc to .FALSE. where it is declared at the top of sbcapr.F90

Commit History (2)

ChangesetAuthorTimeChangeLog
8524cbricaud2017-09-15T13:59:24+02:00

bugfix in trunk for ticket #1922

8523cbricaud2017-09-15T13:56:16+02:00

bugfix in nemo_v3_6_STABLE for ticket #1922

Change History (4)

comment:1 Changed 7 years ago by clevy

  • Owner changed from nemo to jchanut

comment:2 Changed 7 years ago by cbricaud

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

comment:3 Changed 5 years ago by smueller

  • Resolution fixed deleted
  • Severity set to minor
  • Status changed from closed to reopened

While the reported bug has been fixed in the release-3.6 version of the source code, it is still present in the trunk version (see ticket #2295).

comment:4 Changed 5 years ago by smueller

  • Resolution set to duplicate
  • Status changed from reopened to closed

This ticket has been superseded by ticket #2295.

Note: See TracTickets for help on using tickets.