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

+Minor code cleanup in initialization modules #301

Merged
merged 6 commits into from
Jan 18, 2023

Conversation

Hallberg-NOAA
Copy link
Member

This PR includes a series of commits that cleans up minor issues with the code in the src/initialization directory. It includes commits that make the formerly optional z_tol arguments to find_depth_of_pressure_in_cell() and cut_off_column_top() non-optional. Two hard-coded but apparently unused fill values for temperature and salinity were replaced with standard fill values for land. It also formally obsoletes the archaic runtime parameter NEW_SPONGES, which required that the MOM_input file for .testing/tc4 be updated to reflect more recent parameter names and defaults. In addition, comments in several other modules were updated to reflect the units of a number of internal variables. All answers are bitwise identical, but there are a few spelling error corrections in some of the documents that go into MOM_parameter_doc files.

The commits in this PR include:

  • 030308afe Added units to comments in MOM_grid_initialization
  • b09f80ac1 Updated comments in MOM_initialize_topography
  • 71d98d435 +Obsoleted the runtime parameter NEW_SPONGES
  • 48adefd5a Revise tc4/MOM_input with updated parameter names
  • 2b4499ed0 +Make z_tol arg non-optional to cut_off_column_top

  Made the previously optional z_tol argument to find_depth_of_pressure_in_cell
and cut_off_column_top non-optional.  It was already being provided except in a
call for unit testing, so adding it as a parameter there led to a simple change
and the elimination of a hard-coded dimensional parameter.  Also replaced the
hard-coded fill values over land in MOM_temp_salt_initialize_from_Z for
temperatures and salinities before regridding with the runtime variables
temp_land_fill and salt_land_fill that are already being used in the same
routine.  This does not change any answers, probably because these values are
not actually used.  All answers are bitwise identical, but some subroutine
arguments have been made non-optional.
  Updated tc4/MOM_input to reflect the newer parameter settings, including
replacing the obsolete NEW_SPONGES parameter with INTERPOLATE_SPONGE_TIME_SPACE.
Without this change, NEW_SPONGES can not be formally and properly obsoleted
without breaking the TC testing.  All answers and testing are identical with
this change.
  Formally obsoleted the runtime parameter NEW_SPONGES.  The agreed upon
replacement is INTERPOLATE_SPONGE_TIME_SPACE, which has been available for
almost a year.  There is a warning message rather than a fatal error if
NEW_SPONGES is used and both are set consistently, and a hint if they are not.
Also added or amended comments describing a number of the internal variables or
their units in MOM_state_initialization.  All answers and output are bitwise
identical.
  Updated the comments in MOM_initialize_topography to reflect the fact that US
is no longer an optional argument.  Only comments are changed, and all answers
are bitwise identical.
  Added a description of the units to the comments for each of the real
variables in MOM_grid_initialization and MOM_shared_initialization.  Only
comments are changed, and all answers are bitwise identical.
@Hallberg-NOAA Hallberg-NOAA added the documentation Improvements or additions to documentation label Jan 5, 2023
@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Merging #301 (dba1df6) into dev/gfdl (54b0701) will decrease coverage by 10.54%.
The diff coverage is 40.81%.

@@              Coverage Diff              @@
##           dev/gfdl     #301       +/-   ##
=============================================
- Coverage     47.63%   37.10%   -10.54%     
=============================================
  Files            41      263      +222     
  Lines          4532    73796    +69264     
  Branches        797    13753    +12956     
=============================================
+ Hits           2159    27384    +25225     
- Misses         2192    41352    +39160     
- Partials        181     5060     +4879     
Impacted Files Coverage Δ
src/core/MOM_density_integrals.F90 17.11% <0.00%> (ø)
src/initialization/MOM_fixed_initialization.F90 61.33% <ø> (ø)
src/initialization/MOM_state_initialization.F90 21.31% <20.00%> (ø)
src/diagnostics/MOM_obsolete_params.F90 70.65% <100.00%> (ø)
src/initialization/MOM_grid_initialize.F90 90.96% <100.00%> (ø)
src/initialization/MOM_shared_initialization.F90 28.82% <100.00%> (ø)
src/ALE/coord_adapt.F90 0.00% <0.00%> (ø)
src/ALE/MOM_hybgen_remap.F90 0.00% <0.00%> (ø)
...ig_src/drivers/solo_driver/MOM_surface_forcing.F90 24.52% <0.00%> (ø)
src/tracer/MOM_tracer_hor_diff.F90 76.54% <0.00%> (ø)
... and 228 more

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

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit 4be437a into NOAA-GFDL:dev/gfdl Jan 18, 2023
@Hallberg-NOAA Hallberg-NOAA deleted the tol_z_arg branch February 2, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants