#2118 closed Bug (fixed)
ORCA2 + land_suppression failed to run
Reported by: | mathiot | Owned by: | mathiot |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | OCE | Version: | trunk |
Severity: | minor | Keywords: | MPP, land_suppression |
Cc: |
Description
Context
I run the sette ORCA2_ICE_PISCES test and land suppression activated (jpnij=27, jpnj=4, jpni=7) compiled with debug options. It failed after the first time step because of NaN in the top right processor (the top left is removed). It try ln_nnogather=.true., it doesn't change anything. Without land suppression, it run fine.
Analysis
It appears that in mpp_nfd_generic.h90 some part of the temporary array ztabr,ztabl (nnogather) and ztab are not initialised in this particular case (land value 'overlapping' the missing processor I think).
Fix
Initialise these arrays to 0._wp.
Commit History (2)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
9971 | mathiot | 2018-07-19T14:39:57+02:00 | initialization of ztabl, ztabr and ztab to 0 only in case of land suppression as suggested by Sebastien #2118 |
9945 | mathiot | 2018-07-13T19:11:39+02:00 | initialisation of ztabl,ztabr and ztab to 0. ; fix #2118 |
Change History (3)
comment:1 Changed 5 years ago by mathiot
- Owner set to mathiot
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 5 years ago by smasson
I agree,
however, initializing arrays to 0 is often a bad solution that is potentially hiding a real bug!
In this specific case:
- when there is no land-processor suppression, all values of ztab* arrays should be defined. If it is not the case, this means there is a bug somewhere...
- when some processors of the north fold are suppressed, values of ztab* arrays corresponding to these suppressed domain won't be defined and we need a default definition to 0.
I propose to add an if in from of these initializations to make sure we are in a "suppressed land-processors" case. For example
IF ( jpni*jpnj /= jpnij )
I don't know a simple way to have a better test: testing if "suppressed land-processors" belongs to the north-pole folding...
comment:3 Changed 5 years ago by mathiot
In 9971:
In 9945: