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.
#1734 (bug in bdyini : straight BDY only works with rim width of 1) – NEMO

Opened 8 years ago

Closed 5 years ago

Last modified 2 years ago

#1734 closed Bug (invalid)

bug in bdyini : straight BDY only works with rim width of 1

Reported by: molines Owned by: jamesharle
Priority: low Milestone:
Component: BDY Version: v3.6
Severity: minor Keywords: v3.6
Cc: jamesharle

Description (last modified by nicolasmartin)

Context

NEMO_3.6_STABLE with straight BDY (as old OBC) and rim width > 1 produce a Seg. fault due to out of bound on dta_global2 array

Analysis

In this case bdy data are organized as a vector with all the data within the rim put sequentially from the outermost to innermost. Therefore it seems to me that in bdyini.F90 we must have

jpbdtas = MAX(jpbdtas, (nbdyend - nbdybeg + 1) * nn_rimwidth(ib_bdy)  )

instead of

jpbdtas = MAX(jpbdtas, (nbdyend - nbdybeg + 1))

Further more, the allocation of dta_global2 should be (not tested):

ALLOCATE( dta_global2(jpbdtas, 1, jpk) ) 

instead of

ALLOCATE( dta_global2(jpbdtas, nrimmax, jpk) )

Fix

The only change of jpbdtas as sugested above fix the problem of outbound.

Commit History (0)

(No commits)

Change History (8)

comment:1 Changed 7 years ago by mdunphy

Hi,

I ran into this same issue (out of bounds for the structured case). My conclusion was that my input netcdf file was wrong -- in the structured case we should use a two-dimensional netcdf file, i.e.,

yb = nn_rimwidth ;
xbT = nbdyend - nbdybeg + 1 ;

such that the input routine correctly loads it into the 3D array dta_global2. Meanwhile it's the unstructured case that expects data in vector form, and loads into dta_global.

comment:2 Changed 7 years ago by jamesharle

  • Owner changed from nemo to jamesharle

comment:3 Changed 7 years ago by clevy

  • Cc jamesharle added
  • Status changed from new to assigned

comment:4 Changed 7 years ago by nicolasmartin

  • Description modified (diff)

comment:5 Changed 5 years ago by jchanut

  • Component changed from OCE to BDY
  • Severity set to minor

comment:6 Changed 5 years ago by jamesharle

Version 1, edited 5 years ago by jamesharle (previous) (next) (diff)

comment:7 Changed 5 years ago by jamesharle

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

comment:8 Changed 2 years ago by nemo

  • Keywords v3.6 added
Note: See TracTickets for help on using tickets.