#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 8 years ago by mdunphy
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 6 years ago by jchanut
- Component changed from OCE to BDY
- Severity set to minor
comment:6 Changed 6 years 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.
comment:7 Changed 6 years ago by jamesharle
- Resolution set to invalid
- Status changed from assigned to closed
comment:8 Changed 3 years ago by nemo
- Keywords v3.6 added
Note: See
TracTickets for help on using
tickets.
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.,
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.