argopy.stores.ftpstore.open_mfdataset#
- ftpstore.open_mfdataset(urls, max_workers: int = 6, method: str = 'sequential', progress: bool = False, concat: bool = True, concat_dim='row', preprocess=None, preprocess_opts={}, open_dataset_opts={}, errors: str = 'ignore', *args, **kwargs)[source]#
Open multiple ftp urls as a single xarray dataset.
This is a version of the
argopy.stores.ftpstore.open_datasetmethod that is able to handle a list of urls/paths sequentially or in parallel.Use a Threads Pool by default for parallelization.
- Parameters:
max_workers (int, default: 6) β Maximum number of threads or processes
method (str, default:
thread) βThe parallelization method to execute calls asynchronously:
seq(default): open data sequentially, no parallelization appliedprocess: use a pool of at mostmax_workersprocessesdistributed.client.Client: Experimental, expect this method to fail !
progress (bool, default: False) β Display a progress bar
concat (bool, default: True) β Concatenate results in a single
xarray.Datasetor not (in this case, function will return a list ofxarray.Dataset)concat_dim (str, default:
row) β Name of the dimension to use to concatenate all datasets (passed toxarray.concat)preprocess (callable (optional)) β If provided, call this function on each dataset prior to concatenation
preprocess_opts (dict (optional)) β If
preprocessis provided, pass this as optionserrors (str, default:
ignore) βDefine how to handle errors raised during data URIs fetching:
raise: Raise any error encounteredignore(default): Do not stop processing, simply issue a debug message in logging consolesilent: Do not stop processing and do not issue log message
kwargs (Other args and)
- Returns:
output
- Return type:
xarray.Datasetor list ofxarray.Dataset