Skip to content

Commit

Permalink
Deallocate Kd_bkgnd and Kv_bkgnd
Browse files Browse the repository at this point in the history
These arrays were not being deallocated which was causing a
memory leak problem.
  • Loading branch information
gustavo-marques committed May 22, 2021
1 parent 3812cf6 commit 14e2334
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/parameterizations/vertical/MOM_set_diffusivity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,8 @@ subroutine set_diffusivity(u, v, h, u_h, v_h, tv, fluxes, optics, visc, dt, &
if (associated(dd%KS_extra)) deallocate(dd%KS_extra)
if (associated(dd%drho_rat)) deallocate(dd%drho_rat)
if (associated(dd%Kd_BBL)) deallocate(dd%Kd_BBL)
if (associated(dd%Kd_bkgnd)) deallocate(dd%Kd_bkgnd)
if (associated(dd%Kv_bkgnd)) deallocate(dd%Kv_bkgnd)

if (showCallTree) call callTree_leave("set_diffusivity()")

Expand Down

0 comments on commit 14e2334

Please sign in to comment.