Skip to content

Commit ba3be08

Browse files
authored
fix(average-type): add average type as mean if not given (#991)
1 parent 67e62a6 commit ba3be08

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hydrolib/tools/extforce_convert/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ def map_method_to_averaging_type(
199199
Corresponding value for `averagingType`, or "unknown" for invalid input.
200200
"""
201201
if old_forcing_method == 6:
202-
averaging_type = AVERAGING_TYPE_DICT.get(int(averaging_type), "unknown")
202+
if averaging_type is None:
203+
averaging_type = AveragingType.mean
204+
else:
205+
averaging_type = AVERAGING_TYPE_DICT.get(int(averaging_type), "unknown")
203206
else:
204207
averaging_type = "unknown"
205208

0 commit comments

Comments
 (0)