Skip to content

feat: MOM6 option to use pseudo depth rather than thickness for vertical location #906

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hkershaw-brown
Copy link
Member

Description:

MOM6 option to use pseudo depth rather than thickness for vertical location
Name of layer pseduo depth variable as a namelist option Users may have set 'Layer' to something else, e.g. 'zl'

Use case is existing long (10 years ish) runs of MOM6 that have only pseudo depth available.

Fixes issue

fixes #903

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

Tests

Please describe any tests you ran to verify your changes.
Not enough

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Update conf.py

Checklist for release

  • Merge into main
  • Create release from the main branch with appropriate tag
  • Delete feature-branch

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

…cal location

Name of layer pseduo depth variable as a namelist option
Users may have set 'Layer' to something else, e.g. 'zl'

fixes #903
Copy link
Collaborator

@iangrooms iangrooms left a comment

Choose a reason for hiding this comment

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

Looks good to me. One potential "gotcha" is that the pseudo-depth goes all the way to the deepest value even in places where the ocean depth is much shallower. For example, in a part of the domain where the total ocean depth is 10 m, the pseudo-depth will still go all the way down to 5750m (or whatever the deepest value is). So when using pseudo-depth, you'll only see the OBS_TOO_DEEP status when an observation is below the deepest pseudo-depth level, not when it's below the bottom of the ocean. I don't think this will break the code though. Total ocean depth (from 0, not from the actual sea surface, which doesn't have to be at 0) is defined in the ocean geometry file, if you want to avoid this gotcha.

@hkershaw-brown
Copy link
Member Author

Looks good to me. One potential "gotcha" is that the pseudo-depth goes all the way to the deepest value even in places where the ocean depth is much shallower. For example, in a part of the domain where the total ocean depth is 10 m, the pseudo-depth will still go all the way down to 5750m (or whatever the deepest value is). So when using pseudo-depth, you'll only see the OBS_TOO_DEEP status when an observation is below the deepest pseudo-depth level, not when it's below the bottom of the ocean. I don't think this will break the code though. Total ocean depth (from 0, not from the actual sea surface, which doesn't have to be at 0) is defined in the ocean geometry file, if you want to avoid this gotcha.

Thanks Ian, the on_basin_edge check will stop the interpolation going further in the code as is, but you're right the depth should be checked with ocean_geometry before calling find_level_bounds, and get OBS_TOO_DEEP as a status.

@hkershaw-brown hkershaw-brown marked this pull request as ready for review July 15, 2025 18:32
@hkershaw-brown
Copy link
Member Author

I started to write the code to check observation depth against ocean geometry, but this ends up as the same check as on_basin_edge, since:

observation lat, lon -> find which geolon(lath, lonh), geolat(lath, lonh) box the obs is in -> find ocean_depth D(lath, lonh)

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.

Feature request: MOM6 z* for depth
2 participants