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

OBC: H-dimensionality fixes #1170

Merged
merged 2 commits into from
Jul 30, 2020

Conversation

marshallward
Copy link
Collaborator

This patch fixes two dimensionality errors in the OBC segments.

  • We add a missing GV%m_to_H conversion for time-dependent eta segments.

  • The adjustSegmentEtaToFitBathymetry function depends on the
    segment%Htot field when computing the dz_src cell spacings.

    While the calculation primarily assumes that all quantities scale as
    Z, the segment%Htot field scales as H, which was causing
    dimensionality errors.

    We resolve this by converting Htot from Z to H whenever it is used in
    the calculation.

This patch fixes three dimensionality errors in the OBC segments.

- We add a missing GV%m_to_H conversion for time-dependent eta segments.

- The `adjustSegmentEtaToFitBathymetry` function depends on the
  `segment%Htot` field when computing the dz_src cell spacings.

  While the calculation primarily assumes that all quantities scale as
  Z, the segment%Htot field scales as H, which was causing
  dimensionality errors.

  We resolve this by converting Htot from Z to H whenever it is used in
  the calculation.

- Segment barotropic velocitys based on transports were limited to a
  hard-coded thickness of 1e-12, which was not scaled.  We have added
  H-dimensional scaling to these constants.
@marshallward
Copy link
Collaborator Author

I did a force push to the commit log, which forgot to mention this third change:

  • Segment barotropic velocitys based on transports were limited to a
    hard-coded thickness of 1e-12, which was not scaled. We have added
    H-dimensional scaling to these constants.

@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2020

Codecov Report

Merging #1170 into dev/gfdl will decrease coverage by 0.13%.
The diff coverage is 41.93%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl    #1170      +/-   ##
============================================
- Coverage     46.08%   45.94%   -0.14%     
============================================
  Files           214      224      +10     
  Lines         69399    70431    +1032     
============================================
+ Hits          31984    32363     +379     
- Misses        37415    38068     +653     
Impacted Files Coverage Δ
...g_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90 0.00% <0.00%> (ø)
...fig_src/external/GFDL_ocean_BGC/generic_tracer.F90 0.00% <0.00%> (ø)
...c/external/GFDL_ocean_BGC/generic_tracer_utils.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/kdtree.f90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/ocean_da_core.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/ocean_da_types.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/write_ocean_obs.F90 0.00% <0.00%> (ø)
config_src/solo_driver/MESO_surface_forcing.F90 0.00% <0.00%> (ø)
config_src/solo_driver/MOM_driver.F90 68.72% <ø> (ø)
config_src/solo_driver/user_surface_forcing.F90 0.00% <0.00%> (ø)
... and 150 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 4c030e6...0c6a7d0. Read the comment docs.

Copy link
Collaborator

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are both necessary and correct. They have passed all testing, including pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/10896. I am happy to approve these changes.

@Hallberg-NOAA Hallberg-NOAA merged commit 390188e into mom-ocean:dev/gfdl Jul 30, 2020
@marshallward marshallward deleted the tc4a_dimh_bug branch September 2, 2020 14:53
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.

3 participants