Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+(*)Clarify turbulent energetics and add EPBL_BBL_TIDAL_EFFIC #808

Merged
merged 4 commits into from
Jan 25, 2025

Conversation

Hallberg-NOAA
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA commented Jan 19, 2025

This PR consists of 4 commits that make the purpose and nature of two fields in the forcing type and the vertvisc_type clearer, and also adds the option to use the dissipated tidal energy supplied via the fluxes type to drive mixing in ePBL_BBL_column(). It also corrects a bug in the energy being used in the recently added ePBL BBL mixing.

Visc%TKE_BBL has been revised to visc%BBL_meanKE_loss to reflect that this array contains the mean kinetic energy that has been extracted by the bottom drag, and that the efficiency has not yet been applied. The units were also changed from [R Z3 T-3 ~> W m-2] to [R Z L2 T-3 ~> W m-2], with the extra conversion factors to translate from the units of mean kinetic energy to those of turbulent kinetic energy folded into set_diffusivity_CS%BBL_effic and energetic_PBL_CS%ePBL_BBL_effic. Similarly, fluxes%TKE_tidal has been renamed to fluxes%BBL_tidal_dis and its units are changed to [R Z L2 T-3 ~> W m-2] to reflect that this is the mean kinetic energy that has been dissipated and that the fractional efficiency has not been applied yet.

This PR also adds the option to use the energy source in fluxes%BBL_tidal_dis to drive mixing in ePBL_BBL_column() has been added, with the new runtime parameter EPBL_BBL_TIDAL_EFFIC to control how much mixing is applied. By default this parameter is set to 0 and all answers are bitwise identical.

Finally, this PR corrects a confusing situation regarding the absence of a factor of the square root of the drag coefficient in visc%TKE_BBL, which led to both a bug when it was used in the ePBL BBL mixing and the persistence of a comment about this confusion that had not been addressed in 10 years. To correct this confusing situation, visc%BBL_meanKE_loss includes the missing factor of the square root of the drag coefficient, while visc%BBL_meanKE_loss_sqrtCd has the same values as were previously in visc%TKE_BBL to allow for the previous answers to be recovered when the new runtime parameter EPBL_BBL_EFFIC_BUG is set to true and DRAG_DIFFUSIVITY_ANSWER_DATE is set below 20250302. Because the ePBL bottom boundary layer was only added to dev/gfdl a month ago and has not yet been merged into main, we can be confident that it has only received very limited use as yet, so the default for EPBL_BBL_EFFIC_BUG is false but this default will change answers when EPBL_BBL_EFFIC > 0. The default for DRAG_DIFFUSIVITY_ANSWER_DATE is 20250101, which will preserve the previous answers, but the default should later be taken from DEFAULT_ANSWER_DATE.

All answers and output are bitwise identical by default in any cases that are more than a month old, but answers can change by default in a few very recent experiments. There are renamed and rescaled elements in two transparent types, and new entries in some MOM_parameter_doc files. The specific commits in this PR include:

  • 2a510f9c2 +(*)EPBL_BBL_EFFIC_BUG & DRAG_DIFFUSIVITY_ANSWER_DATE
  • 2d6adc437 +Add EPBL_BBL_TIDAL_EFFIC
  • 3176b17ed +Rename fluxes%TKE_tidal to fluxes%BBL_tidal_dis
  • 30edcf897 +Rename visc%TKE_BBL to visc%BBL_meanKE_loss

@Hallberg-NOAA Hallberg-NOAA added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 19, 2025
@Hallberg-NOAA Hallberg-NOAA requested a review from breichl January 19, 2025 17:40
@Hallberg-NOAA Hallberg-NOAA changed the title +Clarify turbulent energetics and add EPBL_BBL_TIDAL_EFFIC +(*)Clarify turbulent energetics and add EPBL_BBL_TIDAL_EFFIC Jan 20, 2025
@Hallberg-NOAA Hallberg-NOAA added the bug Something isn't working label Jan 24, 2025
Copy link

@breichl breichl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that these changes correct a bug in the existing code and add clarity to the processes actually represented by certain parameters.

  Revised the name of visc%TKE_BBL to visc%BBL_meanKE_loss to better reflect
what these variables contain, and the fact that the efficiency of the conversion
from mean kinetic energy loss to turbulent kinetic energy has not been applied
yet.  The units of visc%BBL_meanKE_loss are [H L2 T-3 ~> m3 s-3 or W m-2],
whereas those of visc%TKE_BBL were [H Z2 T-3 ~> m3 s-3 or W m-2].  The factor
rescaling between the units of mean kinetic energy and those of turbulent
kinetic energy have been incorporated into set_diffusivity_CS%BBL_effic and
energetic_PBL_CS%ePBL_BBL_effic.  All answers are bitwise identical.
  Revised the name of fluxes%TKE_tidal to fluxes%BBL_tidal_dis to better reflect
what this field holds,and the fact that the efficiency of the conversion from
mean kinetic energy loss to turbulent kinetic energy has not been applied yet.
The units of fluxes%BBL_tidal_dis are [R Z L2 T-3 ~> W m-2], whereas those of
fluxes%TKE_tidal were [R Z3 T-3 ~> W m-2].  The factor rescaling between the
units of mean kinetic energy and those of turbulent kinetic energy were already
in set_diffusivity_CS%BBL_effic, and these have been cancelled out by this
change, but this is offset by the addition of rescaling factors in the term
setting this array in the NUOPC and mct convert_IOB_to_fluxes routines.  In the
FMS_cap version of convert_IOB_to_fluxes, the extra rescaling factor is rolled
into the scaling factor used in the get_param call for rho_TKE_tidal.  All
answers are bitwise identical, but there is a change in the name and rescaled
units of an element of a transparent type.
  Added the option to use the energy source in fluxes%BBL_tidal_dis to drive
mixing in ePBL_BBL_column(), similarly to what is done in add_drag_diffusivity()
and add_LOTW_BBL_diffusivity().  Because this was omitted when ePBL_BBL_column()
was first added, a separate runtime parameter, EPBL_BBL_TIDAL_EFFIC, is used to
determine the extent to which this tidal energy source is used.  The default for
EPBL_BBL_TIDAL_EFFIC is currently set to 0 to avoid changing answers, but
perhaps it should be changed follow the value of EPBL_BBL_EFFIC.  By default all
answers are bitwise identical, but there is a new runtime parameter in the
MOM_parameter_doc files for cases that use ePBL.
  Previously, visc%BBL_meanKE_loss (which was called visc%TKE_BBL before it was
renamed) was missing a factor of the square root of the drag coefficient
compared with the net loss of kinetic energy.  This was compensated for by
multiplication by factors of the square root of the drag coefficient in
add_drag_diffusivity and add_LOTW_BBL_diffusivity, but when an equivalent
expression was added in the ePBL BBL code this was erroneously omitted.
Moreover, Alistair has had a comment questioning this added factor in
add_LOTW_BBL_diffusivity for a decade without adequate resolution.

  To correct this confusing situation, visc%BBL_meanKE_loss has been changed to
include the missing factor of the square root of the drag coefficient, while the
new variable visc%BBL_meanKE_loss_sqrtCd was added to allow for the previous
answers to be recovered when the new runtime parameter EPBL_BBL_EFFIC_BUG is set
to true and DRAG_DIFFUSIVITY_ANSWER_DATE is set below 20250302.  Because the
ePBL bottom boundary layer was only added to dev/gfdl a month ago and has not
yet been merged into main, we can be confident that it has only received very
limited use as yet, so the default for EPBL_BBL_EFFIC_BUG is false but this
default will change answers when EPBL_BBL_EFFIC > 0.  The default for
DRAG_DIFFUSIVITY_ANSWER_DATE is 20250101, which will preserve the previous
answers, but the default should later be taken from DEFAULT_ANSWER_DATE.  By
default, answers are unchanged in any cases that are more than a month old, but
answers can change by default in a few very recent experiments.  There are two
new runtime parameters in some MOM_parameter_doc files.
@Hallberg-NOAA
Copy link
Member Author

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/26183 with the expected warnings about new runtime parameters.

@Hallberg-NOAA Hallberg-NOAA merged commit a645328 into NOAA-GFDL:dev/gfdl Jan 25, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants