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

Add spherical correction terms #1963

Closed
wants to merge 1 commit into from

Conversation

kgoebber
Copy link
Collaborator

Description Of Changes

So this is a first attempt to get in the spherical correction terms as discussed in #893. List of calculations modified:

  • vorticity
  • absolute vorticity
  • divergence
  • stretching deformation
  • shearing deformation
  • total deformation
  • frontogenesis
  • potential vorticity baroclinic
  • inertial-advective wind
  • q-vector

These changes are effective for global datasets that use a lat/lon coordinate. In some testing with NAM data, the correction is not needed or will need a different type of correction. I'll update the issue with a bit more information about this for the ongoing discussion.

Current implementation adds latitude to the list of keyword arguments for affected calculations (some already had it) and a flag for whether to apply the spherical correction (default to True). The reason to default to True is that users are more likely to need it. It would be best if we could programmatically figure out if it is needed based on the CRS, but this placeholder will do for this initial draft of a PR. Therefore, I did not add documentation about the spherical_correction keyword argument figuring we can wait to see how the final implementation goes.

I updated some of the tests where we won't want the correction (made up data that is not associated with lat/lon values). A number of tests will fail as I have not attempted to go through and update values based on the corrected calculations.

We should add some tests based on a non-GFS actual data file (e.g., NAM) for these specific calculations.

Checklist

@kgoebber
Copy link
Collaborator Author

Completed via #2743. Closing this old PR.

@kgoebber kgoebber closed this Dec 28, 2022
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.

Generalize vorticity (and related functions) to allow for map projections
1 participant