ocosts Subroutine

public subroutine ocosts(file, ccode, descr, value)

Routine to print out the code, description and value of a cost item author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier ccode : input character string : Code number/name of the cost item descr : input character string : Description of the cost item value : input real : Value of the cost item This routine writes out the cost code, description and value of a cost item. !

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file
character(len=*), intent(in) :: ccode
character(len=*), intent(in) :: descr
real(kind=8), intent(in) :: value

Contents

Source Code


Source Code

  subroutine ocosts(file,ccode,descr,value)

    !! Routine to print out the code, description and value
    !! of a cost item
    !! author: P J Knight, CCFE, Culham Science Centre
    !! file : input integer : Fortran output unit identifier
    !! ccode : input character string : Code number/name of the cost item
    !! descr : input character string : Description of the cost item
    !! value : input real : Value of the cost item
    !! This routine writes out the cost code, description and value
    !! of a cost item.
    !!     !
    ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

		use constants, only: pi, mfile, nplot, twopi
		use maths_library, only: variable_error
    implicit none

    !  Arguments

    integer, intent(in) :: file
    character(len=*), intent(in) :: ccode, descr
    real(8), intent(in) :: value

    !  Local variables

    character(len=30) :: dum20
    character(len=72) :: dum72

    ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    !  Replace ccode and descr with dummy strings of the correct length.
    !  This counters problems that would occur if the two original strings
    !  were the wrong length.

    dum20 = ccode
    dum72 = descr

    write(file,10) dum20, dum72, value
10  format(1x,a,t22,a,t110,f10.2)

    call ovarrf(mfile,descr,ccode,value)

  end subroutine ocosts