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

*Corrected CFC diagnostics and non-Bous CFC fluxes #554

Merged

Conversation

Hallberg-NOAA
Copy link
Member

Removed the duplicative multiplication by the Boussinesq density and related unit conversion factors in the calculation of the diagnosed mole concentration of the "cfc11" and "cfc12" diagnostics. This unit rescaling is duplicative of the conversion factors in the register_diag_field() calls for these diagnostics (at about line 263). This will change these two diagnostics by a factor of RHO_0. This bug arose from separate and independent changes coming from GFDL and NCAR to add the same missing rescaling factor, and it might have gone undetected because of the vast range of valid values for CFC concentrations or because all of our regression testing uses calendar dates that precede the invention and first release of CFCs in the 1930s. Although this commit will correct the code that is on the dev/gfdl branch, care will have to be taken when merging in modified versions of this file from other branches that might have also corrected this bug to avoid reintroducing it (perhaps in reverse).

Also replaced the expression for the CFC flux rescaling factor for use with KPP_NonLocalTransport() with GV%RZ_to_H, which is equivalent to the previous expression in Boussinesq mode but avoids a multiplication and division by the Boussinesq reference density in non-Boussinesq mode. All Boussinesq answers are identical, but some non-Boussinesq CFCs could be altered in the last bits.

This PR will change diagnostics of CFC concentrations by about 3 orders of magnitude. The internal representation of the CFCs is bitwise identical in all Boussinesq cases, but they may change at roundoff in non-Boussinesq cases that use KPP.

  Removed the duplicative multiplication by the Boussinesq density and related
unit conversion factors in the calculation of the diagnosed mole concentration
of the "cfc11" and "cfc12" diagnostics.  This unit rescaling is duplicative of
the conversion factors in the register_diag_field calls for these diagnostics
(at about line 263).  This will change these two diagnostics by a factor of
RHO_0.  This bug arose from separate and independent changes coming from GFDL
and NCAR to add the same missing rescaling factor, and it might have gone
undetected because of the vast range of valid values for CFC concentrations or
because all of our regression testing uses calendar dates that precede the
invention and first release of CFCs in the 1930s.  Although this commit will
correct the code that is on the dev/gfdl branch, care will have to be taken when
merging in modified versions of this file from other branches that might have
also corrected this bug to avoid reintroducing it (perhaps in reverse).

  Also replaced the expression for the CFC flux rescaling factor for use with
KPP_NonLocalTransport with GV%RZ_to_H, which is equivalent to the previous
expression in Boussinesq mode but avoids a multiplication and division by the
Boussinesq reference density in non-Boussinesq mode.  All Boussinesq answers are
identical, but some non-Boussinesq CFCs could be altered in the last bits.

  This PR will change diagnostics of CFC concentrations by about 3 orders of
magnitude. The internal representation of the CFCs is bitwise identical in all
Boussinesq cases, but they may change at roundoff in non-Boussinesq cases that
use KPP.
@Hallberg-NOAA Hallberg-NOAA added bug Something isn't working answer-changing A change in results (actual or potential) labels Jan 24, 2024
Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 37.20%. Comparing base (8f7df08) to head (cb92ca6).

Files Patch % Lines
src/tracer/MOM_CFC_cap.F90 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           dev/gfdl     #554      +/-   ##
============================================
- Coverage     37.21%   37.20%   -0.01%     
============================================
  Files           271      271              
  Lines         80473    80472       -1     
  Branches      15008    15008              
============================================
- Hits          29944    29943       -1     
+ Misses        44958    44957       -1     
- Partials       5571     5572       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marshallward
Copy link
Member

@klindsay28 Is this OK to merge? (I think it's all correct, but it might impact NCAR.)

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.

We'll go ahead with this for now. Any potential issues with NCAR can be sorted out during merge to main.

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit d0e9c25 into NOAA-GFDL:dev/gfdl Feb 29, 2024
12 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the CFC_cap_conversion_factors branch May 10, 2024 21:35
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) bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants