Skip to content

Add geo_strf_steric_height function #207

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

Merged
merged 5 commits into from
Aug 23, 2025

Conversation

DocOtak
Copy link
Contributor

@DocOtak DocOtak commented Aug 21, 2025

First crack at #205.

What should the tests look like? I tried throwing in the values in the documentation and got reasonably close answers, but it looks like the interpolation method really matters.

The geo_strf_dyn_height test values were calculated in write_geo_npyfiles.py

@efiring
Copy link
Member

efiring commented Aug 22, 2025

For consistency with the current version, I suggest adding a "test_steric_height_mrst" that is a slight modification of test_dyn_height_mrst in gsw/tests/test_geostrophy.py.

In addition, I think the docstring needs to include a condensed version of what is in the Matlab help text for this function, or a clear and usable pointer to that information. As far as I can see, the only value of the function is its docstring--without that, there is really no point in making a whole function that just returns a constant times the output of another function. And in fact, its output, one particular (and arbitrary, as far as I can see) definition of "steric height" based on a "global average" parameter, is itself pointless, in my view.

steric_height : array
This is the integral of specific volume anomaly with respect
to pressure, from each pressure in p to the specified
reference pressure divided by the constant value of the gravitational
Copy link
Member

Choose a reason for hiding this comment

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

Good condensation. Slight tweaks:
"pressure divided by the constant value..." -> "pressure, divided by the global mean surface value..."
and append "(see page 46 of Griffies, 2004)" to the end of the sentence, or maybe the end of the docstring. If numpydoc has a
"References" section, add the Matlab doc ref for Griffies to it; otherwise, stuff into the parenthetical addition above, or tack it on the end of the docstring without its own section.

@efiring efiring merged commit f72be8d into TEOS-10:main Aug 23, 2025
32 checks passed
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