Skip to content

Dealing with "time" dim differently #47

@BSchilperoort

Description

@BSchilperoort

Currently when you regrid data, you only need to specify the target dataset:

ds_regridded = ds_source.regrid.linear(ds_target)

And the dims common to ds_source and ds_target are regridded, except if a dimension is named "time". That one is dropped out. This is of course a bit arbitrary.

Other ways to deal with this would be:

  1. Only regrid dimensions specified by user with an arg/kwarg (a bit cumbersome).
  2. Force users to modify the ds_target object so it only includes the dimensions that they actually want to regrid (like 1. but without the input argument)
  3. Regrid all common dimensions, except for ones specified by users through a kwarg.
  4. Like 3., but automatically drop any dimensions with a non-int/float coordinate values (while warning the user).

To me option 4 sounds like a good compromise between the current behavior and being less arbitrary. It would also make it easier to deprecate the automagical ignoring of dimensions as users are already being warned.


This issue arose from a comment by @dcherian in #46 (comment)_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions