Skip to content

+Use exact non-solar buoyancy flux in KPP StokesMOST - #465

Open
gustavo-marques wants to merge 1 commit into
NCAR:dev/ncarfrom
gustavo-marques:sfc_solar_buoyancy_fix
Open

gustavo-marques wants to merge 1 commit into
NCAR:dev/ncarfrom
gustavo-marques:sfc_solar_buoyancy_fix

Conversation

@gustavo-marques

Copy link
Copy Markdown
Collaborator

What and why

With STOKES_MOST = True, KPP_compute_BLD uses the non-solar surface
buoyancy 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: calculateBuoyancyFlux1d and
    calculateBuoyancyFlux2d have a new optional output,
    buoyFlux_nonSW. It is computed from netHeatMinusSW and netSalt
    with the same expansion coefficients as the total flux, in both the
    Boussinesq and non-Boussinesq branches.
  • MOM_CVMix_KPP.F90:
    • KPP_compute_BLD has a new optional argument, buoyFlux_nonSW.
    • New parameter KPP%KPP_NONSOLAR_BUOY_FLUX_BUG, defaulting to
      ENABLE_BUGS_BY_DEFAULT:
      • True: the old downward extrapolation.
      • False: the exact flux if it is passed in, otherwise the
        corrected upward extrapolation.
    • The parameter is logged only when STOKES_MOST = True, which is
      the only case where the non-solar flux is used.
  • MOM_diabatic_driver.F90: diabatic_ALE_legacy, diabatic_ALE
    and layered_diabatic compute the new flux and pass it to
    KPP_compute_BLD.

Answer changes

By default, all answers are bitwise identical. Answers change only with
STOKES_MOST = True and KPP_NONSOLAR_BUOY_FLUX_BUG = False, which
affects the KPP boundary layer depth through the Stokes similarity
functions and entrainment.

Note that an AI tool was used in making this contribution.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant