From 18c1126d28754ec69f2ab788c5801b45f5c41ead Mon Sep 17 00:00:00 2001 From: Michele Guerini Rocco Date: Sat, 18 Dec 2021 21:34:15 +0100 Subject: [PATCH] src/gray_params.f90: improve print_parameters - add all missing parameters (not *data*) - use shorter formatting --- src/gray_params.f90 | 62 +++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/src/gray_params.f90 b/src/gray_params.f90 index 18803b3..140b85f 100644 --- a/src/gray_params.f90 +++ b/src/gray_params.f90 @@ -152,20 +152,23 @@ contains if (params%equilibrium%iequil > 0) then write(strout(3), '("# EQL input: ",a)') trim(params%equilibrium%filenm) ! TODO add missing values - write(strout(7), '("# EQL B0 R0 aminor Rax zax:",5(1x,e12.5))') & + write(strout(7), '("# EQL B0 R0 aminor Rax zax:",5(1x,g0.5))') & 0._wp_, 0._wp_, 0._wp_, 0._wp_, 0._wp_ else write(strout(3), '("# EQL input: N/A (vacuum)")') write(strout(7), '("# EQL B0 R0 aminor Rax zax: N/A (vacuum)")') end if - write(strout(4), '("# EQL iequil sgnb sgni factb:",3(1x,i4),1x,e12.5)') & - params%equilibrium%iequil, params%equilibrium%sgnb, params%equilibrium%sgni, params%equilibrium%factb + write(strout(4), '("# EQL iequil sgnb sgni factb:",3(1x,g0),1x,g0.3)') & + params%equilibrium%iequil, params%equilibrium%sgnb, & + params%equilibrium%sgni, params%equilibrium%factb if (params%equilibrium%iequil > 1) then - write(strout(5), '("# EQL icocos ipsinorm idesc ifreefmt:",4(1x,i4))') & - params%equilibrium%icocos, params%equilibrium%ipsinorm, params%equilibrium%idesc, params%equilibrium%ifreefmt - write(strout(6), '("# EQL ssplps ssplf ixp:",2(1x,e12.5),1x,i4)') & - params%equilibrium%ssplps, params%equilibrium%ssplf, params%equilibrium%ixp + write(strout(5), '("# EQL icocos ipsinorm idesc ifreefmt:",4(1x,g0))') & + params%equilibrium%icocos, params%equilibrium%ipsinorm, & + params%equilibrium%idesc, params%equilibrium%ifreefmt + write(strout(6), '("# EQL ssplps ssplf ixp:",2(1x,g8.3e1),1x,g0)') & + params%equilibrium%ssplps, params%equilibrium%ssplf, & + params%equilibrium%ixp else write(strout(5), '("# EQL icocos ipsinorm idesc ifreefmt: N/A (analytical)")') write(strout(6), '("# EQL ssplps ssplf ixp: N/A (analytical)")') @@ -174,16 +177,17 @@ contains ! Profiles parameters if (params%equilibrium%iequil > 0) then write(strout(8), '("# PRF input: ",a)') trim(params%profiles%filenm) - write(strout(9), '("# PRF iprof iscal factne factte:",2(1x,i4),2(1x,e12.5))') & - params%profiles%iprof, params%profiles%iscal, params%profiles%factne, params%profiles%factte + write(strout(9), '("# PRF iprof iscal factne factte:",4(1x,g0.4))') & + params%profiles%iprof, params%profiles%iscal, & + params%profiles%factne, params%profiles%factte if (params%profiles%iprof > 0) then - write(strout(10), '("# PRF irho psnbnd sspld:",1x,i4,2(1x,e12.5))') & - params%profiles%irho,params%profiles%psnbnd,params%profiles%sspld + write(strout(10), '("# PRF irho psnbnd sspld:",3(1x,g0.3))') & + params%profiles%irho, params%profiles%psnbnd, params%profiles%sspld else write(strout(10), '("# PRF irho psnbnd sspld: N/A (analytical)")') end if ! TODO: add missing values - write(strout(11), '("# PRF Te0 ne0 Zeff0:",3(1x,e12.5))') & + write(strout(11), '("# PRF Te0 ne0 Zeff0:",3(1x,g0.4))') & 0._wp_, 0._wp_, 0._wp_ else write(strout(8), '("# PRF input: N/A (vacuum)")') @@ -194,29 +198,33 @@ contains ! Antenna parameters write(strout(12), '("# ANT input: ",a)') trim(params%antenna%filenm) - write(strout(13), '("# ANT ibeam iox psi chi:",2(1x,i4),2(1x,e12.5))') & - params%antenna%ibeam, params%antenna%iox, params%antenna%psi, params%antenna%chi - write(strout(14), '("# ANT alpha beta power:",3(1x,e12.5))') & - params%antenna%alpha, params%antenna%beta, params%antenna%power - ! TODO: add missing values - write(strout(15), '("# ANT x0 y0 z0:",3(1x,e12.5))') & - 0._wp_, 0._wp_, 0._wp_ - ! TODO: add missing values - write(strout(16), '("# ANT wx wy Rcix Rciy psiw psir:",6(1x,e12.5))') & - 0._wp_, 0._wp_, 0._wp_, 0._wp_, 0._wp_, 0._wp_ + write(strout(13), '("# ANT ibeam iox psi chi:",4(1x,g0.4))') & + params%antenna%ibeam, params%antenna%iox, & + params%antenna%psi, params%antenna%chi + write(strout(14), '("# ANT alpha beta power:",3(1x,g0.3))') & + params%antenna%alpha, params%antenna%beta, & + params%antenna%power + write(strout(15), '("# ANT x0 y0 z0:",3(1x,g0.3))') params%antenna%pos + write(strout(16), '("# ANT wx wy Rcix Rciy psiw psir:",6(1x,g15.5e1))') & + params%antenna%w, params%antenna%ri, params%antenna%phi ! Other parameters write(strout(17), '("# RFL rwall:",1x,e12.5)') params%misc%rwall ! code parameters write(strout(18), '("# COD igrad idst ipass ipol:",4(1x,i4))') & - params%raytracing%igrad, params%raytracing%idst, params%raytracing%ipass, params%raytracing%ipol - write(strout(19), '("# COD nrayr nrayth nstep rwmax dst:",3(1x,i4),2(1x,e12.5))') & - params%raytracing%nrayr, params%raytracing%nrayth, params%raytracing%nstep, params%raytracing%rwmax, params%raytracing%dst + params%raytracing%igrad, params%raytracing%idst, & + params%raytracing%ipass, params%raytracing%ipol + write(strout(19), '("# COD nrayr nrayth nstep rwmax dst:",5(1x,g0.4))') & + params%raytracing%nrayr, params%raytracing%nrayth, & + params%raytracing%nstep, params%raytracing%rwmax, & + params%raytracing%dst write(strout(20), '("# COD iwarm ilarm imx ieccd:",4(1x,i4))') & - params%ecrh_cd%iwarm, params%ecrh_cd%ilarm, params%ecrh_cd%imx, params%ecrh_cd%ieccd + params%ecrh_cd%iwarm, params%ecrh_cd%ilarm, & + params%ecrh_cd%imx, params%ecrh_cd%ieccd write(strout(21), '("# COD ipec nrho istpr istpl:",4(1x,i4))') & - params%output%ipec, params%output%nrho, params%output%istpr, params%output%istpl + params%output%ipec, params%output%nrho, & + params%output%istpr, params%output%istpl end subroutine print_parameters