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

Request for binning/averaging function #7

Open
profseth opened this issue Dec 17, 2021 · 0 comments
Open

Request for binning/averaging function #7

profseth opened this issue Dec 17, 2021 · 0 comments

Comments

@profseth
Copy link

While the regrid function is useful, it would be great to have a few extra tools for putting data onto a new ocean grid. Specifically, I propose some version of the following:

bin3d: takes sparse ocean data, averages all points which lie within an ocean grid cell, outputs the average and stdev, with missing for all grid cells where no data exist

within this function you could have four keyword arguments:

interph - interpolates horizontally along the grid and inpaints NaNs around the edges, to completely fill the grid horzontally

interpv - same as above, but vertically

interphv - first interpolates horizontally, then interpolates vertically to fill in any 'levels' of the model which weren't filled in by hinterp because no data existed at that level

interpvh - same as above but vertically interpolates first

Incidentally, I've thought a lot about how to plot GEOTRACES data (and same may be true for other ocean datasets). I think that oceanographic data is typically sampled in higher vertical resolution than horizontal resolution, compared to the relative changes between stations vertically and horzontally. Thus, the most 'true' way to plot sections is by interpvh onto a high-resolution grid (or at least high resolution in the vertical, the horizontal resolution doesn't matter much. That makes the sections plot 'truth' at each data point where samples were collected (background field matches actual observations).

Thus, this functionality may have some useful plotting applications, in addition to being useful for binning data for other reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant