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

Velocity potential #993

Open
dopplershift opened this issue Jan 10, 2019 · 5 comments
Open

Velocity potential #993

dopplershift opened this issue Jan 10, 2019 · 5 comments

Comments

@dopplershift
Copy link
Member

Another potential calculation: velocity potential

@zbruick
Copy link
Contributor

zbruick commented Sep 9, 2019

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.

@avatar101
Copy link

avatar101 commented Mar 13, 2021

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:

  1. py_helmholtz
  2. windspharm

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 windspharm documentation writes that it work on global wind fields in spherical geometry. That would imply it could work on a regular lat-lon grid(?) A quick check on NCL shows they provide 2 functions for fixed and gaussian grid respectively.

EDIT: Windspharm package is well tested and uses the same core library as NCL called SPHEREPACK. More Details

@kgoebber
Copy link
Collaborator

kgoebber commented Jun 8, 2022

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.

@winash12
Copy link

winash12 commented Nov 9, 2023

@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

@DWesl
Copy link
Contributor

DWesl commented Aug 30, 2024

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.

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

No branches or pull requests

6 participants