From 14329195b6be1750bd1ff14c02db25a58379f07b Mon Sep 17 00:00:00 2001 From: Robert Hallberg Date: Wed, 1 Jan 2025 07:05:14 -0500 Subject: [PATCH] Corrected the rescaling of 5 KPP diagnostics Added missing factors to the conversion arguments in the register_diag_field calls for the diagnostics of the KPP non-local transport tendency and the net surface tracer fluxes, and corrected the dimensional scaling that is being applied to the KPP_Vt2 diagnostic as calculated in KPP_compute_BLD. All solutions are bitwise identical, but now output files with these 3 sets of KPP diagnostics are invariant to dimensional rescaling. This can be verified with the visc.nc file generated by the single_column/KPP test case in MOM6-examples. Whereas previously the diagnostics KPP_Vt2, KPP_QminusSW, KPP_netSalt, KPP_NLT_dTdt and KPP_NLT_dSdt in that file would change when dimensional rescaling was applied, now they do not. No output is changed unless dimensional rescaling is used. --- src/parameterizations/vertical/MOM_CVMix_KPP.F90 | 2 +- src/tracer/MOM_tracer_registry.F90 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parameterizations/vertical/MOM_CVMix_KPP.F90 b/src/parameterizations/vertical/MOM_CVMix_KPP.F90 index 5c6bd75da5..b5a36ba9d2 100644 --- a/src/parameterizations/vertical/MOM_CVMix_KPP.F90 +++ b/src/parameterizations/vertical/MOM_CVMix_KPP.F90 @@ -1296,7 +1296,7 @@ subroutine KPP_compute_BLD(CS, G, GV, US, h, Temp, Salt, u, v, tv, uStar, buoyFl bfsfc=surfBuoyFlux, & ! surface buoyancy flux [m2 s-3] uStar=surfFricVel, & ! surface friction velocity [m s-1] CVmix_kpp_params_user=CS%KPP_params ) ! KPP parameters - CS%Vt2(i,j,:) = US%m_to_Z*US%T_to_s * Vt2_1d(:) + CS%Vt2(i,j,:) = US%m_to_Z**2*US%T_to_s**2 * Vt2_1d(:) endif ! recompute wscale for diagnostics, now that we in fact know boundary layer depth diff --git a/src/tracer/MOM_tracer_registry.F90 b/src/tracer/MOM_tracer_registry.F90 index 835b93bb82..b721135e19 100644 --- a/src/tracer/MOM_tracer_registry.F90 +++ b/src/tracer/MOM_tracer_registry.F90 @@ -586,11 +586,11 @@ subroutine register_tracer_diagnostics(Reg, h, Time, diag, G, GV, US, use_ALE, u ! KPP nonlocal term diagnostics if (use_KPP) then Tr%id_net_surfflux = register_diag_field('ocean_model', Tr%net_surfflux_name, diag%axesT1, Time, & - Tr%net_surfflux_longname, trim(units)//' m s-1', conversion=GV%H_to_m*US%s_to_T) + Tr%net_surfflux_longname, trim(units)//' m s-1', conversion=Tr%conc_scale*GV%H_to_m*US%s_to_T) Tr%id_NLT_tendency = register_diag_field('ocean_model', "KPP_NLT_d"//trim(shortnm)//"dt", & diag%axesTL, Time, & trim(longname)//' tendency due to non-local transport of '//trim(lowercase(flux_longname))//& - ', as calculated by [CVMix] KPP', trim(units)//' s-1', conversion=US%s_to_T) + ', as calculated by [CVMix] KPP', trim(units)//' s-1', conversion=Tr%conc_scale*US%s_to_T) if (Tr%conv_scale == 0.001*GV%H_to_kg_m2) then conversion = GV%H_to_kg_m2 else