- nctoolkit.create_ensemble(path='', recursive=True)#
create_ensemble: Generate an ensemble of files from a directory.
path (str) – The directory to search for netCDF files
recursive (boolean) – True/False depending on whether you want to search the path recursively. Defaults to True.
- Return type:
list of files
If you wanted to recursively find all netCDF files available in a directory “data”, you would do this:
>>> import nctoolkit as nc >>> nc.create_ensemble("data")
If you wanted to find the files in that directory and ignore subdirectories, you would instead do this:
>>> nc.create_ensemble("data", recursive = False)