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

+Eliminated h_neglect argument to remapping_core_h #705

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

Hallberg-NOAA
Copy link
Member

Eliminated the previously optional h_neglect and h_neglect_edge arguments to remapping_core_h() and remapping_core_w(), and added optional h_neglect and h_neglect_edge arguments to initialize_remapping() for storage in the remapping control structures. The answer_date, h_neglect and h_neglect_edge arguments to ALE_remap_scalar() were also eliminated, as they are no longer used. The new routine open_boundary_setup_vert() was added to manage these changes. A new verticalGrid_type argument was added to wave_speed_init().

The h_neglect argument to 29 routines was made non-optional, because there is no way to provide a consistent hard-coded default for a dimensional parameter. The (mostly low-level) routines where this change to a non-optional h_neglect was made include build_reconstructions_1d(), P1M_interpolation(), P3M_interpolation(), P3M_boundary_extrapolation(), PLM_reconstruction(), PLM_boundary_extrapolation(), PPM_reconstruction(), PPM_limiter_standard(), PPM_boundary_extrapolation(), PQM_reconstruction(), PQM_limiter(), PQM_boundary_extrapolation_v1(), build_hycom1_column(), build_rho_column(), bound_edge_values(), edge_values_explicit_h4(), edge_values_explicit_h4cw(), edge_values_implicit_h4(), edge_slopes_implicit_h3(), edge_slopes_implicit_h5(), edge_values_implicit_h6(), regridding_set_ppolys(), build_and_interpolate_grid(), remapByProjection(), remapByDeltaZ(), and integrateReconOnInterval().

In two modules (MOM_open_boundary and MOM_wave_speed), two separate copies of remapping_CS variables were needed to accommodate different negligible thicknesses or units in different remapping calls.

In those routines that also have an optional h_neglect_edge argument, the default is now set to h_neglect. Improperly hard-coded dimensional default values for h_neglect or h_neglect_edge were eliminated in 16 places as a result of this change, but they were added back in 2 unit testing routines (one of these is archaic and unused) that do not use exercise dimensional rescaling tests.

Because the previously optional arguments were already present in all calls from the dev/gfdl or main branches of the MOM6 code, and because the places where arguments have been removed they are balanced by equivalent arguments added to initialize_remapping(), all answers are bitwise identical in the regression tests, but this change in interfaces could impact other code that is not in the main branch of MOM6.

  Eliminated the previously optional h_neglect and h_neglect_edge arguments to
remapping_core_h and remapping_core_w, and added optional h_neglect and
h_neglect_edge arguments to initialize_remapping for storage in the remapping
control structures.  The answer_date, h_neglect and h_neglect_edge arguments
to ALE_remap_scalar were also eliminated, as they are no longer used.
The new routine open_boundary_setup_vert was added to manage these changes.
A new verticalGrid_type argument was added to wave_speed_init.

  The h_neglect argument to 29 routines was made non-optional, because there is
no way to provide a consistent hard-coded default for a dimensional parameter.
The (mostly low-level) routines where this change to a non-optional h_neglect
was made include  build_reconstructions_1d, P1M_interpolation,
P3M_interpolation, P3M_boundary_extrapolation, PLM_reconstruction,
PLM_boundary_extrapolation, PPM_reconstruction, PPM_limiter_standard,
PPM_boundary_extrapolation, PQM_reconstruction, PQM_limiter,
PQM_boundary_extrapolation_v1, build_hycom1_column, build_rho_column,
bound_edge_values, edge_values_explicit_h4, edge_values_explicit_h4cw,
edge_values_implicit_h4, edge_slopes_implicit_h3, edge_slopes_implicit_h5,
edge_values_implicit_h6, regridding_set_ppolys, build_and_interpolate_grid,
remapByProjection, remapByDeltaZ, and integrateReconOnInterval.

  In two modules (MOM_open_boundary and MOM_wave_speed), two separate copies of
remapping_CS variables were needed to accommodate different negligible
thicknesses or units in different remapping calls.

  In those cases that also have an optional h_neglect_edge argument the default
is now set to h_neglect.  Improperly hard-coded dimensional default values for
h_neglect or h_neglect_edge were eliminated in 16 places as a result of this
change, but they were added back in 2 unit testing routines (one of these is
archaic and unused) that do not use exercise dimensional rescaling tests.

  Because the previously optional arguments were already present in all calls
from the dev/gfdl or main branches of the MOM6 code, and because the places
where arguments have been removed they are balanced by equivalent arguments
added to initialize_remapping, all answers are bitwise identical in the
regression tests, but this change in interfaces could impact other code that is
not in the main branch of MOM6.
Copy link
Member

@adcroft adcroft left a comment

Choose a reason for hiding this comment

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

It took a while to understand why wave_speed had a second copy of the remapping_CS but now that I do, this is good to go.

Testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25109

@adcroft
Copy link
Member

adcroft commented Oct 30, 2024

Retested after c5 OS update at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25319

@adcroft adcroft merged commit e189e05 into NOAA-GFDL:dev/gfdl Oct 30, 2024
10 checks passed
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