You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
StructuredGrid can interpolate between grid features with
array_at_verts_basic(a): cell center (node) to vertices with neighbor averaging
array_at_verts(a): cell center or face center to vertices (bi or trilinear)
array_at_faces(a, direction): cell center to pair of faces normal to x, y, or z axis (linear)
This is nice but may be hard for users to find, and not all possible mappings are supported
Describe the solution you'd like
Unifying the API could help make it more discoverable, maybe something like
interpolate(self, a, feat="c2v", **kwargs)
where a is a 3D array of known values and feat selects the site mapping. Would need to check that a's dimensions match the input feature. The direction for interpolation to faces, and other mapping-specific params, could be passed with **kwargs. Implementation could wrap the existing functions and add other mappings to/from edge midpoints, vertices to cell centers, etc
A signature with an option selected from an enumeration seems like a common choice for many-to-many conversions/mappings (e.g. OpenCV, discretize), though docs would be key as shape of input/output would vary
If flopy's focus is more to drive modflow and less fully-featured post-processing this may be out of scope. Could also be missing some reason it's misguided or not possible
The text was updated successfully, but these errors were encountered:
We should track down what this code is actually used for. If my memory serves me, this was implemented for a specific discharge vector postprocessing routine for mf2005 and probably does not get a ton of use. We should examine if it's used elsewhere in the code and/or consider separating it from the modelgrid if that's the only use case.
Is your feature request related to a problem? Please describe.
StructuredGrid
can interpolate between grid features witharray_at_verts_basic(a)
: cell center (node) to vertices with neighbor averagingarray_at_verts(a)
: cell center or face center to vertices (bi or trilinear)array_at_faces(a, direction)
: cell center to pair of faces normal to x, y, or z axis (linear)This is nice but may be hard for users to find, and not all possible mappings are supported
Describe the solution you'd like
Unifying the API could help make it more discoverable, maybe something like
interpolate(self, a, feat="c2v", **kwargs)
where
a
is a 3D array of known values andfeat
selects the site mapping. Would need to check thata
's dimensions match the input feature. Thedirection
for interpolation to faces, and other mapping-specific params, could be passed with**kwargs
. Implementation could wrap the existing functions and add other mappings to/from edge midpoints, vertices to cell centers, etcA signature with an option selected from an enumeration seems like a common choice for many-to-many conversions/mappings (e.g. OpenCV, discretize), though docs would be key as shape of input/output would vary
Minimal draft implementation with some expanded testing and docs
Describe alternatives you've considered
If flopy's focus is more to drive modflow and less fully-featured post-processing this may be out of scope. Could also be missing some reason it's misguided or not possible
The text was updated successfully, but these errors were encountered: