Skip to content

Commit bd6b977

Browse files
Theresa MorrisonTheresa Morrison
Theresa Morrison
authored and
Theresa Morrison
committed
Remove unnedded MLD=0 initalization
Remove an extra initalization of MLD in diagnoseMLDbyEnergy
1 parent f34cb35 commit bd6b977

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/diagnostics/MOM_diagnose_MLD.F90

+2-4
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ subroutine diagnoseMLDbyDensityDifference(id_MLD, h, tv, densityDiff, G, GV, US,
238238
if (id_ref_rho > 0) call post_data(id_ref_rho, rhoSurf_2d , diagPtr)
239239

240240
if (present(MLD_out)) then
241-
MLD_out = 0.0
241+
MLD_out(:,:) = 0.0
242242
MLD_out(is:ie,js:je) = MLD(is:ie,js:je)
243243
endif
244244

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

338-
MLD(:,:,:) = 0.0
339-
340338
EOSdom(:) = EOS_domain(G%HI)
341339

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

480478
if (present(MLD_out)) then
481-
MLD_out = 0.0
479+
MLD_out(:,:) = 0.0
482480
MLD_out(is:ie,js:je) = MLD(is:ie,js:je,1)
483481
endif
484482

0 commit comments

Comments
 (0)