combined fortfile creation and interpolation fix into meta script

This commit is contained in:
caes 2016-06-10 02:28:20 -04:00
parent 84c621f35e
commit 7f4bc149e3
2 changed files with 17 additions and 4 deletions

View File

@ -3,7 +3,7 @@
script_dir=$( cd $(dirname $0) ; pwd -P |sed 's@^\(.*\)/scripts.*@\1/scripts@') script_dir=$( cd $(dirname $0) ; pwd -P |sed 's@^\(.*\)/scripts.*@\1/scripts@')
basedir=`pwd` basedir=`pwd`
if [[ -x $script_dir/../bin/interpolate_fix]]; if [[ -x $script_dir/../bin/interpolation_fix ]]
then then
echo "Binary available. Proceeding." echo "Binary available. Proceeding."
else else
@ -11,15 +11,16 @@ else
exit 9 exit 9
fi fi
#for fortfile in $(echo fort.*);
for fortfile in $@ for fortfile in $@
do do
if [[ -e $(basename $fortfile) ]] if [[ -e $(basename $fortfile) ]]
then then
mkdir -p uninterpolated mkdir -p uninterpolated
mv $fortfile uninterpolated mv $fortfile uninterpolated
echo $script_dir/../bin/interpolate_fix uninterpolated/$(basename $fortfile) $fortfile $script_dir/../bin/interpolation_fix uninterpolated/$(basename $fortfile) $fortfile
else else
echo $script_dir/../bin/interpolate_fix $fortfile $(basename $fortfile) $script_dir/../bin/interpolation_fix $fortfile $(basename $fortfile)
fi fi
echo ""
done
exit 0 exit 0

View File

@ -0,0 +1,12 @@
#!/bin/bash
# This script not generalized. Use with caution.
mkdir fortfiles
cd fortfiles
../../../../../bin/create_fort_files ../mpi_grid.out ../../../../../reference/linelist
../../../../../scripts/meta/bulk_interpolation_fix.sh fort.* >> interpolation_report
tar cf ../fortfiles_4thdex_ngc5548_mehdipour_cldn24.tar fort.*
cd ..
gzip fortfiles_4thdex_ngc5548_mehdipour_cldn24.tar
echo done