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
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
|
||||
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)
|
||||
end if
|
||||
|
||||
@ -543,7 +547,7 @@ contains
|
||||
|
||||
! print final results for pass on screen
|
||||
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')
|
||||
|
||||
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.
|
||||
use equilibrium, only : read_equil_an, read_eqdsk, change_cocos, &
|
||||
set_equil_an, set_equil_spline, eq_scal
|
||||
use logger, only : log_debug
|
||||
|
||||
implicit none
|
||||
|
||||
@ -203,6 +204,8 @@ contains
|
||||
|
||||
if (params%equilibrium%iequil < 2) then
|
||||
! Analytical equilibrium
|
||||
call log_debug('loading analytical file', &
|
||||
mod='main', proc='init_equilibrium')
|
||||
call read_equil_an(params%equilibrium%filenm, &
|
||||
params%raytracing%ipass, &
|
||||
data%equilibrium)
|
||||
@ -213,6 +216,8 @@ contains
|
||||
* data%equilibrium%fpol(1))
|
||||
else
|
||||
! Numerical equilibrium
|
||||
call log_debug('loading G-EQDK file', &
|
||||
mod='main', proc='init_equilibrium')
|
||||
call read_eqdsk(params%equilibrium, data%equilibrium)
|
||||
call change_cocos(data%equilibrium, params%equilibrium%icocos, 3)
|
||||
end if
|
||||
@ -224,7 +229,9 @@ contains
|
||||
if (params%equilibrium%iequil < 2) then
|
||||
call set_equil_an(data%equilibrium)
|
||||
else
|
||||
call log_debug('computing splines...', mod='main', proc='init_equilibrium')
|
||||
call set_equil_spline(params%equilibrium, data%equilibrium)
|
||||
call log_debug('splines computed', mod='main', proc='init_equilibrium')
|
||||
end if
|
||||
end subroutine init_equilibrium
|
||||
|
||||
@ -261,6 +268,8 @@ contains
|
||||
use coreprofiles, only : read_profiles_an, read_profiles, &
|
||||
scale_profiles, set_profiles_an, &
|
||||
set_profiles_spline
|
||||
use logger, only : log_debug
|
||||
|
||||
implicit none
|
||||
|
||||
! subroutine arguments
|
||||
@ -271,9 +280,13 @@ contains
|
||||
|
||||
if (params%iprof == 0) then
|
||||
! Analytical profiles
|
||||
call log_debug('loading analytical file', &
|
||||
mod='main', proc='init_profiles')
|
||||
call read_profiles_an(params%filenm, data)
|
||||
else
|
||||
! Numerical profiles
|
||||
call log_debug('loading numerical file', &
|
||||
mod='main', proc='init_profiles')
|
||||
call read_profiles(params%filenm, data)
|
||||
|
||||
! Convert psrad to ψ
|
||||
@ -295,7 +308,9 @@ contains
|
||||
call set_profiles_an(params, data)
|
||||
else
|
||||
! Numerical profiles
|
||||
call log_debug('computing splines...', mod='main', proc='init_profiles')
|
||||
call set_profiles_spline(params, data, launch_pos)
|
||||
call log_debug('splines computed', mod='main', proc='init_profiles')
|
||||
end if
|
||||
end subroutine init_profiles
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user