#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)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
11175 | smueller | 2019-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
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:
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
Looks like the same as #1922 (which was fixed in NEMO 3.6)