Skip to content

Commit

Permalink
Uncomment calls to deallocate KPP related arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Apr 19, 2018
1 parent dab30b6 commit 2800524
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2901,7 +2901,7 @@ subroutine MOM_end(CS)
call tracer_registry_end(CS%tracer_Reg)
call tracer_flow_control_end(CS%tracer_flow_CSp)

!if (associated(CS%diabatic_CSp)) call diabatic_driver_end(CS%diabatic_CSp)
if (associated(CS%diabatic_CSp)) call diabatic_driver_end(CS%diabatic_CSp)

if (CS%offline_tracer_mode) call offline_transport_end(CS%offline_CSp)

Expand Down
22 changes: 10 additions & 12 deletions src/parameterizations/vertical/MOM_diabatic_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2425,18 +2425,16 @@ subroutine diabatic_driver_end(CS)
call entrain_diffusive_end(CS%entrain_diffusive_CSp)
call set_diffusivity_end(CS%set_diff_CSp)

! GMM, commeting the following because it fails on Travis (gfortran)

! if (CS%useKPP) then
! if (allocated(CS%KPP_buoy_flux)) deallocate( CS%KPP_buoy_flux )
! if (allocated(CS%KPP_temp_flux)) deallocate( CS%KPP_temp_flux )
! if (allocated(CS%KPP_salt_flux)) deallocate( CS%KPP_salt_flux )
! endif
! if (CS%useKPP) then
! if (allocated(CS%KPP_NLTheat)) deallocate( CS%KPP_NLTheat )
! if (allocated(CS%KPP_NLTscalar)) deallocate( CS%KPP_NLTscalar )
! call KPP_end(CS%KPP_CSp)
! endif
if (CS%useKPP) then
deallocate( CS%KPP_buoy_flux )
deallocate( CS%KPP_temp_flux )
deallocate( CS%KPP_salt_flux )
endif
if (CS%useKPP) then
deallocate( CS%KPP_NLTheat )
deallocate( CS%KPP_NLTscalar )
call KPP_end(CS%KPP_CSp)
endif

if (CS%use_tidal_mixing) call tidal_mixing_end(CS%tidal_mixing_CSp)

Expand Down

0 comments on commit 2800524

Please sign in to comment.