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

Eliminate unneeded diagnostic arrays in CorAdCalc #52

Merged

Conversation

Hallberg-NOAA
Copy link
Member

Eliminated 4 unnecessary 3-d allocatable arrays and 8 2-d diagnostic arrays
in CorAdCalc, and simplified the code calculating these diagnostics by using the
post_product_[uv] and post_product_sum_[uv] routines. Also grouped the calls
that allocate the memory that is still needed for diagnostics.

This commit also includes a few other minor changes to clean up the
documentation of variable intents and unit documentation in a handful of other
places in the code:

  • Add intent declarations to the arguments to chksum2d() and chksum3d()

  • Corrected incorrect scale arguments for two (untested) checksum calls.

  • Corrected the documented units in several comments.

    All answers and output are bitwise identical.

  Eliminated 4 unnecessary 3-d allocatable arrays and 8 2-d diagnostic arrays
in CorAdCalc, and simplified the code calculating these diagnostics by using the
post_product_[uv] and post_product_sum_[uv] routines.  Also grouped the calls
that allocate the memory that is still needed for diagnostics.

  This commit also includes a few other minor changes to clean up the
documentation of variable intents and unit documentation in a handful of other
places in the code:

- Add intent declarations to the arguments to chksum2d() and chksum3d()

- Corrected incorrect scale arguments for two (untested) checksum calls.

- Corrected the documented units in several comments.

  All answers and output are bitwise identical.
@codecov
Copy link

codecov bot commented Dec 23, 2021

Codecov Report

Merging #52 (af41d43) into dev/gfdl (6bcea76) will decrease coverage by 0.04%.
The diff coverage is 57.14%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl      #52      +/-   ##
============================================
- Coverage     28.96%   28.92%   -0.05%     
============================================
  Files           242      242              
  Lines         71324    71233      -91     
============================================
- Hits          20660    20601      -59     
+ Misses        50664    50632      -32     
Impacted Files Coverage Δ
src/framework/MOM_checksums.F90 64.71% <ø> (ø)
src/initialization/MOM_state_initialization.F90 20.73% <ø> (ø)
src/parameterizations/vertical/MOM_CVMix_conv.F90 9.47% <ø> (ø)
...c/parameterizations/vertical/MOM_set_viscosity.F90 47.41% <ø> (ø)
src/user/ISOMIP_initialization.F90 0.00% <ø> (ø)
src/user/Kelvin_initialization.F90 0.00% <ø> (ø)
src/user/Phillips_initialization.F90 0.00% <ø> (ø)
src/core/MOM_CoriolisAdv.F90 35.01% <57.14%> (-4.49%) ⬇️

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 6bcea76...af41d43. Read the comment docs.

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit d9d82e3 into NOAA-GFDL:dev/gfdl Dec 27, 2021
@Hallberg-NOAA Hallberg-NOAA added documentation Improvements or additions to documentation refactor Code cleanup with no changes in functionality or results labels Feb 1, 2022
@Hallberg-NOAA Hallberg-NOAA deleted the simpler_CorAdCalc_diags branch March 25, 2022 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation 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