Skip to content

Commit

Permalink
correct extraction of variables, bed, water level and interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mKlapwijk committed Sep 2, 2024
1 parent d5c544d commit 89a6a44
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions decoimpact/business/entities/rules/depth_average_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ def execute(
"""

# The first DataArray in our value_arrays contains the values to be averaged
# but the name of the key is given by the user, and is unknown here, so
# just use the first value.
iterator_input_values = iter(value_arrays.values())

variables = next(iterator_input_values)
bed_level_values = next(iterator_input_values)
water_level_values = next(iterator_input_values)
depths_interfaces = next(iterator_input_values)
# but the name of the key is given by the user, and is unknown here, so use
# the ordering defined in the parser.
values_list = list(value_arrays.values())

variables = values_list[0]
bed_level_values = values_list[1]
water_level_values = values_list[2]
depths_interfaces = values_list[3]

# Get the dimension names for the interfaces and for the layers
dim_interfaces_name = list(depths_interfaces.dims)[0]
Expand Down

0 comments on commit 89a6a44

Please sign in to comment.