Skip to content

Comments

feat[next]: Prototype concat_where extension #2356

Draft
SF-N wants to merge 5 commits intoGridTools:mainfrom
SF-N:concat_where_extension
Draft

feat[next]: Prototype concat_where extension #2356
SF-N wants to merge 5 commits intoGridTools:mainfrom
SF-N:concat_where_extension

Conversation

@SF-N
Copy link
Contributor

@SF-N SF-N commented Oct 31, 2025

Instead of writing nested concat_wheres like in:

@field_operator
  def boundary(...):
      return concat_where(
          K == 0, lower, 
          concat_where(K == nlev, upper, interior)
      )

one can now also write:


@field_operator
  def boundary(...):
      return concat_where(
          (K == 0, lower),
          (K == nlev, upper),
          interior
      )

TODOs:

  • The concat_where BuiltinFunction currently only accepts 3 args -> allow a variable argument number
  • Fix mypy issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant