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")
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
xarray.align
only supports an opt-outexclude
kwarg, but for these purposes it seems like we'd want an opt-ininclude
kwarg, so that we only aligned along specific user-specified dimensions (socfxr.align(..., include="vertical")
) Or perhapscfxr.align_along_dims(..., dims="vertical")
xref https://github.com/Unidata/MetPy/issues/1599#issuecomment-1579492224