-
Notifications
You must be signed in to change notification settings - Fork 10
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
regridding #16
Comments
There's a brand new package on CRAN that might be useful: http://cran.r-project.org/web/packages/HiClimR/HiClimR.pdf |
No this is not the function we are looking for. Their regridding 'coarsing' algorithm just pulls a subset of coordinates. I'm going to recode this today and try to clean it up and speed up the regridding algorithm. |
I'll start an alternate version of the regridding since it looks like you are already working on revising the current one. This new algorithm might not work, in which case we'll just go with what we got. |
OK. From: Kathe Todd-Brown [notifications@github.com] I'll start an alternate version of the regridding since it looks like you are already working on revising the current one. This new algorithm might not work, in which case we'll just go with what we got. — |
We had a meeting here yesterday with everyone who's working with CMIP5 data, and the value of this package came up repeatedly. People were particularly interested in a future regridding capability. |
The problem with regridding is that there are so gosh darn many algorithms that could be used and what should be used is dependent on what variable you are looking at. I agree thought that this is a high priority feature. In my mind there are three algorithms that we might want to support:
We may actually want to look at pulling in someone who does this kind of data processing for climate variables and get some feedback here. |
And there aren't existing implementations of these in R, that we've found? |
raster has implementations for interpolation and max category but I haven't seen anything for area weighted averaging (but I have code for this) and we would have to port to that structure which doesn't play nice with some of the non-regular grids used by certain centers. The package you originally linked to has an intelligent sampling algorithm but not the three mentioned. In theory you are correct, these are all common but I don't know of a package off hand. |
Fields has a number of gridding options, including splines: http://cran.r-project.org/web/packages/fields/fields.pdf I have used the Fields package a lot in the past and it seems to work well, even with large datasets. Spatstat has IDW interpolation options (i am sure there are others): http://www.inside-r.org/packages/cran/spatstat/docs/idw Kriging can be done in GeoR and gstat, etc. However the concern about gridding different data types is valid. E.g. what works for temp doesn't generally work for precip; plus with precip you need to deal with the "dribble" issue. So care needs to be taken when choosing an option. |
would it be too difficult to have a few gridding options that the user can pick from? |
Would this be better as a vignette with examples of how to use the results from this package instead of adding it as a function in the package itself? |
Hey Sean @serbinsh thanks for the info! Kathe, that's a good point; does RCMIP5 have to offer regridding? I guess the answer might be 'yes' if we expect big use cases like data -> regrid -> makeXStat(). But if most work flows are data -> makeStat() -> regrid, maybe not. |
Regridding is synced with master branch. However I can't figure out how to include the dependency for 'plyr'. @bpbond could you take a look at the getProjectionMatrix function in regrid and see if there is a smarter way to do the ldply? |
…eliminating `plyr` dependency. See issue #16. Also some formatting changes for consistency with rest of code.
Hi Kathe, I've rewritten that |
Looks like a bug got introduced... working on it. |
Nuts, sorry. |
Done. I think regridding can be considered implemented. ffe53e7 |
When I run the regrid test code from the command line, it doesn't work (below). When I run it as part of the test suite, it doesn't terminate (very slow). Any thoughts?
|
I think you may have an old version. Sync and re-run. |
Thanks. Closing. |
No description provided.
The text was updated successfully, but these errors were encountered: