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

+Refactored diapyc_energy_req_test #486

Merged
merged 3 commits into from
Oct 19, 2023

Conversation

Hallberg-NOAA
Copy link
Member

Refactored diapyc_energy_req_test and diapyc_energy_req_calc to remove the dependence on the Boussinesq reference density when in non-Boussinesq mode. This includes changes to the scaled units of the Kd_int argument to diapyc_energy_req_calc and the Kd argument to diapyc_energy_req_calc and the addition of a new argument to diapyc_energy_req_calc. A call to thickness_to_dz is used for the thickness unit conversions. There are 5 new internal variables, and changes to the units of several others.

These routines are not actively used in MOM6 solutions, but instead they are used for testing and debugging new code, so there are no changes to solutions, but the results of these routines can differ in fully non-Boussinesq mode.

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Merging #486 (8190530) into dev/gfdl (0c491ce) will increase coverage by 0.04%.
The diff coverage is 0.00%.

❗ Current head 8190530 differs from pull request most recent head 2d2a822. Consider uploading reports for the commit 2d2a822 to get more accurate results

@@             Coverage Diff              @@
##           dev/gfdl     #486      +/-   ##
============================================
+ Coverage     37.78%   37.82%   +0.04%     
============================================
  Files           270      270              
  Lines         78457    78359      -98     
  Branches      14532    14497      -35     
============================================
- Hits          29643    29642       -1     
+ Misses        43409    43312      -97     
  Partials       5405     5405              
Files Coverage Δ
...rameterizations/vertical/MOM_diapyc_energy_req.F90 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

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

  Refactored diapyc_energy_req_test and diapyc_energy_req_calc to remove the
dependence on the Boussinesq reference density when in non-Boussinesq mode.
This includes changes to the scaled units of the Kd_int argument to
diapyc_energy_req_calc and the Kd argument to diapyc_energy_req_calc and the
addition of a new argument to diapyc_energy_req_calc.  A call to thickness_to_dz
is used for the thickness unit conversions.  There are 5 new internal variables,
and changes to the units of several others.

  These routines are not actively used in MOM6 solutions, but instead they are
used for testing and debugging new code, so there are no changes to solutions,
but the results of these routines can differ in fully non-Boussinesq mode.
  Modified the MOM_diapyc_energy_req.F90 version of find_PE_chg to align more
closely with the version in MOM_energetic_PBL.F90, including making PE_chg into
a mandatory argument, changing the name of the ColHt_cor argument to
PE_ColHt_cor, and modifying some variable descriptions in units.  Also removed
find_PE_chg_orig from MOM_diapyc_energy_req.F90 and the old_PE_calc code that
calls it.  Extra values were also added to Te, Te_a and Te_b and the equivalent
salinity variables so that the logical branches at (K==2) and (K=nz) could be
simplied out of diapyc_energy_req_calc.  Because old_PE_calc had been hard-coded
to .false., all answers are bitwise identical.
@Hallberg-NOAA
Copy link
Member Author

A second commit has been added to this PR to more completely refactor this module. It modifies the MOM_diapyc_energy_req.F90 version of find_PE_chg to align more closely with the version in MOM_energetic_PBL.F90, including making PE_chg into a mandatory argument, changing the name of the ColHt_cor argument to PE_ColHt_cor, and modifying some variable descriptions in units. Also removed find_PE_chg_orig from MOM_diapyc_energy_req.F90 and the old_PE_calc code that calls it. Extra values were also added to Te, Te_a and Te_b and the equivalent salinity variables so that the logical branches at (K==2) and (K=nz) could be simplied out of diapyc_energy_req_calc. Because old_PE_calc had been hard-coded to .false., all answers are bitwise identical.

@marshallward marshallward self-assigned this Oct 16, 2023
@marshallward
Copy link
Member

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

@marshallward marshallward merged commit 43a4fa9 into NOAA-GFDL:dev/gfdl Oct 19, 2023
10 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the nonBous_energy_req branch November 8, 2023 23:09
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