-
Notifications
You must be signed in to change notification settings - Fork 416
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
ageostrophic_wind call signature #1112
Comments
Seems to me like your suggested order of variables makes the most sense and fits with the rest of the API better. As far as converting it, I think your suggestion to warn for the next two releases and incorporate it into the rest of the API changes for 1.0 make the most sense. |
Revisiting this now - by just warn for now, do you mean that we don't have any code change for now, and just provide a warning whenever this function is called? I imagine we can't actually update the order of the variables now as there isn't a way to actually deprecate that? |
I think that's right. Can use a |
Ok that makes sense. I'll get something up on this shortly, and add it to the 1.0 deprecation list. |
About the only API suggestion I can make is to convert this definition to |
I think I hear what you're saying: right now, we're talking about telling users that they'll need to do something in 4 months, but giving them nothing they can do today, and no way of making the warning go away. Let me see how I can do better... |
Thanks, what I would immediately do is add |
@akrherz So one option that comes to mind is simply having a version in a parallel module: from metpy.future import ageostrophic_wind
...
ageostrophic_wind(h, u, v, f, dx, dy) At some point we could warn, then drop We could go further and try to mimic Python's |
that seems good to me, thanks for the care taken here. |
Moved this to 1.0 to capture the need to make the "future" the present. Otherwise, the |
…ta#1112) This makes their behavior standard and eliminates the old behavior.
…ta#1112) This makes their behavior standard and eliminates the old behavior.
…ta#1112) This makes their behavior standard and eliminates the old behavior.
…ta#1112) This makes their behavior standard and eliminates the old behavior.
The call signature of
ageostrophic_wind
is a bit unconventional:Every other kinematic function has
dx
anddy
as the last arguments (besides the to be removeddim_order
).This has implications for simplifying the call signature when using XArray. With the other functions, we can simply make
dx
anddy
optional and calculate them from the coordinates when given aDataArray
. Here, that won't work.My intention is to change it to be more sensible. Current thinking:
(
f
should be calculable from the coordinates as well.) So how do we give a migration path on this? Just warn in the 0.11 and 0.12 releases and break in 1.0? I'm open to suggestions.The text was updated successfully, but these errors were encountered: