Skip to content

incorrect sign in metpy.calc.vorticity when using lambert_azimuthal_equal_area projection #2582

@gianlisi

Description

@gianlisi

Discussed in #2557

Originally posted by gianlisi June 28, 2022
Hello,

first of all, thank you for the great work. Metpy, and its integration with xarray, has been incredibly useful for my research.

I am writing about using metpy.calc.vorticity on a Lambert Azimuthal Equal Area grid around the north pole. As can be seen in the left panel of the attached picture, the sign of the computed vorticity is inverted in the upper half of the domain. The right panel shows what the vorticity should look like, as computed with xarray's differentiate.

Screen Shot 2022-06-28 at 6 15 15 PM

The issue seems to originate in the azimuth dependent change of sign within the metpy.calc.lat_lon_grid_deltas function. Indeed, if I comment out line 848 and line 854 of metpy/calc/tools.py, the vorticity is returned with the correct sign over the entire domain. At the same time, I am afraid that changing the code will break the computation on other grids.

The definition of the grid I am using is

grid = { 'grid_mapping_name':'lambert_azimuthal_equal_area', 'longitude_of_projection_origin':0, 'latitude_of_projection_origin':90, 'false_easting':0, 'false_northing':0 }

Any help in understanding how to compute the correct vorticity would be greatly appreciated.

Thank you again for the great work!

Gianluca

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CalcPertains to calculationsType: BugSomething is not working like it should

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions