Skip to content

Default "skew angle" for CF grid mapping "oblique mercator" seems wrong #1506

@aulemahal

Description

@aulemahal

Hi!

When using pyproj.CRS.from_cf on attributes defining an oblique mercator grid mapping, it seems that the Pyproj projection if rotated 90° from the expected output. Specifically, I think this line should assign 90, not 0 :

angle_from_rectified_to_skew_grid=0.0,

I am plotting data from a climate model that runs on the oblique mercator projection. In this first plot, the cartopy CRS was obtained with : cartopy.crs.Projection(pyproj.CRS.from_cf(oblique_mercator)):

Image

In this second plot, I instead used cartopy's implementation of the same, cartopy.crs.ObliqueMercator :

Image

We can clearly see that the second figure is what we expected.

The grid mapping variable has the following attributes:

{'grid_mapping_name': 'oblique_mercator',
 'azimuth_of_central_line': 90.0,
 'latitude_of_projection_origin': 46.0,
 'longitude_of_projection_origin': 263.0,
 'scale_factor_at_projection_origin': 1.0,
 'false_easting': 0.0,
 'false_northing': 0.0}

The CF conventions do not define the "Angle from Rectified to Skew Grid". In cartopy, it is not specified, so the default is used. In pyproj, it is specified as 0°. From, this page, I gather that the default value should be 90°. And indeed, we are seeing a 90° degree rotation when using pyproj's projection object.

Thus why I think the value in pyproj is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions