Skip to content

deriving time dimension from metadata #99

Open

Description

@jorritscholze

Currently, zappend requires a time dimension to be present within the product itself or a custom slice source needs to be given to create the time dimension. It would be beneficial for zappend to also utilize the metadata fields for creating the time dimension.

Activity

  1. forman commented on Sep 13, 2024

    @forman
    Member

    @jorritscholze Good point! How would you like to see that implemented/configured? Names of time metadata fields may differ, and the format of time values as well.

  2. forman commented on Sep 13, 2024

    @forman
    Member

    For maximum flexibility we may use Python expressions in the configuration, see also here. Suggestion:

    {
      "append_dim": "time",
      "append_coords": {
        "time": {
            "dims": ["time"],
            "values": "{{ [to_datetime(ds.attrs['START_TIME'])] }}",
        },
        "time_bnds": {
            "dims": ["time", "bnds"],
            "values": "{{ [to_datetime(ds.attrs['START_TIME']), to_datetime(ds.attrs['STOP_TIME'])] }}",
        }
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions