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.
#1954 (Floating invalid in zdftmx) – NEMO

Opened 7 years ago

Last modified 6 years ago

#1954 closed Bug

Floating invalid in zdftmx — at Version 2

Reported by: mcastril Owned by:
Priority: normal Milestone:
Component: ZDF Version: v3.6
Severity: major Keywords:
Cc:

Description (last modified by nemo)

Context

We have been having a floating invalid error in zdftmx.f90:

forrtl: error (65): floating invalid
Image              PC                Routine            Line        Source             
nemo.exe           0000000001B61F92  Unknown               Unknown  Unknown
libpthread-2.22.s  00002B6FC2922B10  Unknown               Unknown  Unknown
nemo.exe           000000000068A1EE  zdftmx_mp_tmx_itf         345  zdftmx.f90
nemo.exe           0000000000682C77  zdftmx_mp_zdf_tmx         245  zdftmx.f90
nemo.exe           000000000048474A  step_mp_stp_              198  step.f90
nemo.exe           0000000000438E0B  nemogcm_mp_nemo_g         147  nemogcm.f90
nemo.exe           0000000000438D5D  MAIN__                     18  nemo.f90
nemo.exe           0000000000438D1E  Unknown               Unknown  Unknown
libc-2.22.so       00002B6FC2E4C6E5  __libc_start_main     Unknown  Unknown
nemo.exe           0000000000438C29  Unknown               Unknown  Unknown

Analysis

I debugged it and I've seen that in that line zdn2dz values are traversed from 0 to jk

zcoef = 0.5 - SIGN( 0.5, zdn2dz(ji,jj,jk) )       ! =0 if dN2/dz > 0, =1 otherwise

However, the 3rd dimension of that array is only set from 0 to jk-1 (jkm1)

zdn2dz     (:,:,jk) = rn2(:,:,jk) - rn2(:,:,jk+1)           ! Vertical profile of dN2/dz

I looked into zdn2dz values and the ones in (:,:,75) are totally random. The same thing could happen with other variables in that routine, that I saw are used in the same way.

Fix

The last jk value should be set to a proper value.

Commit History (2)

ChangesetAuthorTimeChangeLog
8789gsamson2017-11-22T19:04:59+01:00

fix ticket #1954 in trunk

8788gsamson2017-11-22T19:01:02+01:00

fix ticket #1954 in nemo_v3_6_STABLE

Change History (2)

comment:1 Changed 7 years ago by clevy

What is the revision number of 3_6_STABLE used, and for which reference configuration(s)?
I guess you are also activating a compiler debugging option setting undefined values to NaN. Or are you implying there could be an out of bounds in memory?

comment:2 Changed 7 years ago by nemo

  • Description modified (diff)
Note: See TracTickets for help on using tickets.