Closed stephenworsley closed 11 months ago
regidding to/from projected coordinate systems is an important use case.
I looked at this a bit, may do a PR if we can make some decisions...
The only actual blocker is a function esmf_regrid.schemes._cube_to_GridInfo
, which has two lines that blindly convert coordinate points into degrees. The points then get converted via cartopy from the cube's CRS (or Geodetic
if missing) to Geodetic
. So that conversion should work for any CRS, and the rest of the code still only needs to care about lat/lon.
At the time this issue was raised I did exactly that, in a monkeypatch in some code that needs to move from agg-regrid
following its deprecation. And the results were essentially identical.
First question is then: can we not assume that the cube's coordinates are already using the right units for the cube's CRS?
There is one test that fails if there is no conversion at all, which tests that a cube with degrees and a cube with radians give the same weights. But neither test cube has a CRS, so they get the default Geodetic
, which doesn't use radians, so I'd argue that's just bad user input.
Second, there are a lot of variable names and documentation that refer explicitly to latitudes and longitudes, even though if this issue is addressed then they could easily not be - is that worth changing too?
@SciTools-incubator/esmf-regrid-devs This issue is stale due to a lack of activity in the last 90 days. Remove stale label or comment, otherwise this issue will close automatically in 7 days time.
could we look into this a bit more at the next surgery?
@SciTools-incubator/esmf-regrid-devs This issue is stale due to a lack of activity in the last 90 days. Remove stale label or comment, otherwise this issue will close automatically in 7 days time.
@SciTools-incubator/esmf-regrid-devs This stale issue has been automatically closed due to no community activity
Closed by #178.
📰 Custom Issue
If a coord system is not described natively in degree units it should still be possible to regrid it.