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. !
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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | 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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | 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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | i |
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.
!
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file | |||
character(len=*), | intent(in) | :: | string | |||
integer, | intent(in) | :: | 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. !
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file | |||
integer, | intent(in) | :: | width |
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. !
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file | |||
character(len=*), | intent(in) | :: | 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. !
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file | |||
character(len=*), | intent(in) | :: | string |
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. !
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file |
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. !
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file | |||
character(len=*), | intent(in) | :: | 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. !
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file | |||
character(len=*), | intent(in) | :: | string |
Write a string to file. file : input integer : Fortran output unit identifier string : input character string : Character string to be used
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file | |||
character(len=*), | intent(in) | :: | string |
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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file | |||
character(len=70), | intent(in) | :: | desc | |||
real(kind=8), | intent(in) | :: | val1 | |||
real(kind=8), | intent(in) | :: | val2 |
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
).
!
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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
).
!
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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. !
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file | |||
character(len=*), | intent(in) | :: | descr | |||
character(len=*), | intent(in) | :: | varnam | |||
character(len=*), | intent(in) | :: | 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. !
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file | |||
character(len=*), | intent(in) | :: | ccode | |||
character(len=*), | intent(in) | :: | descr | |||
real(kind=8), | intent(in) | :: | value |
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 |
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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | string |