Commit f53a7172 authored by Sergey Kireev's avatar Sergey Kireev
Browse files

png2d scripts added

parent 7095b06f
#!/bin/bash
source ./do_parameters.sh
fromdir="dat_${nt}"
todir="png2d_${nt}"
[ ! -d ${fromdir} ] && { echo "Directory ${fromdir} does not exist!" ; exit ; }
[ -d ${todir} ] && { echo "Terget directory ${todir} already exist!" ; exit ; }
mkdir ${todir}
LC_NUMERIC="en_US.UTF-8"
count_en=0
for (( en100=${minn}; en100 <= ${maxn}; en100 += ${step} )); do
en1=`echo "scale=2; ${en100}/100" | bc`
en=`printf "%04.2f" ${en1}`
val_en[$count_en]=$en
count_en=$((count_en + 1))
done
count_enl=0
for (( enl100=${minnl}; enl100 <= ${maxnl}; enl100 += ${step} )); do
enl1=`echo "scale=2; ${enl100}/100" | bc`
enl=`printf "%04.2f" ${enl1}`
val_enl[$count_enl]=$enl
count_enl=$((count_enl + 1))
done
count_el=0
for (( el100=${minl}; el100 <= ${maxl}; el100 += ${step} )); do
el1=`echo "scale=2; ${el100}/100" | bc`
el=`printf "%04.2f" ${el1}`
val_el[$count_el]=$el
count_el=$((count_el + 1))
done
#count_evap=0
#evap1=0
#evap=`printf "%08.6f" ${evap1}`
#val_evap[$count_evap]=$evap
#count_evap=$((count_evap + 1))
#for (( evap1000000=${minevap}; evap1000000 <= ${maxevap}; evap1000000 *= ${stepevap} )); do
# evap1=`echo "scale=6; ${evap1000000}/1000000" | bc`
# evap=`printf "%08.6f" ${evap1}`
# val_evap[$count_evap]=$evap
# count_evap=$((count_evap + 1))
#done
#el1=`echo "scale=2; ${minl}/100" | bc`
#el=`printf "%04.2f" ${el1}`
#echo "en : ${val_en[*]}"
#echo "enl : ${val_enl[*]}"
#echo "el : ${el}"
#echo "evap: ${val_evap[*]}"
for inn in `seq 0 $((count_en - 1))`; do
enn=${val_en[$inn]}
echo "en: ${enn}"
inls=`seq 0 $((count_enl - 1))`
nls=`for i in $inls; do echo -n "${val_enl[$i]} "; done`
ills=`seq 0 $((count_el - 1))`
lls=`for i in $ills; do echo -n "${val_el[$i]} "; done`
#ievs=`seq 0 $((count_en - 1))`
#evs=`for i in $ievs; do echo -n "${val_evap[$i]} "; done`
target="${todir}/en${enn}_enl_el"
#echo " nls: ${nls[*]}"
#echo " lls: ${lls[*]}"
#echo " evs: ${evs[*]}"
gnuplot -e "name=\"${target}\"; nx=${nx}; ny=${ny}; ppp=${ppp}; \
rows=\"${nls}\"; cols=\"${lls}\"; rlabel=\"e_{nl}=\"; clabel=\"e_{l}=\"; \
format=\"${fromdir}/en${enn}_enl%s_el%s${suffix}\";" $script_png2d
# [ ! -d ${todir} ] && mkdir ${todir}
# mv ${name}.png ${todir}/
done
for inl in `seq 0 $((count_enl - 1))`; do
enl=${val_enl[$inl]}
echo "enl: ${enl}"
inns=`seq 0 $((count_en - 1))`
nns=`for i in $inns; do echo -n "${val_en[$i]} "; done`
ills=`seq 0 $((count_el - 1))`
lls=`for i in $ills; do echo -n "${val_el[$i]} "; done`
#ievs=`seq 0 $((count_evap - 1))`
#evs=`for i in $ievs; do echo -n "${val_evap[$i]} "; done`
target="${todir}/en_enl${enl}_el"
#echo " nns: ${nns[*]}"
#echo " lls: ${lls[*]}"
#echo " evs: ${evs[*]}"
gnuplot -e "name=\"${target}\"; nx=${nx}; ny=${ny}; ppp=${ppp}; \
rows=\"${nns}\"; cols=\"${lls}\"; rlabel=\"e_{n}=\"; clabel=\"e_{l}=\"; \
format=\"${fromdir}/en%s_enl${enl}_el%s${suffix}\";" $script_png2d
# [ ! -d ${todir} ] && mkdir ${todir}
# mv ${name}.png ${todir}/
done
#for iev in `seq 0 $((count_evap - 1))`; do
# evap=${val_evap[$iev]}
# echo "evap: ${evap}"
for ill in `seq 0 $((count_el - 1))`; do
el=${val_el[$ill]}
echo "el: ${el}"
inls=`seq 0 $((count_enl - 1))`
nls=`for i in $inls; do echo -n "${val_enl[$i]} "; done`
inns=`seq 0 $((count_en - 1))`
nns=`for i in $inns; do echo -n "${val_en[$i]} "; done`
target="${todir}/en_enl_el${el}"
#echo " nns: ${nns[*]}"
#echo " nls: ${nls[*]}"
gnuplot -e "name=\"${target}\"; nx=${nx}; ny=${ny}; ppp=${ppp}; \
rows=\"${nns}\"; cols=\"${nls}\"; rlabel=\"e_{n}=\"; clabel=\"e_{nl}=\"; \
format=\"${fromdir}/en%s_enl%s_el${el}${suffix}\";" $script_png2d
# [ ! -d ${todir} ] && mkdir ${todir}
# mv ${name}.png ${todir}/
done
#!/bin/bash
source ./do_parameters.sh
fromdir="dat_${nt}"
todir="png2d_${nt}"
[ ! -d ${fromdir} ] && { echo "Directory ${fromdir} does not exist!" ; exit ; }
[ -d ${todir} ] && { echo "Terget directory ${todir} already exist!" ; exit ; }
mkdir ${todir}
LC_NUMERIC="en_US.UTF-8"
count_en=0
for (( en100=${minn}; en100 <= ${maxn}; en100 += ${step} )); do
en1=`echo "scale=2; ${en100}/100" | bc`
en=`printf "%04.2f" ${en1}`
val_en[$count_en]=$en
count_en=$((count_en + 1))
done
count_enl=0
for (( enl100=${minnl}; enl100 <= ${maxnl}; enl100 += ${step} )); do
enl1=`echo "scale=2; ${enl100}/100" | bc`
enl=`printf "%04.2f" ${enl1}`
val_enl[$count_enl]=$enl
count_enl=$((count_enl + 1))
done
count_evap=0
evap1=0
evap=`printf "%08.6f" ${evap1}`
val_evap[$count_evap]=$evap
count_evap=$((count_evap + 1))
for (( evap1000000=${minevap}; evap1000000 <= ${maxevap}; evap1000000 *= ${stepevap} )); do
evap1=`echo "scale=6; ${evap1000000}/1000000" | bc`
evap=`printf "%08.6f" ${evap1}`
val_evap[$count_evap]=$evap
count_evap=$((count_evap + 1))
done
el1=`echo "scale=2; ${minl}/100" | bc`
el=`printf "%04.2f" ${el1}`
#echo "en : ${val_en[*]}"
#echo "enl : ${val_enl[*]}"
#echo "el : ${el}"
#echo "evap: ${val_evap[*]}"
for inn in `seq 0 $((count_en - 1))`; do
enn=${val_en[$inn]}
echo "en: ${enn}"
inls=`seq 0 $((count_enl - 1))`
nls=`for i in $inls; do echo -n "${val_enl[$i]} "; done`
ievs=`seq 0 $((count_en - 1))`
evs=`for i in $ievs; do echo -n "${val_evap[$i]} "; done`
target="${todir}/en${enn}_enl_el${el}_evap"
#echo " nls: ${nls[*]}"
#echo " evs: ${evs[*]}"
gnuplot -e "name=\"${target}\"; nx=${nx}; ny=${ny}; ppp=${ppp}; \
rows=\"${nls}\"; cols=\"${evs}\"; rlabel=\"e_{nl}=\"; clabel=\"evap=\"; \
format=\"${fromdir}/en${enn}_enl%s_el${el}_evap%s${suffix}\";" $script_png2d
# [ ! -d ${todir} ] && mkdir ${todir}
# mv ${name}.png ${todir}/
done
for inl in `seq 0 $((count_enl - 1))`; do
enl=${val_enl[$inl]}
echo "enl: ${enl}"
inns=`seq 0 $((count_en - 1))`
nns=`for i in $inns; do echo -n "${val_en[$i]} "; done`
ievs=`seq 0 $((count_evap - 1))`
evs=`for i in $ievs; do echo -n "${val_evap[$i]} "; done`
target="${todir}/en_enl${enl}_el${el}_evap"
#echo " nns: ${nns[*]}"
#echo " evs: ${evs[*]}"
gnuplot -e "name=\"${target}\"; nx=${nx}; ny=${ny}; ppp=${ppp}; \
rows=\"${nns}\"; cols=\"${evs}\"; rlabel=\"e_{n}=\"; clabel=\"evap=\"; \
format=\"${fromdir}/en%s_enl${enl}_el${el}_evap%s${suffix}\";" $script_png2d
# [ ! -d ${todir} ] && mkdir ${todir}
# mv ${name}.png ${todir}/
done
for iev in `seq 0 $((count_evap - 1))`; do
evap=${val_evap[$iev]}
echo "evap: ${evap}"
inls=`seq 0 $((count_enl - 1))`
nls=`for i in $inls; do echo -n "${val_enl[$i]} "; done`
inns=`seq 0 $((count_en - 1))`
nns=`for i in $inns; do echo -n "${val_en[$i]} "; done`
target="${todir}/en_enl_el${el}_evap${evap}"
#echo " nns: ${nns[*]}"
#echo " nls: ${nls[*]}"
gnuplot -e "name=\"${target}\"; nx=${nx}; ny=${ny}; ppp=${ppp}; \
rows=\"${nns}\"; cols=\"${nls}\"; rlabel=\"e_{n}=\"; clabel=\"e_{nl}=\"; \
format=\"${fromdir}/en%s_enl%s_el${el}_evap${evap}${suffix}\";" $script_png2d
# [ ! -d ${todir} ] && mkdir ${todir}
# mv ${name}.png ${todir}/
done
#done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment