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

MOM6: Dimensional rescaling cleanup #1032

Merged
merged 14 commits into from
Nov 22, 2019

Conversation

Hallberg-NOAA
Copy link
Collaborator

Finished up some remaining dimensional rescaling testing, particularly in the
tracer packages and corrected some documentation. In practice, no answers were
changed, although some previously dimensionally incorrect expressions were
fixed. All answers and output files in the MOM6-examples repositories are
unchanged. Commits included with this PR include:

NOAA-GFDL/MOM6@8b7a692 Merge branch 'dev/gfdl' into rescale_cleanup
NOAA-GFDL/MOM6@c741390 Correction of documented units in comments
NOAA-GFDL/MOM6@6e115b7 +Changed the units of minimum_forcing_depth to [H]
NOAA-GFDL/MOM6@05b136b Rescaled internal variables in wave_speed
NOAA-GFDL/MOM6@44cfd27 Revised wave_speed to return speed in [L T-1]
NOAA-GFDL/MOM6@b48b594 Simplified expressions in MOM_offline_aux
NOAA-GFDL/MOM6@2b0fea2 Corrected dimensional epsilons in downscaling
NOAA-GFDL/MOM6@a3b7adc Simplified expressions in MOM_PointAccel
NOAA-GFDL/MOM6@b80d82e +Pass timesteps to applyTracerBoundaryFluxesInOut in [T]
NOAA-GFDL/MOM6@0281e21 +Pass timesteps to tracer column_physics in [T]
NOAA-GFDL/MOM6@00da24e +Pass timesteps to ALE_main in [T]
NOAA-GFDL/MOM6@08dbb59 +Rescaled tracer advective flux diagnostics
NOAA-GFDL/MOM6@605d1bc +Pass timesteps to tracer diagnostics in [T]

  Pass timeesteps to the tracer diagnistics routines post_tracer_diagnostics and
postALE_tracer_diagnostics and to adiabatic in units of [T}.  All answers are
bitwise identical.
  Rescaled the internal units of the tracer advective flux diagnostics to units
of [conc H L2 T-1] for code simplicity and dimensional consistency testing.
Also corrected the units of some tracer fluxes as documented in comments and
commented out unused elements of the tracer_type.  All answers are bitwise
identical.
  Pass the timesteps to ALE_main, ALE_main_offline, and ALE_main_accelerated in
units of [T] for code simplicity and dimensional consistency testing.  This also
includes the rescaling of remapping-driven tracer tendencies.  All answers and
diagnostics are bitwise identical.
  Pass timesteps to the various tracer column_physics routines in [T] for
dimensional consistency testing.  Also added a new unit_scale_type argument to
these routines.  All answers are bitwise identical, but there are minor
interface changes to 13 subroutines.
  Pass timesteps to applyTracerBoundaryFluxesInOut in [T], and use units of
[T-1] for internal source and decay rates for the oil tracer and in fluxes of
CFCs.  Also modified extract_offline_main to return timesteps as real values
with units of [T].  Also there is a new unit_scale_type argument to
register_oil_tracer.   All answers in the MOM6_examples test cases and
regression tests are bitwise identical.
  Simplified expressions inside of MOM_PointAccel, taking into account that all
velocities use the same units of [L T-1].  All answers are bitwise identical.
  Added distinct negligible volumes, face areas, horizonal areas and lengths
with proper dimensional rescaling in the downsample field routines.  With these
changes, downscaled diagnostics should now pass the dimensional rescaling tests,
whereas previously there would have been a problem when the numbers used to
represent lengths are smaller than about 1e-8 times their MKS values.  All
answers are bitwise identical without dimensional rescaling.
  Simplified expressions in distribute_residual_uh_barotropic.  All answers are
bitwise identical.
  Revised wave_speed to return the internal wave speed in units of [L T-1] and
to use mono_N2_depth in units of [Z] for code simplification and expanded
dimensional consistency testing.  Also revised the internal units of some
related diagnostics in calculate_diagnostic_fields.  All answers and diagnostics
are bitwise identical.
  Rescale internal calculations in wave_speed and wave_speeds for greater
robustness and dimensional consistency testing.  All answers are bitwise
identical and pass dimensional scaling tests.
  Changed the units of minimum_forcing_depth passed to applyBoundaryFluxesInOut
and applyTracerBoundaryFluxesInOut to [H].  All answers are bitwise identical.
  Corrected some units in comments and eliminated some unused variables.
All answers are bitwise identical.
@codecov-io
Copy link

codecov-io commented Nov 15, 2019

Codecov Report

Merging #1032 into dev/gfdl will decrease coverage by <.01%.
The diff coverage is 28.72%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl    #1032      +/-   ##
============================================
- Coverage     43.53%   43.53%   -0.01%     
============================================
  Files           212      212              
  Lines         62478    62490      +12     
============================================
+ Hits          27202    27203       +1     
- Misses        35276    35287      +11
Impacted Files Coverage Δ
src/tracer/MOM_tracer_hor_diff.F90 86.98% <ø> (ø) ⬆️
src/parameterizations/lateral/MOM_hor_visc.F90 61.54% <ø> (+0.11%) ⬆️
src/parameterizations/lateral/MOM_MEKE.F90 70.18% <ø> (ø) ⬆️
...c/parameterizations/vertical/MOM_energetic_PBL.F90 66.58% <ø> (ø) ⬆️
src/core/MOM_variables.F90 76.59% <ø> (ø) ⬆️
src/tracer/advection_test_tracer.F90 0% <0%> (ø) ⬆️
src/tracer/tracer_example.F90 0% <0%> (ø) ⬆️
src/tracer/dye_example.F90 0% <0%> (ø) ⬆️
src/framework/MOM_diag_mediator.F90 62.8% <0%> (-0.18%) ⬇️
src/tracer/ISOMIP_tracer.F90 0% <0%> (ø) ⬆️
... and 25 more

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 8791de3...2ae0a68. Read the comment docs.

@Hallberg-NOAA
Copy link
Collaborator Author

This PR is being tested with https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/9375.

@marshallward
Copy link
Collaborator

The final error message is not entirely clear here, but the "missing" OpenMP build rule is because your OpenMP build failed. This is stated clearly in the folded build log, but is silently failing for a reason that I don't yet understand.

(This is the second time that the test suite has failed to report a OpenMP build fail; we need to sort this out!)

  Added a variable to an OMP declaration.  All answers are bitwise identical,
and a recently added compile-time error with openMP was fixed.
@Hallberg-NOAA
Copy link
Collaborator Author

The updated pipeline test for this PR is https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/9403 .

@adcroft adcroft merged commit be50409 into mom-ocean:dev/gfdl Nov 22, 2019
@Hallberg-NOAA Hallberg-NOAA deleted the rescale_cleanup branch July 30, 2021 18:56
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.

4 participants