Repository navigation
+Use exact non-solar buoyancy flux in KPP StokesMOST - #465
Open
gustavo-marques wants to merge 1 commit into
Open
gustavo-marques wants to merge 1 commit into
gustavo-marques wants to merge 1 commit into
Conversation
KPP_compute_BLD needs the non-solar surface buoyancy flux for the Stokes similarity (STOKES_MOST) boundary layer depth and entrainment calculations. Because only the total surface buoyancy flux was passed in, the surface shortwave contribution was estimated by fitting an exponential to the penetrating shortwave buoyancy flux at interfaces 2 and 3 and extrapolating it to the surface. The exponent had the wrong sign, so the flux was extrapolated downward instead of upward, which underestimated the surface shortwave flux and overestimated the non-solar flux. calculateBuoyancyFlux1d/2d now have an optional argument, buoyFlux_nonSW, that returns the surface buoyancy flux from the salt, freshwater and non-shortwave heat fluxes. It is computed from netHeatMinusSW with the same expansion coefficients as the total flux, so it is exactly the total minus the surface shortwave. All three diabatic drivers (diabatic_ALE_legacy, diabatic_ALE and layered_diabatic) now pass it to KPP_compute_BLD. The new runtime parameter KPP%KPP_NONSOLAR_BUOY_FLUX_BUG (default ENABLE_BUGS_BY_DEFAULT) selects the behavior. When true, the old downward extrapolation is used. When false, the exact flux is used, or, if a caller does not provide it, the extrapolation is done upward with the corrected sign. The parameter is only logged when STOKES_MOST is true. By default all answers are bitwise identical. Answers change only when STOKES_MOST = True and KPP_NONSOLAR_BUOY_FLUX_BUG = False.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
With
STOKES_MOST = True,KPP_compute_BLDuses the non-solar surfacebuoyancy flux to compute the boundary layer depth and entrainment. Only
the total surface buoyancy flux was passed to KPP, so the code estimated
the surface shortwave part from the penetrating shortwave flux at
interfaces 2 and 3. It fitted an exponential and extrapolated it to the
surface, but with the wrong sign in the exponent. The extrapolation
therefore went downward instead of upward, which underestimated the
surface shortwave flux and overestimated the non-solar flux.
Rather than only fixing the sign, this PR provides the exact non-solar
flux to KPP. Even with the correct sign, a single exponential fitted
below the first layer misses the shortwave absorbed in that layer.
Changes (3 files)
MOM_forcing_type.F90:calculateBuoyancyFlux1dandcalculateBuoyancyFlux2dhave a new optional output,buoyFlux_nonSW. It is computed fromnetHeatMinusSWandnetSaltwith the same expansion coefficients as the total flux, in both the
Boussinesq and non-Boussinesq branches.
MOM_CVMix_KPP.F90:KPP_compute_BLDhas a new optional argument,buoyFlux_nonSW.KPP%KPP_NONSOLAR_BUOY_FLUX_BUG, defaulting toENABLE_BUGS_BY_DEFAULT:True: the old downward extrapolation.False: the exact flux if it is passed in, otherwise thecorrected upward extrapolation.
STOKES_MOST = True, which isthe only case where the non-solar flux is used.
MOM_diabatic_driver.F90:diabatic_ALE_legacy,diabatic_ALEand
layered_diabaticcompute the new flux and pass it toKPP_compute_BLD.Answer changes
By default, all answers are bitwise identical. Answers change only with
STOKES_MOST = TrueandKPP_NONSOLAR_BUOY_FLUX_BUG = False, whichaffects the KPP boundary layer depth through the Stokes similarity
functions and entrainment.
Note that an AI tool was used in making this contribution.