Commit 2354792f authored by Pierre Cazenave's avatar Pierre Cazenave

Add verbose output option to the multi-file FileReader function.

parent c65f0bcc
Pipeline #775 failed with stage
......@@ -774,13 +774,15 @@ class FileReader(Domain):
return time_idx
def MFileReader(fvcom, *args, **kwargs):
def MFileReader(fvcom, noisy=False, *args, **kwargs):
""" Wrapper around FileReader for loading multiple files at once.
fvcom : list-like, str
List of files to load.
noisy : bool, optional
Set to True to write out the name of each file being loaded.
Additional arguments are passed to `'.
......@@ -792,9 +794,13 @@ def MFileReader(fvcom, *args, **kwargs):
if isinstance(fvcom, str):
if noisy:
print('Loading {}'.format(fvcom))
FVCOM = FileReader(fvcom, *args, **kwargs)
for file in fvcom:
if noisy:
print('Loading {}'.format(file))
if file == fvcom[0]:
FVCOM = FileReader(file, *args, **kwargs)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment