Opened 3 months ago

Last modified 5 weeks ago

#2562 new Defect

Debug mode on HEAD v4 failed

Reported by: mathiot Owned by: systeam
Priority: low Milestone:
Component: MULTIPLE Version: 4.0-HEAD
Severity: minor Keywords:
Cc: pierre.mathiot@… Branch review: failed
MP ready?: no Task progress: Unspecified

Description

Context

Before looking for an issue appearing in my eORCA025 config poping up after my upgrade to NEMO 4.0.4, I decided to run the HEAT of v4 in debug mode on the UGA cluster, and I failed to run ORCA2_ICE_PISCES.

Compilation options used are: -i4 -r8 -O0 -fpe0 -g -traceback -fp-model precise -fno-alias -CB -ftrapuv -check uninit -debug -init=arrays,snan,huge

Analysis

  • Some partially initialised variables (level jpk not intialised) lead to an error in lbcnfd.f90 or in p4zsed.F90
error (182): floating invalid - possible uninitialized real/complex variable.

This affect: zwz in dynvor.F90, ze3divh in sbcwave.F90 and nitrpot in p4zsed.F90

  • numrtr is not initialised to -1, which lead to an out of bound when try to call iom_varid
  • divu_i not initialised if ln_icedyn is off in icewri

Recommendation

  • for unitialized variables dynvor.F90, sbcwave.F90 and p4zsed.F90, we can simply intitialised the jpk value to 0._wp.
  • numrtr should be set to -1 in trc.F90
  • divu_i should only be printout if ln_icedyn is set to true

Extra information:

  • not tested in the trunk (need to be checked)
  • other sette configurations not tested
  • ICE/icewri.F90

     
    252252      CALL iom_rstput( 0, 0, kid, 'snwpre', sprecip      )   ! Snow precipitation 
    253253      CALL iom_rstput( 0, 0, kid, 'sisali', sm_i         )   ! Ice salinity 
    254254      CALL iom_rstput( 0, 0, kid, 'sivolu', vt_i         )   ! Ice volume 
    255       CALL iom_rstput( 0, 0, kid, 'sidive', divu_i*1.0e8 )   ! Ice divergence 
    256255      CALL iom_rstput( 0, 0, kid, 'si_amp', at_ip        )   ! Melt pond fraction 
    257256      CALL iom_rstput( 0, 0, kid, 'si_vmp', vt_ip        )   ! Melt pond volume 
    258257      CALL iom_rstput( 0, 0, kid, 'sithicat', h_i        )   ! Ice thickness 
     
    259258      CALL iom_rstput( 0, 0, kid, 'siconcat', a_i        )   ! Ice concentration 
    260259      CALL iom_rstput( 0, 0, kid, 'sisalcat', s_i        )   ! Ice salinity 
    261260      CALL iom_rstput( 0, 0, kid, 'snthicat', h_s        )   ! Snw thickness 
     261      IF ( ln_icedyn )  CALL iom_rstput( 0, 0, kid, 'sidive', divu_i*1.0e8 )   ! Ice divergence 
    262262 
    263263    END SUBROUTINE ice_wri_state 
    264264 
  • OCE/DYN/dynvor.F90

     
    221221         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    222222      ENDIF 
    223223      ! 
     224      zwz(:,:,jpk) = 0._wp 
    224225      ! 
    225226      SELECT CASE( kvor )                 !==  volume weighted vorticity considered  ==! 
    226227      CASE ( np_RVO )                           !* relative vorticity 
     
    573574         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    574575      ENDIF 
    575576      ! 
     577      zwz(:,:,jpk) = 0._wp 
    576578      !                                                ! =============== 
    577579      DO jk = 1, jpkm1                                 ! Horizontal slab 
    578580         !                                             ! =============== 
  • OCE/SBC/sbcwave.F90

     
    219219      ! 
    220220      !                       !==  vertical Stokes Drift 3D velocity  ==! 
    221221      ! 
     222      ze3divh(:,:,jpk) = 0._wp 
    222223      DO jk = 1, jpkm1               ! Horizontal e3*divergence 
    223224         DO jj = 2, jpj 
    224225            DO ji = fs_2, jpi 
  • TOP/PISCES/P4Z/p4zsed.F90

     
    491491      ! 
    492492      IF( p4z_sed_alloc /= 0 )   CALL ctl_stop( 'STOP', 'p4z_sed_alloc: failed to allocate arrays' ) 
    493493      ! 
     494      ! initialisation 
     495      nitrpot(:,:,jpk) = 0._wp 
     496      ! 
    494497   END FUNCTION p4z_sed_alloc 
    495498 
    496499   !!====================================================================== 
  • TOP/trc.F90

     
    2424   INTEGER, PUBLIC ::   numtrc_cfg = -1   !: reference passive tracer namelist_top_cfg 
    2525   INTEGER, PUBLIC ::   numonr     = -1   !: reference passive tracer namelist output output.namelist.top 
    2626   INTEGER, PUBLIC ::   numstr            !: tracer statistics 
    27    INTEGER, PUBLIC ::   numrtr            !: trc restart (read ) 
     27   INTEGER, PUBLIC ::   numrtr     = -1   !: trc restart (read ) 
    2828   INTEGER, PUBLIC ::   numrtw            !: trc restart ( write ) 
    2929 
    3030   !! passive tracers fields (before,now,after) 

Commit History (0)

(No commits)

Change History (3)

comment:1 Changed 2 months ago by mathiot

  • Cc pierre.mathiot@… added

Part of these issue has already been reported in the trunk in 13526, 13527, 13546, 13558. These commit has to be carefully check to see if they apply into NEMO4.

comment:2 Changed 6 weeks ago by mathiot

Fix has been done in the trunk but not implemented in the trunk. It correspond to commit 13526, 13527, 13546, 13558 (from personal discussion with Seb).

comment:3 Changed 5 weeks ago by nemo

  • Version changed from release-4.0 to 4.0-HEAD
Note: See TracTickets for help on using tickets.