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

+(*)Pseudo_salt_tracer and forcing%netSalt #16

Merged

Conversation

Hallberg-NOAA
Copy link
Member

This PR fixes a problem with the dimensional rescaling of the tracers in the
pseudo_salt_tracer package and eliminates the essentially redundant netSalt
element from the forcing type. This could change the output of some passive
tracer diagnostics when dimensional rescaling is in use, and it eliminates an
element from a transparent type, but all answers and output in the MOM6-examples
regression suite are bitwise identical.

The commits in this PR include:

  • 111b3e7e6 +Eliminate forcing%netSalt
  • 6c01c8d65 (*)Refactored and fixed pseudo_salt_tracer code

  Refactored the pseudo_salt_tracer code to avoid using fluxes%netSalt, instead
calculating the surface fluxes directly from fluxes%saltFlux, in preparation to
get rid of the largely redundant fluxes%netSalt element, but also to correct for
the fact that fluxes%netSalt does not have proper scaling to pass dimensional
consistency testing.  Also made the CS%diff element of pseudo_salt_tracer_CS
into an allocatable instead of it being a pointer, and changed the tests for
whether it is allocated appropriately.  Several unused variables were
eliminated, and some comments corrected or reformated.  This does not impact
solutions, but the pseudo_salt and pseudo_salt_diff diagnostics are now
invariant to dimensional rescaling, whereas before they were not.  All solutions
and output in MOM6-examples are bitwise identical.
  Eliminated the no-longer used and previously improperly rescaled netSalt
element from the forcing type.  Also added the missing deallocate statements
for fluxes%netMassOut and fluxes%netMassIn in deallocate_forcing_type().  All
answers and output are bitwise identical, although an element has been removed
from a transparent type.
@codecov
Copy link

codecov bot commented Nov 28, 2021

Codecov Report

Merging #16 (5361174) into dev/gfdl (6494852) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl      #16      +/-   ##
============================================
- Coverage     29.17%   29.16%   -0.01%     
============================================
  Files           240      240              
  Lines         71489    71496       +7     
============================================
- Hits          20856    20854       -2     
- Misses        50633    50642       +9     
Impacted Files Coverage Δ
src/core/MOM_forcing_type.F90 47.46% <0.00%> (-0.08%) ⬇️
src/tracer/pseudo_salt_tracer.F90 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6494852...5361174. Read the comment docs.

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit 585cc70 into NOAA-GFDL:dev/gfdl Dec 4, 2021
@Hallberg-NOAA Hallberg-NOAA deleted the refactor_pseudo_salt_tracer branch January 3, 2022 13:35
@Hallberg-NOAA Hallberg-NOAA added the refactor Code cleanup with no changes in functionality or results label Feb 1, 2022
theresa-morrison added a commit to theresa-morrison/MOM6 that referenced this pull request Aug 22, 2024
* Calculate a photoacclimation MLD in MOM6

Using the diagnose MLD routines calculate a MLD that can be used
in COBALTv3.

* Update interfaces for diagnoseMLD

Some previously optional arguments were made nonoptinal in the
final version merged into dev/gfdl. So these areguents have been
added to the call in MOM_generic_tracers.

* Add unset variable in diagnoseMLDbyenergy

* Remove timescale variable

This parameter seems unneeded at this time.

* Change paramter name and though up PR

Change "MLD_PHA_FIXED" to "MLD_PHA_CALC" which is default false.
Touch up a few formatting issues.
Add initialization and comment for mld_pha.

* Add fatal errors

Add fatal errors if PHA_MLD_CALC is true, but a method is not specified.

* Add additional argument to generic tracer stub

Add the photo_acc_mld argument to the generic tracer stub in MOM6.

---------

Co-authored-by: Theresa Morrison <Theresa.Morrison@gaea57.ncrc.gov>
Co-authored-by: Theresa Morrison <Theresa.Morrison@gaea56.ncrc.gov>
theresa-morrison added a commit to theresa-morrison/MOM6 that referenced this pull request Nov 18, 2024
* Calculate a photoacclimation MLD in MOM6

Using the diagnose MLD routines calculate a MLD that can be used
in COBALTv3.

* Update interfaces for diagnoseMLD

Some previously optional arguments were made nonoptinal in the
final version merged into dev/gfdl. So these areguents have been
added to the call in MOM_generic_tracers.

* Add unset variable in diagnoseMLDbyenergy

* Remove timescale variable

This parameter seems unneeded at this time.

* Change paramter name and though up PR

Change "MLD_PHA_FIXED" to "MLD_PHA_CALC" which is default false.
Touch up a few formatting issues.
Add initialization and comment for mld_pha.

* Add fatal errors

Add fatal errors if PHA_MLD_CALC is true, but a method is not specified.

* Add additional argument to generic tracer stub

Add the photo_acc_mld argument to the generic tracer stub in MOM6.

---------

Co-authored-by: Theresa Morrison <Theresa.Morrison@gaea57.ncrc.gov>
Co-authored-by: Theresa Morrison <Theresa.Morrison@gaea56.ncrc.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code cleanup with no changes in functionality or results
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants