Skip to content

Commit 3b7d7b9

Browse files
authored
Merge pull request #1084 from xylar/fix-conservation-main-vs-ctrl
Fix conservation when list of inputs is empty
2 parents 9741b1d + 4b7cb9b commit 3b7d7b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mpas_analysis/ocean/conservation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,10 @@ def _compute_time_series_with_xarray(self, variable_list):
743743

744744
append, inputFiles = self._check_output_safe_to_append(variable_list)
745745

746+
if len(inputFiles) == 0:
747+
# nothing to do
748+
return
749+
746750
# Open all input files as a single dataset
747751
self.logger.info(
748752
f'Opening input files with xarray: {inputFiles[0]} ... '

0 commit comments

Comments
 (0)