File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ dest_inst="${OUTDIR}/inst.daily.${MEMDIR}/inst.daily.${filename_start}${filemm}$
9797if [ -d " ${tmp_acc_work_dir} " ]; then
9898 # Clear array and fill it using mapfile
9999 unset acc_files
100- mapfile -t acc_files < <( ls -v " ${tmp_acc_work_dir} " /daily_acc* .grb 2> /dev/null)
100+ acc_string=$( ls -v " ${tmp_acc_work_dir} " /daily_acc* .grb 2> /dev/null)
101+ mapfile -t acc_files <<< " ${acc_string}"
101102
102103 if [ ${# acc_files[@]} -gt 0 ]; then
103104 echo " INFO: Task $i merging ${# acc_files[@]} days for ACC using array expansion."
110111
111112# 2. Consolidate Instantaneous (INST)
112113if [ -d " ${tmp_inst_work_dir} " ]; then
114+ # Clear array and fill it using mapfile
113115 unset inst_files
114- mapfile -t inst_files < <( ls -v " ${tmp_inst_work_dir} " /daily_inst* .grb 2> /dev/null)
116+ inst_string=$( ls -v " ${tmp_inst_work_dir} " /daily_inst* .grb 2> /dev/null)
117+ mapfile -t inst_files <<< " ${inst_string}"
115118
116119 if [ ${# inst_files[@]} -gt 0 ]; then
117120 echo " INFO: Task $i merging ${# inst_files[@]} days for INST using array expansion."
You can’t perform that action at this time.
0 commit comments