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.
#2235 (Subroutine bdy_dta uses an uninitialised namelist parameter unless atmospheric pressure forcing has been enabled) – NEMO

Opened 5 years ago

Closed 5 years ago

Last modified 2 years ago

#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: v4.0
Severity: minor Keywords: BDY apr v4.0
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 (5)

comment:1 Changed 5 years ago by mdunphy

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

comment:2 Changed 5 years ago by smueller

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

comment:3 Changed 5 years ago by smueller

In 11175:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:4 Changed 5 years 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.

comment:5 Changed 2 years ago by nemo

  • Keywords v4.0 added
Note: See TracTickets for help on using tickets.