mirror of
https://asciireactor.com/otho/cloudy-agn.git
synced 2024-12-05 01:45:08 +00:00
2017 runs finished
This commit is contained in:
parent
75a01cf023
commit
9158437e8d
10
notes
10
notes
@ -23,15 +23,15 @@ Run grid with new SED, or at least a point, check values: how to find the approp
|
||||
|
||||
✓ run models for comparising: 10.5,19.5
|
||||
|
||||
□ Why so many Fe 2 lines?
|
||||
✓ Why so many Fe 2 lines?
|
||||
|
||||
□ check if blnds are sums of the expected multiplets
|
||||
✓ check if blnds are sums of the expected multiplets
|
||||
|
||||
✓ add in more levels to the H atom, unresolved, 20, also add some to paschen, maybe others -- check how much time is lost
|
||||
|
||||
✓ punch the paschen and balmer lines up to 18
|
||||
|
||||
□ Read Intrinsic Lines
|
||||
✓ Read Intrinsic Lines
|
||||
|
||||
□ Smoothing algorithm using n-dimensional smoothing
|
||||
|
||||
@ -39,9 +39,9 @@ Run grid with new SED, or at least a point, check values: how to find the approp
|
||||
|
||||
✓ Run Grids in c17
|
||||
|
||||
□ Email about order of lines
|
||||
✓ Email about order of lines
|
||||
|
||||
□ Find blend correlated names and update
|
||||
✓ Find blend correlated names and update
|
||||
|
||||
|
||||
|
||||
|
@ -52,7 +52,7 @@ set nend 5000
|
||||
//
|
||||
// derived quantities added in Otho's program ~2017
|
||||
// InwD = InwT - InwC = Inward Diffuse
|
||||
// nFnD = nFnu - InwD = Total Diffuse
|
||||
// nFnD = nFnu - InwC = Total Diffuse
|
||||
//
|
||||
// "print continuum" redundant with set nFnu in c17
|
||||
//
|
||||
|
@ -50,7 +50,7 @@ set nend 5000
|
||||
//
|
||||
// derived quantities added in Otho's program ~2017
|
||||
// InwD = InwT - InwC = Inward Diffuse
|
||||
// nFnD = nFnu - InwD = Total Diffuse
|
||||
// nFnD = nFnu - InwC = Total Diffuse
|
||||
//
|
||||
// "print continuum" redundant with set nFnu in c17
|
||||
//
|
||||
|
@ -52,7 +52,7 @@ set nend 5000
|
||||
//
|
||||
// derived quantities added in Otho's program ~2017
|
||||
// InwD = InwT - InwC = Inward Diffuse
|
||||
// nFnD = nFnu - InwD = Total Diffuse
|
||||
// nFnD = nFnu - InwC = Total Diffuse
|
||||
//
|
||||
// "print continuum" redundant with set nFnu in c17
|
||||
//
|
||||
|
@ -50,7 +50,7 @@ set nend 5000
|
||||
//
|
||||
// derived quantities added in Otho's program ~2017
|
||||
// InwD = InwT - InwC = Inward Diffuse
|
||||
// nFnD = nFnu - InwD = Total Diffuse
|
||||
// nFnD = nFnu - InwC = Total Diffuse
|
||||
//
|
||||
// "print continuum" redundant with set nFnu in c17
|
||||
//
|
||||
|
@ -7,7 +7,7 @@ script_dir=$(
|
||||
base_dir=`pwd`
|
||||
bin_dir="$script_dir/../bin"
|
||||
|
||||
for dir in $(echo cldn*)
|
||||
for dir in $(find . -type 'd' -name 'cldn*')
|
||||
do
|
||||
echo "Processing ${dir}."
|
||||
$script_dir/operations/package_tables.sh $dir
|
||||
|
@ -11,8 +11,8 @@ script_dir=$(
|
||||
base_dir=`pwd`
|
||||
bin_dir="$script_dir/../bin"
|
||||
|
||||
cldndir=$1
|
||||
cd $cldndir
|
||||
griddir=$1
|
||||
cd $griddir
|
||||
mkdir -p fortfiles
|
||||
cd fortfiles
|
||||
# pwd
|
||||
@ -21,13 +21,14 @@ echo "Directory ready. Calling fort file creation."
|
||||
$bin_dir/create_fort_files ../mpi_grid.out $script_dir/../reference/linelist.c17
|
||||
|
||||
inwTfortnums=$(grep 'InwT' fort.*|sed 's@^fort\.\([0-9]\+\):InwT.*@\1@'|sort -nr)
|
||||
echo "Generating inward diffuse tables for $(echo "$inwTfortnums"|wc -l) coordinates."
|
||||
echo -n "Writing InwD tables to fortfiles:"
|
||||
echo "Computing inward diffuse tables for $(echo "$inwTfortnums"|wc -l) coordinates."
|
||||
echo -n "Writing InwD tables to fortfiles and shifting files:"
|
||||
count=0
|
||||
for inwTnum in $(echo $inwTfortnums|sort -r)
|
||||
do
|
||||
inwCnum=$(($inwTnum + 1))
|
||||
inwDnum=$(($inwCnum + 1))
|
||||
allfortnums=$(echo fort.*|sed 's@fort\.\([0-9]\+\)@\1@g')
|
||||
allfortnums=$(ls fort.*|sed 's@fort\.\([0-9]\+\)@\1@g'|sort -n)
|
||||
fortnumstoproc=""
|
||||
for fortnum in $allfortnums
|
||||
do
|
||||
@ -42,14 +43,52 @@ do
|
||||
newnum=$(( $fortnum + 1 ))
|
||||
mv fort.$fortnum fort.$newnum
|
||||
done
|
||||
echo -n " $inwDnum"
|
||||
#echo -n " $inwDnum"
|
||||
$bin_dir/subtract_fortfiles fort.$inwTnum fort.$inwCnum InwD > fort.$inwDnum
|
||||
echo -ne "\033[2K" ; printf "\r"
|
||||
echo -n "Writing InwD tables to fortfiles and shifting files: $(( ++count ))"
|
||||
done
|
||||
echo ""
|
||||
|
||||
inwCfortnums=$(grep 'InwC' fort.*|sed 's@^fort\.\([0-9]\+\):InwC.*@\1@'|sort -nr)
|
||||
echo "Computing total diffuse tables for $(echo "$inwCfortnums"|wc -l) coordinates."
|
||||
echo -n "Writing nFnD tables to fortfiles and shifting files: 0"
|
||||
count=0
|
||||
for inwCnum in $(echo $inwCfortnums|sort -r)
|
||||
do
|
||||
nFnunum=$(($inwCnum - 3))
|
||||
nFnDnum=$(($inwCnum + 2))
|
||||
allfortnums=$(ls fort.*|sed 's@fort\.\([0-9]\+\)@\1@g'|sort -n)
|
||||
fortnumstoproc=""
|
||||
for fortnum in $allfortnums
|
||||
do
|
||||
if (( $fortnum >= $nFnDnum ))
|
||||
then
|
||||
fortnumstoproc="$fortnum $fortnumstoproc"
|
||||
fi
|
||||
done
|
||||
# echo "Shifting $( echo "$fortnumstoproc"|wc -w ) files."
|
||||
for fortnum in $fortnumstoproc
|
||||
do
|
||||
newnum=$(( $fortnum + 1 ))
|
||||
mv fort.$fortnum fort.$newnum
|
||||
done
|
||||
|
||||
#echo -n " $nFnDnum"
|
||||
$bin_dir/subtract_fortfiles fort.$nFnunum fort.$inwCnum nFnD > fort.$nFnDnum
|
||||
echo -ne "\033[2K" ; printf "\r"
|
||||
echo -n "Writing nFnD tables to fortfiles and shifting files: $(( ++count ))"
|
||||
done
|
||||
echo ""
|
||||
|
||||
echo "Applying interpolative smoothing."
|
||||
$script_dir/operations/bulk_interpolation_fix.sh fort.* > interpolation_report
|
||||
|
||||
tar cf ngc5548_mehdipour_$(basename ${base_dir})_${cldndir}.tar *
|
||||
gzip ngc5548_mehdipour_$(basename ${base_dir})_${cldndir}.tar
|
||||
mv ngc5548_mehdipour_$(basename ${base_dir})_${cldndir}.tar.gz $base_dir
|
||||
|
||||
grid_id=$(echo ${griddir}|sed 's@^\.\/\(.*\)@\1@'|sed 's@.grids@@'|sed 's@\/@.@g')
|
||||
echo "Saving $grid_id grid"
|
||||
tar cf fortfiles_${grid_id}.tar *
|
||||
gzip fortfiles_${grid_id}.tar
|
||||
mv fortfiles_${grid_id}.tar.gz $base_dir
|
||||
|
||||
cd $base_dir
|
18
src/agn.hpp
18
src/agn.hpp
@ -335,14 +335,14 @@ agn::cloudy_grid agn::read_cloudy_grid(std::ifstream& inputfile) {
|
||||
agn::cloudy_line_data data;
|
||||
data.index = ++index;
|
||||
//std::stringstream values;
|
||||
//data.radiated_energy = atof((*linetext_it).substr(
|
||||
// radiatedenergystr_pos,
|
||||
// radiatedenergystr_len).c_str()
|
||||
//);
|
||||
//data.eq_width = atof((*linetext_it).substr(
|
||||
// eqwidthstr_pos,
|
||||
// eqwidthstr_len).c_str()
|
||||
//);
|
||||
data.radiated_energy = atof((*linetext_it).substr(
|
||||
radiatedenergystr_pos,
|
||||
radiatedenergystr_len).c_str()
|
||||
);
|
||||
data.eq_width = atof((*linetext_it).substr(
|
||||
eqwidthstr_pos,
|
||||
eqwidthstr_len).c_str()
|
||||
);
|
||||
if(line_debug) {
|
||||
std::cout
|
||||
<< std::setprecision(5)
|
||||
@ -400,7 +400,7 @@ agn::cloudy_grid agn::read_cloudy_grid(std::ifstream& inputfile) {
|
||||
getline(inputfile,inputline);
|
||||
}
|
||||
if(agn::debug) std::cout
|
||||
<< "\nAdding point to grid (size "
|
||||
<< "\nAdding point to grid ("
|
||||
<< grid.size()
|
||||
<< " of "
|
||||
<< coordlist.size()
|
||||
|
@ -37,6 +37,15 @@ int main(int argc, char const *argv[]) {
|
||||
int num_zeroes=0;
|
||||
while(table_it != tables.end()) {
|
||||
if(agn::is_zero(*table_it)) {
|
||||
std::string linetype = table_it->header[0].substr(0,4);
|
||||
if (linetype == "nFnu" ||
|
||||
linetype == "nInu" ||
|
||||
linetype == "InwT" ||
|
||||
linetype == "InwC") {
|
||||
table_it++;
|
||||
continue;
|
||||
}
|
||||
|
||||
zeroreport << " "
|
||||
<< table_it->header[0]
|
||||
<< std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user