Skip to content

Commit

Permalink
*Fix a bug when EPBL_ORIGINAL_PE_CALC is false
Browse files Browse the repository at this point in the history
  Corrected a bug that causes ePBL column to set the wrong variable and then use
an uninitialized variable when EPBL_ORIGINAL_PE_CALC is set to false.  This bug
was present when the EPBL_ORIGINAL_PE_CALC was first added on Sept. 30, 2016,
but it was not detected because only the default case with EPBL_ORIGINAL_PE_CALC
= True appears to being used or tested.  Any runs that used this code with
debugging compile options would have trapped it immediately.  This will change
answers when EPBL_ORIGINAL_PE_CALC is false.
  • Loading branch information
Hallberg-NOAA committed Sep 4, 2024
1 parent 1eccd28 commit 8a2a7c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_energetic_PBL.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ subroutine ePBL_column(h, dz, u, v, T0, S0, dSV_dT, dSV_dS, SpV_dt, TKE_forcing,
dT_to_dPE_a(k-1), dS_to_dPE_a(k-1), dT_to_dPE(k), dS_to_dPE(k), &
pres_Z(K), dT_to_dColHt_a(k-1), dS_to_dColHt_a(k-1), &
dT_to_dColHt(k), dS_to_dColHt(k), &
PE_chg=dPE_conv, dPEc_dKd=dPEc_dKd)
PE_chg=PE_chg, dPEc_dKd=dPEc_dKd)
endif
MKE_src = dMKE_max * (1.0 - exp(-MKE2_Hharm * Kddt_h_guess))
dMKE_src_dK = dMKE_max * MKE2_Hharm * exp(-MKE2_Hharm * Kddt_h_guess)
Expand Down

0 comments on commit 8a2a7c9

Please sign in to comment.