Opened 4 years ago

Closed 18 months 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: release-3.6
Severity: minor Keywords:
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 (7)

comment:1 Changed 4 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 3 years ago by jamesharle

  • Owner changed from nemo to jamesharle

comment:3 Changed 3 years ago by clevy

  • Cc jamesharle added
  • Status changed from new to assigned

comment:4 Changed 3 years ago by nicolasmartin

  • Description modified (diff)

comment:5 Changed 18 months ago by jchanut

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

comment:6 Changed 18 months ago by jamesharle

After an email exchange with Jean-Marc, the conclusion is that this may have indeed been an data format issue and not a bug in the code.

Last edited 18 months ago by jamesharle (previous) (diff)

comment:7 Changed 18 months ago by jamesharle

  • Resolution set to invalid
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.