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

Add GL90 diagnostics #293

Merged
merged 10 commits into from
Jan 9, 2023
Merged

Add GL90 diagnostics #293

merged 10 commits into from
Jan 9, 2023

Conversation

NoraLoose
Copy link

This PR is a follow-up from PR #268, and adds new diagnostics associated with the GL90 parameterization. An overview of the new diagnostics, alongside with examples, is given below.

I tried to keep a clean commit history (one commit per new diagnostic group, on December 8 and 13). However, I started from branch NoraLoose:gl90-param a couple of weeks ago, where the latter branch got squash-merged into dev/gfdl this morning (#268). So things are not very clean anymore.

Coupling coefficients and viscosities

  • au_gl90_visc: zonal viscous coupling coefficient associated with GL90, is contained in au_visc
  • av_gl90_visc: meridional viscous coupling coefficient associated with GL90, is contained in av_visc
  • Kv_gl90_u: GL90 vertical viscosity at u-points, is contained in Kv_u
  • Kv_gl90_v: GL90 vertical viscosity at v-points, is contained in Kv_v

Example:

av_and_avgl90_GL800
Kv_and_Kvgl90_GL800

Momentum budget diagnostics

  • du_dt_visc_gl90: zonal acceleration due to GL90 vertical viscosity, included in du_dt_visc
  • dv_dt_visc_gl90: meridional acceleration due to GL90 vertical viscosity, included in dv_dt_visc

Example:

dv_dt_visc_and_dv_dt_visc_gl90_GL800

Energy budget diagnostics

  • GLwork: Kinetic Energy Source from GL90 Vertical Viscosity

Example:

The energetics of the GL90 parameterization (named GLwork) are intentionally computed in MOM_vert_friction, rather than in MOM_diagnostics, where the remaining kinetic energy budget terms are computed. We have to do the computation in MOM_vert_friction to ensure sign-definiteness when GLwork is summed in the vertical. Indeed, MOM_diagnostics does not have access to the velocities and thicknesses used in the vertical solver, but rather uses a time-mean barotropic transport [uv]h to compute the energy budget diagnostics. A detailed discussion and exploration of this issue can be found in ocean-eddy-cpt#25.

As a result of not computing the energetics in MOM_diagnostics, GLwork is not exactly contained in KE_visc. KE_visc represents the energetics of all vertical viscosity contributions, including the GL90 vertical viscosity. We could implement a term KE_visc_gl90 that can be 1-to-1 compared to KE_visc; that is, KE_visc - KE_visc_gl90 would represent exactly the energetics of all viscosity contributions EXCEPT the GL90 viscosity. If we implemented KE_visc_gl90, this term would in practice be very similar as GLwork, but sign-definiteness is not ensured, see above.

This adds a new vertical viscosity parameterization as in Greatbatch and Lamb (1990),
Ferreira & Marshall (2006) and Zhao & Vallis (2008), hereafter referred to as the GL90
vertical viscosity parameterization. This vertical viscosity scheme redistributes momentum
in the vertical, and is the equivalent of the Gent & McWilliams (1990) parameterization,
but in a TWA (thickness-weighted averaged) set of equations. The vertical viscosity coefficient
nu is computed from kappa_GM via thermal wind balance, and the following relation:

nu = kappa_GM * f^2 / N^2.

The vertical viscosity del_z ( nu del_z u) is applied to the momentum equation with stress-free
boundary conditions at the top and bottom.

In the current implementation, kappa_GM is assumed either (a) constant or as (b) having an
EBT structure. A third possible formulation of nu is depth-independent:

nu = f^2 * alpha

The latter formulation would be equivalent to a kappa_GM that varies as N^2 with depth.
Currently, the GL90 parameterization is only implemented in stacked shallow water (SSW) mode,
in which case we have 1/N^2 = h/g'.

More specifically, this commit adds a new subroutine that computes the couping coefficient
associated with GL90 via

a_cpl_gl90 = nu / h = kappa_GM * f^2 / g'

or

a_cpl_gl90 = nu / h = f^2 * alpha / h.

Further, a_cpl_gl90 is multiplied by a function (botfn), which is 0 within the GL90 bottom boundary
layer, whose depth is set by Hbbl_gl90, and 1 otherwise. This modification is necessary to avlid fluxing
momentum into vanished layers that ride over steep topography.

Finally, a_cpl_gl90 is added to a_cpl, where the latter is the coupling coefficient associated with the
remaining vertical stresses, used in the vertical viscosity solver.

More information can be found in Loose et al. (https://www.essoar.org/doi/abs/10.1002/essoar.10512867.1),
Appendix B.
Change g' --> g^prime because doxygen and style test does not like
the apostrophe.
New diagnostics:
* au_gl90_visc: zonal viscous coupling coefficient associated with GL90, is contained in au_visc
* av_gl90_visc: meridional viscous coupling coefficient associated with GL90, is contained in av_visc
* Kv_gl90_u: GL90 vertical viscosity at u-points, is contained in Kv_u
* Kv_gl90_v: GL90 vertical viscosity at v-points, is contained in Kv_v
New diagnostics:
* du_dt_visc_gl90: zonal acceleration due to GL90 vertical viscosity, included in du_dt_visc
* dv_dt_visc_gl90: meridional acceleration due to GL90 vertical viscosity, included in dv_dt_visc
New diagnostics:
* GLwork: Kinetic Energy Source from GL90 Vertical Viscosity

The energetics of the GL90 parameterization (named "GLwork") are intentionally computed in
MOM_vert_friction, rather than in MOM_diagnostics, where the reamining kinetic energy budget
terms are computed. We have to do the computation in MOM_vert_friction to ensure sign-
definiteness when GLwork is summed in the vertical. Indeed, MOM_diagnostics does not have
access to the velocities and thicknesses used in the vertical solver, but rather uses a time-mean
barotropic transport [uv]h to compute the energy budget diagnostics. A detailed discussion and
exploration of this issue can be found in ocean-eddy-cpt#25.

As a result of not computing the energetics in MOM_diagnostics, GLwork is not exactly contained
in KE_visc. KE_visc represents the energetics of all vertical viscosity contributions, including
the GL90 vertical viscosity. We could implement a term "KE_visc_gl90" that can be 1-to-1 compared
to KE_visc; that is, KE_visc - KE_visc_gl90 would represent exactly the energetics of all viscosity
contributions EXCEPT the GL90 viscosity. If we implemented KE_visc_gl90, this term would in practice
be very similar as GLwork, but sign-definiteness is not ensured, see above.
@codecov
Copy link

codecov bot commented Dec 23, 2022

Codecov Report

Merging #293 (0128a4e) into dev/gfdl (78c91cd) will increase coverage by 0.05%.
The diff coverage is 74.19%.

@@             Coverage Diff              @@
##           dev/gfdl     #293      +/-   ##
============================================
+ Coverage     37.05%   37.10%   +0.05%     
============================================
  Files           263      263              
  Lines         73698    73791      +93     
  Branches      13731    13759      +28     
============================================
+ Hits          27309    27382      +73     
+ Misses        41349    41348       -1     
- Partials       5040     5061      +21     
Impacted Files Coverage Δ
src/core/MOM_variables.F90 46.96% <ø> (ø)
...c/parameterizations/vertical/MOM_vert_friction.F90 58.53% <74.19%> (+1.41%) ⬆️
src/framework/MOM_document.F90 73.79% <0.00%> (+0.87%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

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

Once again, the documentation of this pull request and the rationale behind it is absolutely superb. Thank you for this valuable contribution, @NoraLoose!

There are two issues here that I think are worth revisiting.

  1. I am uncomfortable with the idea of adding terms to the diagnostic energy budget that do not add up, so the proposed idea (aired in the discussion) of adding the alternative diagnostic of the contributions of GL to the energy budget, as calculated with the transports used in the other terms (even though GL is no longer sign definite) would seem to be a good idea. This could be a reasonable follow-up to this PR, and it is not a reason not to accept this PR.

  2. The other thing that makes me a bit uneasy is that this PR is requiring that we add halo updates to this module. In other places (for example in the lateral parameterization directory), the way that we have avoided this is by doing all of the calculations on a symmetric grid, even if we are using non-symmetric memory. I think that we could probably do the same thing here, but doing so would go well beyond what would be reasonable to ask of this PR.

So I am approving this PR as written (pending it passing the pipeline testing, of course), but I think that we should add also an issue to explore whether or when it would make sense to to symmetric calculations for the vertical viscosity. I also think that the we should add the complementary (non-sign-definite) GL work diagnostics that could be used with the rest of the closed energy budget.

@NoraLoose
Copy link
Author

Thanks for your review and comments, @Hallberg-NOAA!

Re 1.: This would be really quick for me to do (I even have this implemented in another branch), so I will open another PR with the complementary GL work diagnostic.

Re 2.: I would probably need some help with this one. Do you mind opening the issue? I would have to dive a bit more into non-symmetric / symmetric memory handling before being able to state the problem clearly.

@marshallward
Copy link
Member

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/17903 ✔️ 🟡

This has rebase conflicts but I will squash-merge it if OK with @NoraLoose. (Two of the commits look significant, the others can probably be squashed).

@Hallberg-NOAA
Copy link
Member

Because there were other commits merged into dev/gfdl after this PR was approved, than then had to be merged back onto this PR, I triggered the pipeline testing anew at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/17922. Unfortunately, this is now failing at run-time with the gnu and pgi compilers, but not intel nor for the gnu-restarts runs, for reasons that are not clear. It is possible that these failures have to do with the status of Gaea and its filesystems, rather than anything to do with this commit.

@marshallward
Copy link
Member

marshallward commented Jan 9, 2023

https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/17922 ✔️ 🟡

I will squash-merge this one.

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.

3 participants