Commit 2aceadf4 authored by Marc R.'s avatar Marc R.

ensemble members distributed among multiple files: changed placeholder to '%m' for consistency

parent aa18c528
......@@ -76,7 +76,7 @@ void MAbstractDataReader::getAvailableFilesFromFilters(QStringList &availableFil
availableFiles.clear();
QString rootPath = dataRoot.absolutePath();
QString filters = dirFileFilters;
filters.replace("\\e", "*");
filters.replace("%m", "*");
QStringList dirFilters = filters.split("/", QString::SkipEmptyParts);
// Take the last part of the filters list as file filter.
QString fileFilter = dirFilters.takeLast();
......@@ -140,7 +140,7 @@ int MAbstractDataReader::getEnsembleMemberIDFromFileName(QString fileName)
{
QString ensembleNameFilter = QRegExp::escape(dirFileFilters);
ensembleNameFilter.replace("\\*", ".*");
ensembleNameFilter.replace("\\\\e", "(\\d+)");
ensembleNameFilter.replace("%m", "(\\d+)");
QRegExp findEnsemble(ensembleNameFilter);
......
......@@ -67,7 +67,7 @@ public:
The file paths are stored to @p availableFiles.
For searching a filter is used with the ensemble member identifier place
holder "\\e" replaced by "*".
holder "%m" replaced by "*".
*/
void getAvailableFilesFromFilters(QStringList &availableFiles);
......@@ -77,11 +77,11 @@ public:
their file or subdirectory names (e.g., "my_forecast.004.grb" or
"member_004/temperature.nc"), gets the ensemble member identifier form @p
fileName by applying @ref dirFileFilters (the position of the ensemble ID
is specified by "\\e" placed in the file filter string. Example:
"my_forecast.\\e.grb" or "member_\\e/temperature.nc").
is specified by "%m" placed in the file filter string. Example:
"my_forecast.%m.grb" or "member_%m/temperature.nc").
For searching, a regular expression is built from @ref dirFileFilters in
which the ensemble member identifier place holder "\\e" is replaced by
which the ensemble member identifier place holder "%m" is replaced by
"\d+".
@return the ensemble member identifier if found and -1 otherwise.
......
......@@ -501,7 +501,7 @@ void MClimateForecastReader::scanDataRoot()
QStringList availableFiles;
getAvailableFilesFromFilters(availableFiles);
ensembleIDIsSpecifiedInFileName = dirFileFilters.contains("\\e");
ensembleIDIsSpecifiedInFileName = dirFileFilters.contains("%m");
int ensembleIDFromFile = -1;
QMap<QString, MNcVarDimensionInfo> auxiliaryVarsDimensionsInfo;
......
......@@ -669,7 +669,7 @@ void MGribReader::scanDataRoot()
QStringList availableFiles;
getAvailableFilesFromFilters(availableFiles);
ensembleIDIsSpecifiedInFileName = dirFileFilters.contains("\\e");
ensembleIDIsSpecifiedInFileName = dirFileFilters.contains("%m");
int ensembleIDFromFile = -1;
// Create and initialise progress bar.
......
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