From 1cd33ac243af011ffead4e2f9cc44541ffc9e467 Mon Sep 17 00:00:00 2001 From: Robert Hallberg Date: Thu, 12 Dec 2024 09:31:49 -0500 Subject: [PATCH] Correct unit conversion for BS_coeff_h diagnostic 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. --- src/parameterizations/lateral/MOM_hor_visc.F90 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/parameterizations/lateral/MOM_hor_visc.F90 b/src/parameterizations/lateral/MOM_hor_visc.F90 index 92794c54e7..4478df87dc 100644 --- a/src/parameterizations/lateral/MOM_hor_visc.F90 +++ b/src/parameterizations/lateral/MOM_hor_visc.F90 @@ -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 @@ -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,&