Skip to content

Commit

Permalink
Remove unnedded MLD=0 initalization
Browse files Browse the repository at this point in the history
Remove an extra initalization of MLD in diagnoseMLDbyEnergy
  • Loading branch information
Theresa Morrison authored and Hallberg-NOAA committed Feb 19, 2025
1 parent cbd0da2 commit 9df45e1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/diagnostics/MOM_diagnose_MLD.F90
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ subroutine diagnoseMLDbyDensityDifference(id_MLD, h, tv, densityDiff, G, GV, US,
if (id_ref_rho > 0) call post_data(id_ref_rho, rhoSurf_2d , diagPtr)

if (present(MLD_out)) then
MLD_out = 0.0
MLD_out(:,:) = 0.0
MLD_out(is:ie,js:je) = MLD(is:ie,js:je)
endif

Expand Down Expand Up @@ -335,8 +335,6 @@ subroutine diagnoseMLDbyEnergy(id_MLD, h, tv, G, GV, US, Mixing_Energy, diagPtr,
PE_threshold(iM) = Mixing_Energy(iM) / GV%g_Earth_Z_T2
enddo

MLD(:,:,:) = 0.0

EOSdom(:) = EOS_domain(G%HI)

do j=js,je
Expand Down Expand Up @@ -478,7 +476,7 @@ subroutine diagnoseMLDbyEnergy(id_MLD, h, tv, G, GV, US, Mixing_Energy, diagPtr,
if (id_MLD(3) > 0) call post_data(id_MLD(3), MLD(:,:,3), diagPtr)

if (present(MLD_out)) then
MLD_out = 0.0
MLD_out(:,:) = 0.0
MLD_out(is:ie,js:je) = MLD(is:ie,js:je,1)
endif

Expand Down

0 comments on commit 9df45e1

Please sign in to comment.