ajdawson / windspharm

A Python library for spherical harmonic computations on vector winds.
http://ajdawson.github.io/windspharm
MIT License
82 stars 36 forks source link

Possible issue with windspharm package's calculations of irrotational winds #121

Open TemporarySir opened 2 years ago

TemporarySir commented 2 years ago

The directions for the winds appear to be off but the values appear to be of correct magnitude albeit in the wrong areas when I try using it for ERA5 0.25x0.25 degree resolution data using the full global model (as is recommended). Is there perhaps an error in the calculations which you perform in your coding or does it not work with ERA5 data?

In my approach to solving for the irrotational winds, I used the 2D Discrete Fourier Transform method of solving the Poisson's Equation wherein div = laplacian (velocity potential) and then I took the gradient of the obtained velocity potential field in order to get the irrotational winds which were all pointed in the correct direction and had correct relative magnitudes to one another (strong near areas of divergence and weak in areas with little to no divergence), but the values themselves were too small by one order of magnitude (perhaps Poisson's Equation has a constant out front that needs to be solved for and I missed it?). Did you attempt trying something similar?

Thank you!