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

A few minor changes in vertical viscosity #838

Merged
merged 2 commits into from
Feb 23, 2025

Conversation

herrwang0
Copy link

@herrwang0 herrwang0 commented Feb 20, 2025

This PR refactors a few random lines in vertical viscosity.

  • Remove an unused parameter Prandtl_turb in vertvisc_type, which also allows the said parameter documented in the correct section in MOM_parameter_doc
  • In subroutine set_viscous_BBL, move and merge two instances of u2_bg calculation to avoid redundancy and if-branch within do-loops.
  • In subroutine set_viscous_BBL, add a comment on explaining the reason to reset Ray_[uv]
  • In subroutine find_coupling_coef, replace an if-branch with min()

This PR does not change answers.

05b1e06: Remove Prandtl_turb from vertvisc_type
d63ea3b: Minor changes to vertical viscosity

@herrwang0 herrwang0 added the refactor Code cleanup with no changes in functionality or results label Feb 20, 2025
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.

I agree that all of these changes are useful simplifications or clarifications of the code.

The field is never used by MOM_set_visc and incorrectly logged under
MOM_set_visc section in MOM_parameter_doc, rather than MOM_kappa_shear.
* In subroutine set_viscous_BBL, move and merge `u2_bg` calculation to
avoid redundancy and if-branch within do-loops.
* In subroutine set_viscous_BBL, add a comment on explaining the reason
to reset Ray_[uv]
* In subroutine find_coupling_coef, replace an if-branch with min()
@Hallberg-NOAA
Copy link
Member

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/26485 with the expected warnings about a change in the order of entries in the MOM_parameter_doc files.

@Hallberg-NOAA Hallberg-NOAA merged commit 809d56e into NOAA-GFDL:dev/gfdl Feb 23, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code cleanup with no changes in functionality or results
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants