Skip to content

Commit

Permalink
Correct unit conversion for BS_coeff_h diagnostic
Browse files Browse the repository at this point in the history
  Added missing conversion arguments for the register_diag_field calls for the
recently added diagnostics BS_coeff_h and BS_coeff_q.  All answers are bitwise
identical, but two diagnostics will have corrected dimensional rescaling when
EY24_EBT_BS is true.
  • Loading branch information
Hallberg-NOAA committed Dec 13, 2024
1 parent e6e0870 commit 1cd33ac
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/parameterizations/lateral/MOM_hor_visc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1816,14 +1816,12 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
else
if (use_kh_struct) then
Kh_BS(I,J) = 0.25*( ((MEKE%Ku(i,j)*VarMix%BS_struct(i,j,k)) + &
(MEKE%Ku(i+1,j+1)*VarMix%BS_struct(i+1,j+1,k))) + &
((MEKE%Ku(i+1,j)*VarMix%BS_struct(i+1,j,k)) + &
(MEKE%Ku(i,j+1)*VarMix%BS_struct(i,j+1,k))) )
(MEKE%Ku(i+1,j+1)*VarMix%BS_struct(i+1,j+1,k))) + &
((MEKE%Ku(i+1,j)*VarMix%BS_struct(i+1,j,k)) + &
(MEKE%Ku(i,j+1)*VarMix%BS_struct(i,j+1,k))) )
else
Kh_BS(I,J) = 0.25*( (MEKE%Ku(i,j) + &
MEKE%Ku(i+1,j+1)) + &
(MEKE%Ku(i+1,j) + &
MEKE%Ku(i,j+1)) )
Kh_BS(I,J) = 0.25*( (MEKE%Ku(i,j) + MEKE%Ku(i+1,j+1)) + &
(MEKE%Ku(i+1,j) + MEKE%Ku(i,j+1)) )
endif
endif
enddo ; enddo
Expand Down Expand Up @@ -3217,9 +3215,9 @@ subroutine hor_visc_init(Time, G, GV, US, param_file, diag, CS, ADp)

if (CS%EY24_EBT_BS) then
CS%id_BS_coeff_h = register_diag_field('ocean_model', 'BS_coeff_h', diag%axesTL, Time, &
'Backscatter coefficient at h points', 'm2 s-1')
'Backscatter coefficient at h points', units='m2 s-1', conversion=US%L_to_m**2*US%s_to_T)
CS%id_BS_coeff_q = register_diag_field('ocean_model', 'BS_coeff_q', diag%axesBL, Time, &
'Backscatter coefficient at q points', 'm2 s-1')
'Backscatter coefficient at q points', units='m2 s-1', conversion=US%L_to_m**2*US%s_to_T)
endif

CS%id_FrictWork = register_diag_field('ocean_model','FrictWork',diag%axesTL,Time,&
Expand Down

0 comments on commit 1cd33ac

Please sign in to comment.