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

Numerical precision issue in rotate_vector #417

Open
rewquey opened this issue Aug 13, 2018 · 0 comments
Open

Numerical precision issue in rotate_vector #417

rewquey opened this issue Aug 13, 2018 · 0 comments

Comments

@rewquey
Copy link

rewquey commented Aug 13, 2018

Hi,

I ran into a numerical precision issue when using the rotate_vector function with 32bit floats as input data. In this case, the lat/lon increments used to determine the relative rotation between map projection and the lat/lon grid is chosen too small. The result was a cristalline structure in the plotted wind barbs which patches of barbs pointing in the exact same direction.

dc = 1E-5 * np.exp(theta*1j)

Converting the input to 64bit floats solves the issue for me, as did an increase of the increment to 1.0e-4.

Best regards,
Clemens

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

1 participant