Skip to content

Commit

Permalink
Update the completeness checker from sim exp.
Browse files Browse the repository at this point in the history
  • Loading branch information
kgoergen committed Aug 21, 2024
1 parent 930890c commit 845501a
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions ctrl/aux_checkCompleteness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ for i_procstep in {$BASE_SIMRESDIR,$BASE_POSTPRODIR} ; do
check_result[$((0+$array_counter*2))]=$fnsumf
check_result[$((1+$array_counter*2))]=$fssumf
((array_counter++))
echo ${check_result[@]}
#echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
#echo "intermediate result (size + number of files):" ${check_result[@]}
#echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
done
done

Expand All @@ -97,20 +99,34 @@ for i_path in ${dateCheck}* ; do
done
check_result[$((0+$array_counter*2))]=$fnsumf
check_result[$((1+$array_counter*2))]=$fssumf
echo "to check:" ${check_result[@]}
#echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
#echo "to check finally (size + number of files):" ${check_result[@]}
#echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"

#diff array
echo "################################################################################"
echo "check compare number of files and size per 3x simres, 3x postpto, 1x monitoring"
array_counter=0
declare -a refvec
refvec=(23624.0 1487.0 389.0 149.0 713.0 726.0 2196.0 786.0 432.0 59.0 1407.0 884.0 252.0 41.0)
echo "reference:" ${refvec[@]}
echo "to check :" ${check_result[@]}
echo "========================================="
echo "line 1: cummulative number"
echo "line 2: cummulative size"
echo "COSMO"
echo "CLM"
echo "ParFlow"
echo "========================================="
for i in ${refvec[@]}
do
echo $i ${check_result[$array_counter]}
if (( $(echo "${check_result[$array_counter]} < $i" | bc -l) )); then
echo "WARNING, number/size of files lower than expected, check ref:" ${check_result[$array_counter]} $i
fi
((array_counter++))
if [ $((array_counter%2)) -eq 0 ]; then
echo "----------"
fi
done

exit 0

0 comments on commit 845501a

Please sign in to comment.