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 option to use Hybgen regridding #101

Merged

Conversation

Hallberg-NOAA
Copy link
Member

This PR adds the ability to use Hybgen regridding, derived from Hycom
code. There are two new files, MOM_hybgen_regrid.F90 and MOM_hybgen_unmix.F90,
which in turn add 15 new runtime parameters (with names like HYBGEN_...) to
control the hybgen code. This new regridding option is specified by setting
REGRIDDING_COORDINATE_MODE="HYBGEN", and this new option is listed in the
MOM_parameter_doc files for cases that have USE_REGRIDDING=True. There is also
a new publicly visible parameter, REGRIDDING_HYBGEN, in regrid_consts.F90.

In addition, the new routine regridding_preadjust_reqs is provided in
MOM_regridding.F90 to specify whether convective adjustment or hybgen_unmixing
should be done before regridding. These pre-adjustment steps are no longer in
regridding_main. Instead the calls do this occur outside of regridding_main if
they are needed.

The unused routine ALE_build_grid was eliminated, and comments were added
describing a few undocumented internal real variables.

All answers are bitwise identical, but there are several new or modified
public interfaces and there will be new lines in the comments in some
MOM_parameter_doc files.

The commits in this PR include:

  • 20b3a5317 +Convective adjustment outside regridding_main
  • 5d66a7959 +Add Hybgen regridding

  This commit adds the ability to use Hybgen regridding, derived from Hycom
code.  There are two new files, MOM_hybgen_regrid.F90 and MOM_hybgen_unmix.F90,
which in turn add 15 new runtime parameters (with names like HYBGEN_...) to
control the hybgen code.  This new regridding option is specified via
REGRIDDING_COORDINATE_MODE="HYBGEN", and this new option is listed in the
MOM_parameter_doc files for cases that have USE_REGRIDDING=True.  There is also
a new publicly visible parameter, REGRIDDING_HYBGEN, in regrid_consts.F90.

  In addition, the new routine regridding_preadjust_reqs is
provided in MOM_regridding to specify whether convective adjustment or
hybgen_unmixing should be done before regridding.  This is used along with the
optional argument conv_adjust to regridding_main to move these pre-adjustment
steps out of regridding_main.

  The unused routine ALE_build_grid was eliminated, and comments were added
describing a few undocumented internal real variables.

  All answers are bitwise identical, but there are several new public interfaces
and there will be new lines in the comments in some MOM_parameter_doc files.
  Eliminated the option to do convective adjustment within regridding_main,
including making the optional argument conv_adjust mandatory, with an error
message if it is set to .true., so that there will not be the possibility of
this code change silently changing the code behavior or solutions.  After a
decent interval, this argument can be safely eliminated.  As a result of these
changes, the intent of two key arguments to regridding_main() could be changed
from intent(inout) to intent(in), which should help clarify the purpose of this
routine. All answers are bitwise identical, but there are interface changes.
@codecov
Copy link

codecov bot commented Apr 5, 2022

Codecov Report

Merging #101 (b7006f6) into dev/gfdl (78c574b) will decrease coverage by 0.23%.
The diff coverage is 3.85%.

❗ Current head b7006f6 differs from pull request most recent head 20b3a53. Consider uploading reports for the commit 20b3a53 to get more accurate results

@@             Coverage Diff              @@
##           dev/gfdl     #101      +/-   ##
============================================
- Coverage     28.98%   28.75%   -0.24%     
============================================
  Files           246      248       +2     
  Lines         72344    72970     +626     
============================================
+ Hits          20966    20979      +13     
- Misses        51378    51991     +613     
Impacted Files Coverage Δ
src/ALE/MOM_hybgen_regrid.F90 0.00% <0.00%> (ø)
src/ALE/MOM_hybgen_unmix.F90 0.00% <0.00%> (ø)
src/ALE/regrid_consts.F90 42.50% <0.00%> (-3.45%) ⬇️
src/ALE/MOM_ALE.F90 34.77% <19.35%> (+0.25%) ⬆️
src/ALE/MOM_regridding.F90 21.98% <33.33%> (+0.26%) ⬆️
src/initialization/MOM_state_initialization.F90 20.03% <69.23%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78c574b...20b3a53. Read the comment docs.

@Hallberg-NOAA Hallberg-NOAA added the enhancement New feature or request label Apr 7, 2022
@marshallward
Copy link
Member

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

The HYBGEN option has been added to REGRIDDING_COORDINATE_MODE.

@marshallward marshallward merged commit 28ff86e into NOAA-GFDL:dev/gfdl Apr 9, 2022
@Hallberg-NOAA Hallberg-NOAA deleted the add_Hybgen_regridding branch July 16, 2022 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants