-
Notifications
You must be signed in to change notification settings - Fork 415
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
Velocity potential #993
Comments
For a citation on this: Krishnamurti 1971, although most people don't seem to use the curvature term that this tacks on at the end. Looks like we would need an inverse laplacian operator to handle this. Seems like something to tackle when there's a lot of caffeine handy. |
I spent some time looking for an existing pythonic solution on velocity potential and stream function. These two are the most promising hits but a caution that I haven't tested any of them, just sharing for someone interested who stumble upon this thread or possibly could be incorporated by MetPy developers: Apparently, ECMWF's METVIEW package has a function to calculate velocity potential but it needs input in spectral fields. I'm not very familiar with grid nomenclature and EDIT: Windspharm package is well tested and uses the same core library as NCL called SPHEREPACK. More Details |
The windspharm package works well, especially the xarray portion where I was able to easy calculate streamfunction and velocity potential with data read from a THREDDS server and using the MetPy declarative syntax for plotting after adding the calculated results back into the xarray dataset. The result from windspharm gives units in the output, which would work well with couple with other equations and we just assume the spherical earth since it requires global data for the calculation. I was also able to calculate and plot the irrotational and non-divergent winds using windspharm and Metpy. |
@dopplershift The reconstructed wind field from vorticity and divergence paper has an equation to calculate the velocity potential and stream function using the inverted Laplacian. While windspharm works for spectral fields for non global data we can use the inverse Laplacian operator to calculate the velocity potential |
For reference, that's from PR #3266, which references this paper, which uses Green's Functions to solve the Poisson equation on a cartesian domain. Obviously the performance on large regions will depend on the projection chosen, but that's standard for planar approximations of a sphere. Arguably the velocity potential would be easier to deal with, as whether the projection is conformal is largely irrelevant for a scalar. That suggests for mid-size domains we might get better performance at getting velocity from divergence going through the velocity potential and using the projection-aware gradient functions, rather than trying to balance both equidistant and conformal properties in a projection at once to go directly to velocity from divergence. |
Another potential calculation: velocity potential
The text was updated successfully, but these errors were encountered: