Skip to content

Commit

Permalink
Corrected the rescaling of 5 KPP diagnostics
Browse files Browse the repository at this point in the history
  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.
  • Loading branch information
Hallberg-NOAA committed Jan 1, 2025
1 parent 3c39818 commit 1432919
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_CVMix_KPP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/tracer/MOM_tracer_registry.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1432919

Please sign in to comment.