Skip to content

cartesian: Merge GlobalTable accessor (.A) and AbsoluteIndex accessor (.at) #2282

@FlorianDeconinck

Description

@FlorianDeconinck

Previously we design a GlobalTable (#1451) which provides a global_table_var.A(...) that works as an absolute index on the data dimensions (also work with regular Fields though it's less advertised).

We are introducing now a similar - slightly extended - concept with an absolute indexer that works as follows field.at(K=..., ddim=[...]) with ddim optional (#2276).

Those concept overlap enough to be merge into one another.

Syntax for the GlobalTable remains to be decided between:

  1. global_table_var.at(ddim=[...]) - probably a more constant option but mixed data dimensions and global table
  2. global_table_var.at([...]) - introduced a mixed syntax, maybe confusing
  3. global_table_var.at(....) - with indices as positional arguments, mixed syntax
  4. [add your idea here]

Action plan:

  • Deprecate the .A use
  • ADR the change and update the absolute index ADR
  • Implement and check unit tests coverage

Metadata

Metadata

Assignees

No one assigned

    Labels

    gt4py.cartesianIssues concerning the current version with support only for cartesian grids.triage: enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions