Skip to content

How to efficiently use DataArrays with Cartopy's add_cyclic_point utility? #1005

Closed
@ktyle

Description

@ktyle

Hi, I'm not sure as to the best way to take a global NetCDF dataset (e.g. 2.5 x 2.5 deg GFS) whose longitude range does not "cycle" back to 0/360 and pass the variable of interest and the longitude array to Cartopy's add_cyclic_point() utility. I am first selecting the variable of interest and the longitude and converting them to arrays, and then passing them along to add_cyclic_point, but not sure then how to take the tuple that is returned by that utility and "reintegrating" it into xarray's plot.pcolormesh utility. Do I need to create a new Xarray DataArray from the output of add_cyclic_point?

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