Closed erogluorhan closed 1 month ago
Essentially, much of our integrate
and other functionality would remain unchanged, since we would need to implement a way of obtaining a "subset" of our grid.
For example
# global integral
uxds['v1'].integrate()
# regional integral from a bounding box
uxds['v1'].bound(lon=(-80, 80), lat=(-20,20)).integrate()
# regional integral using nearest neighbors
uxds['v1'].nearest_neighbor(center=(0, 0), r=15).integrate()
Obtaining a subset of our grid while interfacing with our UxDataArray
and UxDataset
and Grid
should be a top priority.
Just an FYI: With this over-a-region functionality, the edge-faces may be expected to change to fit into the region in the newer Grid, so the subsetting implementation in PR #616 may not be sufficient for the ask here (cc @philipc2)
Just an FYI: With this over-a-region functionality, the edge-faces may be expected to change to fit into the region in the newer Grid, so the subsetting implementation in PR #616 may not be sufficient for the ask here (cc @philipc2)
@erogluorhan
Any new thoughts on this?
Any new thoughts on this?
I think our subsetting feature works to some extent for this. I am not sure what I exactly meant with my comment on Jan 2, but I believe it was referring to the precise "trimming" of the faces around the borders of a grid, which can happen with lat-lon boxes. In any case, I think our integrate function itself would remain unchanged, and we can close this issue. Does that help?
Any new thoughts on this?
I think our subsetting feature works to some extent for this. I am not sure what I exactly meant with my comment on Jan 2, but I believe it was referring to the precise "trimming" of the faces around the borders of a grid, which can happen with lat-lon boxes. In any case, I think our integrate function itself would remain unchanged, and we can close this issue. Does that help?
Thanks for the clarification! I believe the case about "trimming" should be covered when we incorporate "exclusive" grid indexing. I'll close this issue!
np.float64 UxDataset.integrate(self, [quadrature_rule, order, Grid region])
that integrates the dataset variables andnp.float64 UxDataArray.integrate(self, [quadrature_rule, order, Grid region])
that integrates the data array over a region, if specified.Note: Existing
UxDataset.integrate()
andUxDataArray.integrate()
integrate over all the faces of the given mesh.