Skip to content

Make sure we can subset global models across the dateline and prime meridian #113

@ChrisBarker-NOAA

Description

@ChrisBarker-NOAA

What should we add?

Global models are a challenge because of that darn round earth.

So if the model uses 0-360 coordinates for longitude, then a region that crosses the prime meridian will be discontiguous, e.g.:

-10 -- 10 degrees in -180--180, is 0--10 and 350--360 -- so the code needs to detect this, and grab the two chunks and put them together.

Similarly for crossing the dateline, though all the global models I know of use 0--360 coords.

A few considerations:

  • When you go from one longitude to another, there's the question of which direction to go -- I think we should assume (and enforce) that a subset bounds is less than half-way around around the earth.

  • what coordinate system to return the results in?

    • if there's a bounds that includes the prime meridian, the it should be -180--180
    • if there's a bounds that includes the date line, it should be 0--360
    • maybe it should always be in the coordinate system that the bounds were provided in? (is that always clear??)
  • I only have use-cases for global rectangular grid models -- so at least for now, that's all we need to support.

Reference

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    GSoC: 2026Issues appropriate for Google Summer of Code project.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions