Skip to content

Commit 32b95ff

Browse files
Fixing inaccurate find statement
The date to find files was inaccurate. For example, finding files with the year *2010* resulted in finding wrong files, such as *196201010000*. Reported-by: Sujata Budhathoki <[email protected]> Singed-off-by: Kasra Keshavarz <[email protected]>
1 parent 4beae54 commit 32b95ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/ouranos-mrcc5-cmip6/mrcc5-cmip6.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ for modelMember in "${modelArr[@]}"; do
363363
# iterate over dataset variables of interest
364364
for var in "${variableArr[@]}"; do
365365
# find the source file
366-
src="$(find ${datasetDir}/${pathTemplate}/${var}/ -type f -name "*${fileYear}*")"
366+
src="$(find ${datasetDir}/${pathTemplate}/${var}/ -type f -name "*${fileYear}0101*")"
367367
if [[ -z "$src" ]]; then
368368
echo "$(logDate)$(basename $0): ERROR! ${fileYear} file not found in ${datasetDir}/${pathTemplate}/${var}/"
369369
exit 1;

0 commit comments

Comments
 (0)