Skip to content

Bugfix: Pure pot. density coord diags w/ one layer#948

Merged
adcroft merged 2 commits into
mom-ocean:dev/gfdlfrom
marshallward:rlay_onelayer
Jul 11, 2019
Merged

Bugfix: Pure pot. density coord diags w/ one layer#948
adcroft merged 2 commits into
mom-ocean:dev/gfdlfrom
marshallward:rlay_onelayer

Conversation

@marshallward
Copy link
Copy Markdown
Collaborator

@marshallward marshallward commented Jul 11, 2019

For experiments with a single layer (e.g. unit_tests), the "pure
potential density coordinate" diagnostics (h_Rlay, uh_Rlay, ...) would
apply an interpolation to extend values into the mixed layers. However,
most of this subroutine assumes at least two layers, including some "nz
/ 2" divisions which reduce to zero, and memory accesses to levels greater
than nz.

Overall, this calculation does not make much sense when there is one
layer, for both physical and computational reasons.

Normally the nkmb parameter is changed from zero to nz when not in
isopycnal mode, applying the interpolation across the entire column,
which avoids the interpolating loops and simply transfers the layered
values to the diagnostic.

We resolve this issue by only apply nkmb = nz when there is more than
one layer, and transfer values regardless of the mode.

For experiments with a single layer (e.g. unit_tests), the "pure
potential density coordinate" diagnostics (h_Rlay, uh_Rlay, ...) would
apply an interpolation to extend values into the mixed layers.  However,
most of this subroutine assumes at least two layers, including some "nz
/ 2" divisions which reduce to zero, and memory accesses to levels greater
than nz.

Overall, this calculation does not make much sense when there is one
layer, for both physical and computational reasons.

Normally the `nkmb` parameter is changed from zero to `nz` when not in
isopycnal mode, applying the interpolation across the entire column,
which avoids the interpolating loops and simply transfers the layered
values to the diagnostic.

We resolve this issue by only apply "nkmb = z" when there is more than
one layer, and transfer values regardless of the mode.
@marshallward
Copy link
Copy Markdown
Collaborator Author

GitLab test running here: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/8454

It includes a merge of the latest dev/gfdl update.

@adcroft adcroft merged commit a31b512 into mom-ocean:dev/gfdl Jul 11, 2019
@marshallward marshallward deleted the rlay_onelayer branch July 11, 2019 17:31
Hallberg-NOAA pushed a commit to Hallberg-NOAA/MOM6 that referenced this pull request Aug 6, 2025
* (*) Add option for minmod limiter for RayTracing

This PR adds a minmod limiter option for the advection
of the internal tides energy, which becomes the new default.
The current positive definite scheme is kept as an option
but has shown to create ripples at the grid scale.

* change adv_limiter options from string to integer

---------

Co-authored-by: Raphael Dussin <Raphael.Dussin@noaa.gov>
herrwang0 pushed a commit to herrwang0/MOM6 that referenced this pull request Aug 27, 2025
* (*) Add option for minmod limiter for RayTracing

This PR adds a minmod limiter option for the advection
of the internal tides energy, which becomes the new default.
The current positive definite scheme is kept as an option
but has shown to create ripples at the grid scale.

* change adv_limiter options from string to integer

---------

Co-authored-by: Raphael Dussin <Raphael.Dussin@noaa.gov>
Hallberg-NOAA pushed a commit to Hallberg-NOAA/MOM6 that referenced this pull request Aug 29, 2025
* (*) Add option for minmod limiter for RayTracing

This PR adds a minmod limiter option for the advection
of the internal tides energy, which becomes the new default.
The current positive definite scheme is kept as an option
but has shown to create ripples at the grid scale.

* change adv_limiter options from string to integer

---------

Co-authored-by: Raphael Dussin <Raphael.Dussin@noaa.gov>
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.

2 participants