Routine to print out a description, the thickness and summed build of a component of the radial or vertical build author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier descr : input character string : Description of the component thick : input real : Thickness of the component (m) total : input real : Total build, including this component (m) This routine writes out a description, the thickness and summed build of a component of the radial or vertical build. !
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file | |||
character(len=*), | intent(in) | :: | descr | |||
real(kind=8), | intent(in) | :: | thick | |||
real(kind=8), | intent(in) | :: | total | |||
character(len=*), | optional | :: | variable_name |
subroutine obuild(file,descr,thick,total,variable_name)
!! Routine to print out a description, the thickness and
!! summed build of a component of the radial or vertical build
!! author: P J Knight, CCFE, Culham Science Centre
!! file : input integer : Fortran output unit identifier
!! descr : input character string : Description of the component
!! thick : input real : Thickness of the component (m)
!! total : input real : Total build, including this component (m)
!! This routine writes out a description, the thickness and
!! summed build of a component of the radial or vertical build.
!! !
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
use numerics, only: boundl, boundu
use constants, only: electron_charge
use maths_library, only: variable_error
implicit none
! Arguments
integer, intent(in) :: file
character(len=*), intent(in) :: descr
character(len=*), optional :: variable_name
real(8), intent(in) :: thick, total
! Local variables
character(len=50) :: dum30
character(len=40) :: dum20
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Replace descr with dummy string of the correct length.
! This counters problems that would occur if the original string
! was the wrong length.
dum30 = descr
if (present(variable_name)) then
dum20 = variable_name
else
dum20 = ''
end if
write(file,10) dum30, thick, total, dum20
10 format(1x,a,t42,f10.3,t58,f10.3,t71,a)
end subroutine obuild