Skip to content

Commit c42ca55

Browse files
Merge pull request #1886 from andrew-s28/multiple-files-bugfix
Fixes error raised when using multiple files for fields with no time dimension
2 parents dd9554e + 7b0e67d commit c42ca55

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

parcels/field.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,11 @@ def from_netcdf(
686686
kwargs["data_full_zdim"] = data_full_zdim
687687

688688
if len(data_filenames) > 1 and "time" not in dimensions and timestamps is None:
689-
raise RuntimeError("Multiple files given but no time dimension specified")
689+
warnings.warn(
690+
"Multiple files given but no time dimension specified. See https://github.com/OceanParcels/Parcels/issues/1831 for more info.",
691+
FieldSetWarning,
692+
stacklevel=2,
693+
)
690694

691695
if grid is None:
692696
# Concatenate time variable to determine overall dimension

0 commit comments

Comments
 (0)