add align?
dcherian opened this issue · 1 comments
xarray.align
only supports an opt-out exclude
kwarg, but for these purposes it seems like we'd want an opt-in include
kwarg, so that we only aligned along specific user-specified dimensions (so cfxr.align(..., include="vertical")
) Or perhaps cfxr.align_along_dims(..., dims="vertical")
xref Unidata/MetPy#1599 (comment)
I imagine a xarray Dataset going in that contains the variables needing to be unified, which will have multiple vertical coordinates (e.g., 'isobaric', 'isobaric3', 'isobaric5', etc.) and out comes a xarray Dataset with all of the same variables subset to the common levels that are available for all of the variables with a single common vertical coordinate name across all of the variables (e.g., 'isobaric_unified').
Given that renaming to a common dimension name is probably sensible, I lean towards align_along_dims
to make it clear that this new function isn't too closely related to xr.align