New URL for NEMO forge!

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.
#1786 (Missing deallocation of zav_tide in zdftmx.F90) – NEMO

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#1786 closed Bug (fixed)

Missing deallocation of zav_tide in zdftmx.F90

Reported by: molines Owned by: acc
Priority: normal Milestone:
Component: OCE Version: trunk
Severity: Keywords: allocation/deallocation leak memory zdftmx



  • in the trunk, module zdftmx , routine zdf_tmx_init, zav_tide is allocated at the begining and never deallocated


  • This pointer is used only for diagnostics, under the test
          IF( nprint == 1 .AND. lwp ) THEN
             ! Control print
             ! Total power consumption due to vertical mixing
             ! zpc = rau0 * 1/rn_me * rn2 * zav_tide
  • The test against lwp is wrong as only one domain will be concerned by the diagnostics.
  • Gurvan pointed out the bug.
  • When corrected, zav_tide can be allocated/deallocated only in the case it is used, moving allocation after the IF..


  • add CALL wrk_dealloc( jpi,jpj,jpk, zav_tide ) after deallocation of zpc.

Commit History (1)


fixed for ticket #1786

Change History (4)

comment:1 Changed 7 years ago by acc

  • Owner changed from nemo to acc
  • Status changed from new to assigned

comment:2 Changed 7 years ago by clem

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed at r7779

comment:3 Changed 7 years ago by nemo

  • Keywords memory added; meomory removed

comment:4 Changed 6 years ago by nemo

  • Keywords allocation/deallocation added; deallocation removed
Note: See TracTickets for help on using tickets.