Skip to content

Numerical precision issue in rotate_vector #417

Open
@rewquey

Description

@rewquey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions