Opened 4 years ago
Closed 4 years ago
#2562 closed Defect (fixed)
Debug mode on HEAD v4 failed
Reported by: | mathiot | Owned by: | systeam |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | MULTIPLE | Version: | v4.0.* |
Severity: | minor | Keywords: | |
Cc: | pierre.mathiot@… |
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
252 252 CALL iom_rstput( 0, 0, kid, 'snwpre', sprecip ) ! Snow precipitation 253 253 CALL iom_rstput( 0, 0, kid, 'sisali', sm_i ) ! Ice salinity 254 254 CALL iom_rstput( 0, 0, kid, 'sivolu', vt_i ) ! Ice volume 255 CALL iom_rstput( 0, 0, kid, 'sidive', divu_i*1.0e8 ) ! Ice divergence256 255 CALL iom_rstput( 0, 0, kid, 'si_amp', at_ip ) ! Melt pond fraction 257 256 CALL iom_rstput( 0, 0, kid, 'si_vmp', vt_ip ) ! Melt pond volume 258 257 CALL iom_rstput( 0, 0, kid, 'sithicat', h_i ) ! Ice thickness … … 259 258 CALL iom_rstput( 0, 0, kid, 'siconcat', a_i ) ! Ice concentration 260 259 CALL iom_rstput( 0, 0, kid, 'sisalcat', s_i ) ! Ice salinity 261 260 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 262 262 263 263 END SUBROUTINE ice_wri_state 264 264 -
OCE/DYN/dynvor.F90
221 221 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 222 222 ENDIF 223 223 ! 224 zwz(:,:,jpk) = 0._wp 224 225 ! 225 226 SELECT CASE( kvor ) !== volume weighted vorticity considered ==! 226 227 CASE ( np_RVO ) !* relative vorticity … … 573 574 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 574 575 ENDIF 575 576 ! 577 zwz(:,:,jpk) = 0._wp 576 578 ! ! =============== 577 579 DO jk = 1, jpkm1 ! Horizontal slab 578 580 ! ! =============== -
OCE/SBC/sbcwave.F90
219 219 ! 220 220 ! !== vertical Stokes Drift 3D velocity ==! 221 221 ! 222 ze3divh(:,:,jpk) = 0._wp 222 223 DO jk = 1, jpkm1 ! Horizontal e3*divergence 223 224 DO jj = 2, jpj 224 225 DO ji = fs_2, jpi -
TOP/PISCES/P4Z/p4zsed.F90
491 491 ! 492 492 IF( p4z_sed_alloc /= 0 ) CALL ctl_stop( 'STOP', 'p4z_sed_alloc: failed to allocate arrays' ) 493 493 ! 494 ! initialisation 495 nitrpot(:,:,jpk) = 0._wp 496 ! 494 497 END FUNCTION p4z_sed_alloc 495 498 496 499 !!====================================================================== -
TOP/trc.F90
24 24 INTEGER, PUBLIC :: numtrc_cfg = -1 !: reference passive tracer namelist_top_cfg 25 25 INTEGER, PUBLIC :: numonr = -1 !: reference passive tracer namelist output output.namelist.top 26 26 INTEGER, PUBLIC :: numstr !: tracer statistics 27 INTEGER, PUBLIC :: numrtr 27 INTEGER, PUBLIC :: numrtr = -1 !: trc restart (read ) 28 28 INTEGER, PUBLIC :: numrtw !: trc restart ( write ) 29 29 30 30 !! passive tracers fields (before,now,after)
Commit History (1)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
14588 | clem | 2021-03-05T08:42:07+01:00 | solve ticket #2562 |
Change History (5)
comment:1 Changed 4 years ago by mathiot
- Cc pierre.mathiot@… added
comment:2 Changed 4 years 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 4 years ago by nemo
- Version changed from v4.0 to v4.0.*
comment:4 Changed 4 years ago by clem
In 14588:
comment:5 Changed 4 years ago by clem
- Resolution set to fixed
- Status changed from new to closed
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.