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 6 runtime parameters for OBC testcase initialization modules #290

Merged

Conversation

Hallberg-NOAA
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA commented Dec 23, 2022

This PR adds 6 new runtime parameters to replace hard-coded dimensional
parameters in 3 user modules (dumbbell_initialization, Kelvin_initialization and
tidal_bay_initialization) that were added to provide tests of the OBC code. The
new runtime parameters that were added are DUMBBELL_T_LIGHT, KELVIN_WAVE_PERIOD,
KELVIN_WAVE_SSH_AMP, KELVIN_WAVE_INFLOW_AMP, TIDAL_BAY_PERIOD and
TIDAL_BAY_SSH_ANOM. By default all answers are bitwise identical, but there are
new entries in the MOM_parameter_doc.all files for configurations using the
three impacted modules.

The commits in this PR include:

  • 7c12ead59 +Add runtime parameters for tidal_bay_initialization
  • 780ff973e +Add runtime parameters for Kelvin_initialization
  • 9b3f1ba2f +Add runtime parameter for dumbbell_initialization

@Hallberg-NOAA Hallberg-NOAA added documentation Improvements or additions to documentation Parameter change Input parameter changes (addition, removal, or description) labels Dec 23, 2022
@codecov
Copy link

codecov bot commented Dec 23, 2022

Codecov Report

Merging #290 (b4d72ae) into dev/gfdl (ec7a57f) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##           dev/gfdl     #290      +/-   ##
============================================
- Coverage     37.07%   37.07%   -0.01%     
============================================
  Files           263      263              
  Lines         73620    73623       +3     
  Branches      13720    13720              
============================================
- Hits          27295    27294       -1     
- Misses        41287    41292       +5     
+ Partials       5038     5037       -1     
Impacted Files Coverage Δ
src/user/Kelvin_initialization.F90 0.00% <0.00%> (ø)
src/user/dumbbell_initialization.F90 0.00% <0.00%> (ø)
src/user/tidal_bay_initialization.F90 0.00% <0.00%> (ø)
src/framework/MOM_document.F90 73.88% <0.00%> (-0.23%) ⬇️

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

@kshedstrom
Copy link

This looks reasonable to me and indeed the answers don't change. However, this diff shows up in a rescaling test:

diff --git a/ocean_only/dumbbell/z_sub_scale/ocean.stats.gnu b/ocean_only/dumbbell/z_sub_scale/ocean.stats.gnu
index 936e7aea..ec7ad6b2 100644
--- a/ocean_only/dumbbell/z_sub_scale/ocean.stats.gnu
+++ b/ocean_only/dumbbell/z_sub_scale/ocean.stats.gnu
@@ -1,5 +1,5 @@
   Step,       Day,  Truncs,      Energy/Mass,      Maximum CFL,  Mean Sea Level,  Total Mass,  Mean Salin, Mean Temp, Frac Mass Err,   Salin Err,    Temp Err
             [days]                 [m2 s-2]           [Nondim]       [m]             [kg]         [PSU]      [degC]       [Nondim]        [PSU]        [degC]
-     0,       0.000,     0, En 0.0000000000000000E+00, CFL  0.00000, SL -0.0000E+00, M 3.31200E+16, S 35.0000, T 20.0000, Me  0.00E+00, Se  0.00E+00, Te  0.00E+00
-   288,       1.000,     0, En 6.0127460425594859E-01, CFL  0.15245, SL  1.3496E-02, M 3.31202E+16, S 35.0018, T 20.0000, Me  6.75E-06, Se  2.05E-03, Te  1.35E-04
-   576,       2.000,     0, En 8.1123424430088376E-01, CFL  0.13976, SL  4.0475E-02, M 3.31207E+16, S 35.0039, T 20.0000, Me  1.35E-05, Se  2.57E-03, Te  2.70E-04
+     0,       0.000,     0, En 0.0000000000000000E+00, CFL  0.00000, SL -0.0000E+00, M 3.31200E+16, S 35.0000, T  0.0000, Me  0.00E+00, Se  0.00E+00, Te  0.00E+00
+   288,       1.000,     0, En 6.0127460425594859E-01, CFL  0.15245, SL  1.3496E-02, M 3.31202E+16, S 35.0018, T  0.0000, Me  6.75E-06, Se  2.05E-03, Te  2.93E-23
+   576,       2.000,     0, En 8.1123424430088376E-01, CFL  0.13976, SL  4.0475E-02, M 3.31207E+16, S 35.0039, T  0.0000, Me  1.35E-05, Se  2.57E-03, Te  5.85E-23

Note the "mean temp".

  Added the new runtime parameter DUMBBELL_T_LIGHT to specify the previously
hard-coded dimensional parameters in the dumbbell_initialization module.  Also
used G%x_ax_unit_short to describe the units of the DUMBBELL_LEN.  By default
all answers are bitwise identical, but there is a new entry in the
MOM_parameter_doc.all files for the dumbbell test case.
  Added the new runtime parameters KELVIN_WAVE_PERIOD, KELVIN_WAVE_SSH_AMP and
KELVIN_WAVE_INFLOW_AMP to specify the previously hard-coded dimensional
parameters in the Kelvin_initialization module.  This change includes the
addition of 3 new elements in the Kelvin_OBC_CS type.  By default all answers
are bitwise identical, but there are new entries in the MOM_parameter_doc.all
files for configurations using the Kelvin_initialization module.
  Added the new runtime parameters TIDAL_BAY_PERIOD and TIDAL_BAY_SSH_ANOM to
specify the previously hard-coded dimensional parameters in the
tidal_bay_initialization module.  This change includes the addition of 2 new
elements in the tidal_bay_OBC_CS type.  By default all answers are bitwise
identical, but there are new entries in the MOM_parameter_doc.all files for
configurations using the tidal_bay_initialization module.
@Hallberg-NOAA
Copy link
Member Author

I had put in the reciprocal of the right scaling factor in the get_param call for DUMBBELL_T_SURF with the previous version of this PR. It has now been corrected. @kshedstrom, if you would be willing to try out this revised version, I would appreciate it.

@kshedstrom
Copy link

Better now! I approve this PR.

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.

Approved on behalf of @kshedstrom

@marshallward
Copy link
Member

Gaea regression: #290 ✔️

@marshallward marshallward merged commit 40c24c5 into NOAA-GFDL:dev/gfdl Dec 29, 2022
@Hallberg-NOAA Hallberg-NOAA deleted the explicit_OBC_user_params branch February 2, 2023 13:37
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 Parameter change Input parameter changes (addition, removal, or description)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants