ucftar_pack does not necessarily need to check for the particle file. it's not present for single-phase simulations
This commit is contained in:
parent
4449f4edf5
commit
1602ff1443
|
|
@ -72,7 +72,7 @@ set -- "${POSITIONAL[@]}"
|
|||
|
||||
# Parse input filename
|
||||
din=$1
|
||||
seqnum=$2
|
||||
seqnum=$2
|
||||
|
||||
# Construct output filename if not specified
|
||||
if [ -z "$fout" ]; then
|
||||
|
|
@ -106,7 +106,8 @@ if [ ! -s ${din}/${fproc} ]; then
|
|||
fi
|
||||
if [ ! -s ${din}/${fpart} ]; then
|
||||
(>&2 echo "[Error] File not found or empty: ${din}/${fpart}")
|
||||
exit 1
|
||||
# exit 1
|
||||
fpart=
|
||||
fi
|
||||
|
||||
# Check if all velocity fields exist and are not empty
|
||||
|
|
@ -174,7 +175,7 @@ while [ $packloop -eq 1 ]; do
|
|||
snumfilecur=0
|
||||
scursize=1024 # Initialize with size of trailing zero bloc
|
||||
unset flist
|
||||
while true; do
|
||||
while true; do
|
||||
sfilesize=$(wc -c ${din}/${flist_sbase[${scounter}]} | awk '{print $1}') # raw size
|
||||
sfilesize=$(((${sfilesize}+511)/512*512+512)) # adjust to 512 byte-blocks and add header
|
||||
spredictsize=$((${scursize}+${sfilesize}))
|
||||
|
|
@ -198,8 +199,8 @@ while [ $packloop -eq 1 ]; do
|
|||
fi
|
||||
flag_splitdone=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# Create tar archive
|
||||
tar $flagtar --directory=${din} -cf ${fout} ${flist[@]}
|
||||
|
|
@ -211,7 +212,7 @@ while [ $packloop -eq 1 ]; do
|
|||
# Compare checksums (CNC32), if flag is set
|
||||
flistx=($(echo ${flist[@]} | sed s/"_$seqnum"/""/g))
|
||||
if [ $checksum -eq 1 ]; then
|
||||
for ii in "${!flistx[@]}"; do
|
||||
for ii in "${!flistx[@]}"; do
|
||||
if [ $verbose -eq 1 ]; then
|
||||
(>&2 echo "Verifying checksum: ${flist[$ii]}")
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue