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 and use US%Pa_to_RL2_T2 and US%Pa_to_RLZ_T2 #339

Merged
merged 4 commits into from
Apr 20, 2023

Conversation

Hallberg-NOAA
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA commented Mar 14, 2023

This PR adds the new elements Pa_to_RL2_T2 and Pa_to_RLZ_T2 to the unit_scale_type and then uses them to simplify the expressions rescaling various input pressures and wind stresses. I find this convenient in part because I find myself having to reconstruct the combination of basic mks units that are Pascals when evaluating the correctness of expressions using it, whereas I think that this combined scaling factor makes the consistency more readily apparent, while also making the code shorter. In addition the new runtime parameter TAUX_MAGNITUDE was added for several ocean-only configurations to replace some previously hard-coded dimensional constants, with default values that match those hard-coded constants in each case. By default, all answers are bitwise identical, but there are two new elements in a transparent public type, and there are new entries in some MOM_parameter_doc.short files.

The commits in this PR include:

  • a62ea7155 +Add runtime parameter TAUX_MAGNITUDE
  • e25c4cddb Use US%Pa_to_RL2_T2 to rescale pressures
  • 3b70880cd +Add Pa_to_RL2_T2 and Pa_to_RLZ_T2 to US type

  Add the combined unit scaling factors Pa_to_RL2_T2 and Pa_to_RLZ_T2 to the
unit_scale_type to rescale pressures and wind stresses.  All answers are bitwise
identical, but there are two new elements in a public type.
  Use the new combined unit scaling factor US%Pa_to_RL2_T2 to rescale input
pressure fields and US%Pa_to_RLZ_T2 to rescale input wind stresses in various
places in the MOM6 code, including in the solo_driver and FMS_cap drivers.
Analogous changes could also be made to the mct and nuopc surface forcing files,
but have been omitted for now.  All answers are bitwise identical.
  Added the new runtime parameter TAUX_MAGNITUDE to set the strength of the
zonal wind stresses when WIND_CONFIG = "2gyre", "1gyre" or "Neverworld", with a
default that matches the previous hard-coded dimensional parameters that were
used to specify the wind stresses in these cases.  Also use US%Pa_to_RLZ_T2 to
rescale wind stresses throughout solo_driver/MOM_surface_forcing.F90.  By
default, all answers are bitwise identical, but there is a new runtime parameter
in the MOM_parameter_doc files for some test cases.
@Hallberg-NOAA Hallberg-NOAA added the enhancement New feature or request label Mar 14, 2023
@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Merging #339 (7345c59) into dev/gfdl (fc823f5) will decrease coverage by 0.01%.
The diff coverage is 27.50%.

❗ Current head 7345c59 differs from pull request most recent head b88e39b. Consider uploading reports for the commit b88e39b to get more accurate results

@@             Coverage Diff              @@
##           dev/gfdl     #339      +/-   ##
============================================
- Coverage     37.07%   37.07%   -0.01%     
============================================
  Files           264      264              
  Lines         74347    74349       +2     
  Branches      13784    13787       +3     
============================================
  Hits          27567    27567              
  Misses        41684    41684              
- Partials       5096     5098       +2     
Impacted Files Coverage Δ
...g_src/drivers/solo_driver/MESO_surface_forcing.F90 0.00% <0.00%> (ø)
...g_src/drivers/solo_driver/user_surface_forcing.F90 0.00% <0.00%> (ø)
src/ALE/MOM_hybgen_regrid.F90 0.00% <0.00%> (ø)
src/core/MOM_PressureForce_FV.F90 40.95% <ø> (ø)
src/initialization/MOM_state_initialization.F90 21.51% <0.00%> (ø)
src/user/Idealized_Hurricane.F90 0.00% <0.00%> (ø)
src/user/dumbbell_surface_forcing.F90 0.00% <0.00%> (ø)
...ig_src/drivers/solo_driver/MOM_surface_forcing.F90 24.39% <17.39%> (-0.14%) ⬇️
src/ALE/MOM_regridding.F90 28.73% <33.33%> (ø)
src/core/MOM.F90 51.41% <100.00%> (ø)
... and 3 more

... and 1 file with indirect coverage changes

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

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.

Certainly more convenient.

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit c32be04 into NOAA-GFDL:dev/gfdl Apr 20, 2023
@Hallberg-NOAA Hallberg-NOAA deleted the add_US_Pa_to_RLZ_T2 branch May 10, 2024 22:14
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.

3 participants