#2235 closed Bug (fixed)

Subroutine bdy_dta uses an uninitialised namelist parameter unless atmospheric pressure forcing has been enabled

Reported by: smueller Owned by: smueller
Priority: low Milestone:
Component: BDY Version: release-4.0
Severity: minor Keywords: BDY, apr
Cc:

Description

Context

The section of subroutine bdy_dta starting at source:/NEMO/releases/release-4.0/src/OCE/BDY/bdydta.F90#L373 is conditional on namelist parameter ln_apr_obc, which remains uninitialised unless atmospheric pressure forcing has been enabled (i.e., ln_apr_dyn set to .true.).

Analysis

Namelist parameter ln_apr_obc is declared as a module variable of module sbcapr (source:/NEMO/releases/release-4.0/src/OCE/SBC/sbcapr.F90#L29) without assignment of a default value; ln_apr_obc is initialised in subroutine sbc_apr_init, which is only called when namelist parameter ln_apr_dyn has been set to .true..

Fix

The declaration of ln_apr_obc should include the assignment of .false. as default value.

Commit History (1)

ChangesetAuthorTimeChangeLog
11175smueller2019-06-24T13:41:31+02:00

Assignment of default value .false. to module variable ln_apr_obc in module sbcapr to prevent the use of an uninitialised namelist parameter described in ticket #2235

Change History (4)

comment:1 Changed 13 months ago by mdunphy

Looks like the same as #1922 (which was fixed in NEMO 3.6)

comment:2 Changed 13 months ago by smueller

  • Owner changed from systeam to smueller
  • Status changed from new to assigned

comment:3 Changed 13 months ago by smueller

In 11175:

Assignment of default value .false. to module variable ln_apr_obc in module sbcapr to prevent the use of an uninitialised namelist parameter described in ticket #2235

comment:4 Changed 13 months ago by smueller

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

source:/NEMO/releases/release-4.0@11175 includes the proposed fix and passes the AMM12 tests of the SETTE test suite.

Note: See TracTickets for help on using tickets.