Skip to content

+*Non-Boussinesq revision of diabatic_aux#443

Merged
marshallward merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:nonBous_diabatic_aux
Sep 28, 2023
Merged

+*Non-Boussinesq revision of diabatic_aux#443
marshallward merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:nonBous_diabatic_aux

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
Member

This commit changes differential_diffuse_TS, diagnoseMLDbyDensityDifference, diagnoseMLDbyEnergy and applyBoundaryFluxesInOut to make them appropriate for use in non-Boussinesq mode, and to eliminate dependencies on the Boussinesq reference density when in that mode. It also adds a new optional argument to extract_optics_slice to enable the use of the layer specific volumes to translate opacities into thickness-based units.

The specific set of changes include:

  • Add the optional argument SpV_avg to extract_optics_slice and use it along with an appropriate value for opacity_scale to optionally convert the units of opacity from [Z-1 ~> m-1] to [H-1 ~> m-1 or m2 kg-1] in non-Boussinesq mode without making use of the Boussinesq reference density.

  • Use thickness_to_dz and work with internal variables in vertical distances in the denominator of diffusive flux calculations in differential_diffuse_T_S, diagnoseMLDbyDensityDifference and diagnoseMLDbyEnergy.

  • Refactored diagnoseMLDbyEnergy for probable efficiencies by calling the equation of state with contiguous arguments.

  • Use specific volume derivatives to calculate non-Boussinesq mode buoyancy fluxes in calculateBuoyancy_Flux1d and applyBoudaryFluxesInOut.

  • Use the inverse of SpV_avg rather than Rho0 in the calculation of the energy input used to drive river mixing when in non-Boussinesq mode.

There are now separate thickness and depth change internal variables in several places to avoid any dependency on the Boussinesq reference density when in non-Boussinesq mode. A total of 8 rescaling factors were eliminated, and in one place, GV%Rho0 was replaced with GV%H_to_RZ.

All Boussinesq answers are bitwise identical, but non-Boussinesq answers will change and become less dependent on the Boussinesq reference density, and there is a new optional argument to a publicly visible subroutine.

  This commit changes differential_diffuse_TS, diagnoseMLDbyDensityDifference,
diagnoseMLDbyEnergy and applyBoundaryFluxesInOut to make them appropriate for
use in non-Boussinesq mode, and to eliminate dependencies on the Boussinesq
reference density when in that mode.  It also adds a new optional argument to
extract_optics_slice to enable the use of the layer specific volumes to
translate opacities into thickness-based units.

  The specific set of changes include:

 - Add the optional argument SpV_avg to extract_optics_slice and use it along
   with an appropriate value for opacity_scale to optionally convert the units
   of opacity from [Z-1 ~> m-1] to [H-1 ~> m-1 or m2 kg-1] in non-Boussinesq
   mode without making use of the Boussinesq reference density.

 - Use thickness_to_dz and work with internal variables in vertical distances in
   the denominator of diffusive flux calculations in differential_diffuse_T_S,
   diagnoseMLDbyDensityDifference and diagnoseMLDbyEnergy.

 - Refactored diagnoseMLDbyEnergy for probable efficiencies by calling the
   equation of state with contiguous arguments.

 - Use specific volume derivatives to calculate non-Boussinesq mode buoyancy
   fluxes in calculateBuoyancy_Flux1d and applyBoudaryFluxesInOut.

 - Use the inverse of SpV_avg rather than Rho0 in the calculation of the energy
   input used to drive river mixing when in non-Boussinesq mode.

  There are now separate thickness and depth change internal variables in
several places to avoid any dependency on the Boussinesq reference density when
in non-Boussinesq mode.  A total of 8 rescaling factors were eliminated, and in
one place, GV%Rho0 was replaced with GV%H_to_RZ.

  All Boussinesq answers are bitwise identical, but non-Boussinesq answers will
change and become less dependent on the Boussinesq reference density, and there
is a new optional argument to a publicly visible subroutine.
@Hallberg-NOAA Hallberg-NOAA added enhancement New feature or request answer-changing A change in results (actual or potential) labels Aug 6, 2023
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 6, 2023

Codecov Report

Merging #443 (fc049cb) into dev/gfdl (2f1bdc0) will increase coverage by 1.17%.
The diff coverage is 66.66%.

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

@@             Coverage Diff              @@
##           dev/gfdl     #443      +/-   ##
============================================
+ Coverage     36.72%   37.90%   +1.17%     
============================================
  Files           267      270       +3     
  Lines         77021    78100    +1079     
  Branches      14420    14436      +16     
============================================
+ Hits          28287    29602    +1315     
+ Misses        43309    43122     -187     
+ Partials       5425     5376      -49     
Files Coverage Δ
...rc/parameterizations/vertical/MOM_diabatic_aux.F90 59.21% <66.66%> (-0.50%) ⬇️

... and 9 files with indirect coverage changes

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

Copy link
Copy Markdown
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.

OBO @breichl

@marshallward
Copy link
Copy Markdown
Member

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

@marshallward marshallward merged commit 8d628bd into NOAA-GFDL:dev/gfdl Sep 28, 2023
@Hallberg-NOAA Hallberg-NOAA deleted the nonBous_diabatic_aux 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

answer-changing A change in results (actual or potential) enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants