Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] LonLat to EqualAreaGrid interpolation #47

Open
Datseris opened this issue Mar 19, 2021 · 4 comments
Open

[FR] LonLat to EqualAreaGrid interpolation #47

Datseris opened this issue Mar 19, 2021 · 4 comments
Labels
feature request A new feature we would like to have! hard This is definitely difficult to solve!

Comments

@Datseris
Copy link
Member

This issue is related with #46 , but it is much harder.

Here the task is to interpolate from a LonLatGrid to a GaussianEqualArea grid, or some other kind of grid, and vice versa. For this we have to do several steps:

  1. Create the underlying Equal Area grid based on given user input (probably given approximate square meters)
  2. Interpolate.

The difficulty is, I do not know how to do either of these, as I do not know how to do interpolation in non-regular grids, nor how to define well equal area grids.

I know that CDO does this, and I also know that the most easy grid to do this in is the Gaussian grid, GaussianEqualArea. The source code that loads gaussian equal area grids from CDO, ClimArray_eqarea, knows how to transform the given latitudes to a full longitude-latitude coordinate, but we would need to generate the initial latitudes as well. If god can help you find where in the source code of CDO this is done, then we can use it...

Of course, we have to be a bit careful here. We can't directly copy the source code of CDO, because we want this package to remain MIT licensed.

@Datseris Datseris added feature request A new feature we would like to have! hard This is definitely difficult to solve! labels Mar 19, 2021
@Balinus
Copy link
Member

Balinus commented Mar 23, 2021

Note that 99% of the time, lat and longitude data is available in netCDF files. Hence, it reduces to a lat-long interpolations. Based, on that if #46 is properly implemented, there's no need to convert from you grid to another.

@Datseris
Copy link
Member Author

https://github.com/kbarbary/Dierckx.jl seems to offer interpolation from irregular grids.

@Balinus
Copy link
Member

Balinus commented Mar 23, 2021

I tried but never succeeded in using Dierckx in my workflow. Still seem interesting though!

@Datseris
Copy link
Member Author

This package provides the opposite very well, or in general sounds useful to add to interpolation stuff: https://eljungsk.github.io/ScatteredInterpolation.jl/stable/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A new feature we would like to have! hard This is definitely difficult to solve!
Projects
None yet
Development

No branches or pull requests

2 participants