add some useful debug messages
This commit is contained in:
parent
cc889bb5a0
commit
1261860f40
@ -303,6 +303,8 @@ contains
|
|||||||
ext_wl = (mod(iow(jk),2) == 1 .and. .not.ins_wl) ! exit vessel
|
ext_wl = (mod(iow(jk),2) == 1 .and. .not.ins_wl) ! exit vessel
|
||||||
|
|
||||||
if(ent_pl) then ! ray enters plasma
|
if(ent_pl) then ! ray enters plasma
|
||||||
|
write (msg, '(" ray ",g0," entered plasma (",g0," steps)")') jk, i
|
||||||
|
call log_debug(msg, mod='gray_core', proc='gray_main')
|
||||||
call plasma_in(jk,xv,anv,bres,sox,cpl,psipol,chipol,iop,ext,eyt)
|
call plasma_in(jk,xv,anv,bres,sox,cpl,psipol,chipol,iop,ext,eyt)
|
||||||
|
|
||||||
if(iop(jk) == 1 .and. ip==1) then ! * 1st entrance on 1st pass (ray hasn't entered in plasma yet) => continue current pass
|
if(iop(jk) == 1 .and. ip==1) then ! * 1st entrance on 1st pass (ray hasn't entered in plasma yet) => continue current pass
|
||||||
@ -359,6 +361,8 @@ contains
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
else if(ext_pl) then ! ray exits plasma
|
else if(ext_pl) then ! ray exits plasma
|
||||||
|
write (msg, '(" ray ", g0, " left plasma")') jk
|
||||||
|
call log_debug(msg, mod='gray_core', proc='gray_main')
|
||||||
call plasma_out(jk,xv,anv,bres,sox,iop,ext,eyt)
|
call plasma_out(jk,xv,anv,bres,sox,iop,ext,eyt)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@ -543,7 +547,7 @@ contains
|
|||||||
|
|
||||||
! print final results for pass on screen
|
! print final results for pass on screen
|
||||||
call log_info(' partial results:', mod='gray_core', proc='gray_main')
|
call log_info(' partial results:', mod='gray_core', proc='gray_main')
|
||||||
write(msg, '(3x,a,g0.4)') 'final step: (s, ct, Sr)=' ,stv(1)
|
write(msg, '(" final step:", x,a,g0, x,a,g0.4)') 'n=', i, '(s, ct, Sr)=', stv(1)
|
||||||
call log_info(msg, mod='gray_core', proc='gray_main')
|
call log_info(msg, mod='gray_core', proc='gray_main')
|
||||||
|
|
||||||
write(msg, '(3x,a,2(x,a,"=",g0.4))') 'optical depth:', 'τ_min', taumn, 'τ_max', taumx
|
write(msg, '(3x,a,2(x,a,"=",g0.4))') 'optical depth:', 'τ_min', taumn, 'τ_max', taumx
|
||||||
|
15
src/main.f90
15
src/main.f90
@ -194,6 +194,7 @@ contains
|
|||||||
! GRAY parameters and data.
|
! GRAY parameters and data.
|
||||||
use equilibrium, only : read_equil_an, read_eqdsk, change_cocos, &
|
use equilibrium, only : read_equil_an, read_eqdsk, change_cocos, &
|
||||||
set_equil_an, set_equil_spline, eq_scal
|
set_equil_an, set_equil_spline, eq_scal
|
||||||
|
use logger, only : log_debug
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
@ -203,6 +204,8 @@ contains
|
|||||||
|
|
||||||
if (params%equilibrium%iequil < 2) then
|
if (params%equilibrium%iequil < 2) then
|
||||||
! Analytical equilibrium
|
! Analytical equilibrium
|
||||||
|
call log_debug('loading analytical file', &
|
||||||
|
mod='main', proc='init_equilibrium')
|
||||||
call read_equil_an(params%equilibrium%filenm, &
|
call read_equil_an(params%equilibrium%filenm, &
|
||||||
params%raytracing%ipass, &
|
params%raytracing%ipass, &
|
||||||
data%equilibrium)
|
data%equilibrium)
|
||||||
@ -213,6 +216,8 @@ contains
|
|||||||
* data%equilibrium%fpol(1))
|
* data%equilibrium%fpol(1))
|
||||||
else
|
else
|
||||||
! Numerical equilibrium
|
! Numerical equilibrium
|
||||||
|
call log_debug('loading G-EQDK file', &
|
||||||
|
mod='main', proc='init_equilibrium')
|
||||||
call read_eqdsk(params%equilibrium, data%equilibrium)
|
call read_eqdsk(params%equilibrium, data%equilibrium)
|
||||||
call change_cocos(data%equilibrium, params%equilibrium%icocos, 3)
|
call change_cocos(data%equilibrium, params%equilibrium%icocos, 3)
|
||||||
end if
|
end if
|
||||||
@ -224,7 +229,9 @@ contains
|
|||||||
if (params%equilibrium%iequil < 2) then
|
if (params%equilibrium%iequil < 2) then
|
||||||
call set_equil_an(data%equilibrium)
|
call set_equil_an(data%equilibrium)
|
||||||
else
|
else
|
||||||
|
call log_debug('computing splines...', mod='main', proc='init_equilibrium')
|
||||||
call set_equil_spline(params%equilibrium, data%equilibrium)
|
call set_equil_spline(params%equilibrium, data%equilibrium)
|
||||||
|
call log_debug('splines computed', mod='main', proc='init_equilibrium')
|
||||||
end if
|
end if
|
||||||
end subroutine init_equilibrium
|
end subroutine init_equilibrium
|
||||||
|
|
||||||
@ -261,6 +268,8 @@ contains
|
|||||||
use coreprofiles, only : read_profiles_an, read_profiles, &
|
use coreprofiles, only : read_profiles_an, read_profiles, &
|
||||||
scale_profiles, set_profiles_an, &
|
scale_profiles, set_profiles_an, &
|
||||||
set_profiles_spline
|
set_profiles_spline
|
||||||
|
use logger, only : log_debug
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
! subroutine arguments
|
! subroutine arguments
|
||||||
@ -271,9 +280,13 @@ contains
|
|||||||
|
|
||||||
if (params%iprof == 0) then
|
if (params%iprof == 0) then
|
||||||
! Analytical profiles
|
! Analytical profiles
|
||||||
|
call log_debug('loading analytical file', &
|
||||||
|
mod='main', proc='init_profiles')
|
||||||
call read_profiles_an(params%filenm, data)
|
call read_profiles_an(params%filenm, data)
|
||||||
else
|
else
|
||||||
! Numerical profiles
|
! Numerical profiles
|
||||||
|
call log_debug('loading numerical file', &
|
||||||
|
mod='main', proc='init_profiles')
|
||||||
call read_profiles(params%filenm, data)
|
call read_profiles(params%filenm, data)
|
||||||
|
|
||||||
! Convert psrad to ψ
|
! Convert psrad to ψ
|
||||||
@ -295,7 +308,9 @@ contains
|
|||||||
call set_profiles_an(params, data)
|
call set_profiles_an(params, data)
|
||||||
else
|
else
|
||||||
! Numerical profiles
|
! Numerical profiles
|
||||||
|
call log_debug('computing splines...', mod='main', proc='init_profiles')
|
||||||
call set_profiles_spline(params, data, launch_pos)
|
call set_profiles_spline(params, data, launch_pos)
|
||||||
|
call log_debug('splines computed', mod='main', proc='init_profiles')
|
||||||
end if
|
end if
|
||||||
end subroutine init_profiles
|
end subroutine init_profiles
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user