process_output Module

Module containing routines to produce a uniform output style author: P J Knight, CCFE, Culham Science Centre N/A This module contains a number of routines that allow the program to write output to a file unit in a uniform style. !



Contents


Functions

public function int2char(i)

Converts a single-digit integer into a character string author: P J Knight, CCFE, Culham Science Centre i : input integer : must be between 0 and 9 This is a very simple routine that converts a single-digit integer into a character string. If the integer is outside the range 0 to 9 the program stops with an error. None

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: i

Return Value character(len=1)

public function int_to_string2(i)

Converts a positive integer into a two-digit character string author: P J Knight, CCFE, Culham Science Centre i : input integer : must be between 0 and 99 This routine converts a positive integer into a two-digit character string. If the integer is negative, the routine stops with an error. If the integer is greater than 99, the routine returns a string containing its last two digits. None

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: i

Return Value character(len=2)

public function int_to_string3(i)

Converts a positive integer into a 3-digit character string author: P J Knight, CCFE, Culham Science Centre i : input integer : must be between 0 and 99 This routine converts a positive integer into a three-digit character string. If the integer is negative, the routine stops with an error. If the integer is greater than 999, the routine returns a string containing its last three digits. None

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: i

Return Value character(len=3)


Subroutines

public subroutine ocentr(file, string, width)

Routine to print a centred header within a line of asterisks author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier string : input character string : Character string to be used width : input integer : Total width of header This routine writes out a centred header within a line of asterisks. It cannot cope with a zero-length string; routine ostars should be used instead. !

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file
character(len=*), intent(in) :: string
integer, intent(in) :: width

public subroutine ostars(file, width)

Routine to print a line of asterisks author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier width : input integer : Total width of header This routine writes out a line of asterisks. !

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file
integer, intent(in) :: width

public subroutine oheadr(file, string)

Routine to print a centred header within a line of asterisks, and between two blank lines author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier string : input character string : Character string to be used This routine writes out a centred header within a line of asterisks, and between two blank lines. !

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file
character(len=*), intent(in) :: string

public subroutine oshead(file, string)

Routine to print a short, centred header within a line of asterisks, and between two blank lines author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier string : input character string : Character string to be used This routine writes out a short, centred header within a line of asterisks, and between two blank lines. !

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file
character(len=*), intent(in) :: string

public subroutine oblnkl(file)

Routine to print a blank line author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier This routine writes out a simple blank line. !

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file

public subroutine osubhd(file, string)

Routine to print a subheading between two blank lines author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier string : input character string : Character string to be used This routine writes out a subheading between two blank lines. !

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file
character(len=*), intent(in) :: string

public subroutine ocmmnt(file, string)

Routine to print a comment author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier string : input character string : Character string to be used This routine writes out a comment line. !

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file
character(len=*), intent(in) :: string

public subroutine write(file, string)

Write a string to file. file : input integer : Fortran output unit identifier string : input character string : Character string to be used

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file
character(len=*), intent(in) :: string

public subroutine dblcol(file, desc, val1, val2)

Write a description and 2 columns of values to 2dp in standard notation. file : input integer : Fortran output unit identifier desc : input character string : Character string to be used val1 : input real : Value of the left variable val2 : input real : Value of the right variable

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file
character(len=70), intent(in) :: desc
real(kind=8), intent(in) :: val1
real(kind=8), intent(in) :: val2

public subroutine ovarrf(file, descr, varnam, value, output_flag)

Routine to print out the details of a floating-point variable using 'F' format author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier descr : input character string : Description of the variable varnam : input character string : Name of the variable value : input real : Value of the variable output_flag : optional character This routine writes out the description, name and value of a double precision variable in F format (e.g. -12345.000). !

Arguments

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

public subroutine ovarre(file, descr, varnam, value, output_flag)

Routine to print out the details of a floating-point variable using 'E' format author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier descr : input character string : Description of the variable varnam : input character string : Name of the variable value : input real : Value of the variable output_flag : optional character This routine writes out the description, name and value of a double precision variable in E format (e.g. -1.234E+04). !

Arguments

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

public subroutine ovarin(file, descr, varnam, value, output_flag)

Routine to print out the details of an integer variable author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier descr : input character string : Description of the variable varnam : input character string : Name of the variable value : input integer : Value of the variable output_flag : optional character This routine writes out the description, name and value of an integer variable. !

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file
character(len=*), intent(in) :: descr
character(len=*), intent(in) :: varnam
integer, intent(in) :: value
character(len=3), intent(in), optional :: output_flag

public subroutine ovarst(file, descr, varnam, value)

Routine to print out the details of a character variable author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier descr : input character string : Description of the variable varnam : input character string : Name of the variable value : input character string : Value of the variable This routine writes out the description, name and value of a character string variable. None

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file
character(len=*), intent(in) :: descr
character(len=*), intent(in) :: varnam
character(len=*), intent(in) :: value

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

public 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. !

Arguments

Type IntentOptional AttributesName
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

public subroutine underscore(string)

Routine that converts spaces in a string to underscores author: P J Knight, CCFE, Culham Science Centre string : input/output string : character string of interest This routine converts any space characters in the string to underscore characters. None

Arguments

Type IntentOptional AttributesName
character(len=*), intent(inout) :: string