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

+(*)Use reproducing sums to homogenize fields #303

Merged
merged 2 commits into from
Jan 28, 2023

Conversation

Hallberg-NOAA
Copy link
Member

Added the ability to use reproducing sums to create spatially homogenized tracer fields when Z_INIT_HOMOGENIZE = True, for rotational symmetry and consistency across layouts. The previous version had used non-reproducing sums. This new code is used when HOR_REGRID_ANSWER_DATE >= 20230101, and the comments describing HOR_REGRID_ANSWER_DATE have been updated to reflect this. As a part of this change, the new publicly visible routine homogenize_field was added to the MOM_horizontal_regridding module, so that the homogenization occurs in a single part of the code rather than being spread across several files.

By default this commit could lead to answer changes in some cases, depending on whether and how HOR_REGRID_ANSWER_DATE is set, but it turns out that the existing single_column test cases that use this have only 4 points and happen to give the same answers with either the older or newer version of the code.

This commit addresses MOM6 issue #296 (github.com//issues/296), which can be closed as soon as this commit is merged in to the dev/gfdl branch of MOM6.

  Added the ability to use reproducing sums to create spatially homogenized
tracer fields when Z_INIT_HOMOGENIZE = True, for rotational symmetry and
consistency across layouts.  The previous version had used non-reproducing
sums.  This new code is used when HOR_REGRID_ANSWER_DATE >= 20230101, and the
comments describing HOR_REGRID_ANSWER_DATE have been updated to reflect this. As
a part of this change, the new publicly visible routine homogenize_field was
added to the MOM_horizontal_regridding module, so that the homogenization
occurs in a single part of the code rather than being spread across several
files.

  By default this commit could lead to answer changes in some cases, depending
whether and how HOR_REGRID_ANSWER_DATE is set, but it turns out that the
existing single_column test cases that use this have only 4 points and happen to
give the same answers with either the older or newer version of the code.

  This commit addresses MOM6 issue mom-ocean#296 (github.com/NOAA-GFDL/issues/296),
which can be closed as soon as this commit is merged in to the dev/gfdl branch
of MOM6.
@Hallberg-NOAA Hallberg-NOAA added bug Something isn't working enhancement New feature or request answer-changing A change in results (actual or potential) labels Jan 7, 2023
@codecov
Copy link

codecov bot commented Jan 7, 2023

Codecov Report

Merging #303 (5302f22) into dev/gfdl (1fe52f7) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##           dev/gfdl     #303      +/-   ##
============================================
- Coverage     37.18%   37.17%   -0.01%     
============================================
  Files           265      265              
  Lines         74398    74401       +3     
  Branches      13820    13821       +1     
============================================
- Hits          27666    27660       -6     
- Misses        41648    41657       +9     
  Partials       5084     5084              
Impacted Files Coverage Δ
src/framework/MOM_horizontal_regridding.F90 45.29% <0.00%> (-2.40%) ⬇️
src/initialization/MOM_state_initialization.F90 21.51% <0.00%> (+0.20%) ⬆️
...nitialization/MOM_tracer_initialization_from_Z.F90 0.00% <ø> (ø)
src/parameterizations/vertical/MOM_ALE_sponge.F90 21.46% <ø> (ø)
src/framework/MOM_document.F90 72.92% <0.00%> (-0.44%) ⬇️

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

Copy link
Member

@marshallward marshallward left a comment

Choose a reason for hiding this comment

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

This is under an answer date check, so should be safe.

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit b22617c into NOAA-GFDL:dev/gfdl Jan 28, 2023
@Hallberg-NOAA Hallberg-NOAA deleted the reproducing_homog branch May 10, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answer-changing A change in results (actual or potential) bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Z_INIT_HOMOGENIZE=True uses non-reproducing and potentially incorrect averages
2 participants