Stellarator-Tools
|
Module for opening and reading a diagnostic dot file. The file format for these files are documented in Magnetic Diagnostic Dot File. More...
Data Types | |
type | diagnostic_dot_coil |
A single coil. A coil set is structured as a singly linked list. More... | |
Functions/Subroutines | |
type(diagnostic_dot_coil) function, pointer | diagnostic_dot_construct (filename) |
Construct the coil diagnostics. More... | |
subroutine | diagnostic_dot_destruct (list) |
Deconstruct a diagnostic_dot_coil list. More... | |
subroutine | diagnostic_dot_error (subject, line, line_number, caller) |
Report error. More... | |
character(len=diagnostic_dot_id_name) function | diagnostic_dot_parse_name (iou, line, line_number, caller) |
Parse a name. More... | |
real(rprec) function | diagnostic_dot_parse_real (iou, line, line_number, caller) |
Parse a real. More... | |
real(rprec) function, dimension(3) | diagnostic_dot_parse_node (iou, line, line_number, status) |
Parse a node. More... | |
real(rprec) function, dimension(4) | diagnostic_dot_parse_node4 (iou, line, line_number, status) |
Parse a node with sensitivity. More... | |
type(diagnostic_dot_coil) function, pointer | diagnostic_dot_parse_s_rogowski (iou, line, line_number) |
Parse coils defined by filaments connected in series. More... | |
type(diagnostic_dot_coil) function, pointer | diagnostic_dot_parse_filaments (iou, line, line_number, is_rogowski, units) |
Parse coils defined by filaments. More... | |
type(diagnostic_dot_coil) function, pointer | diagnostic_dot_parse_probe (iou, line, line_number, is_tokamak, units) |
Parse a circular flux loop or magnetic probe. More... | |
type(diagnostic_dot_coil) function, pointer | diagnostic_dot_parse_point (iou, line, line_number, units, is_cart) |
Parse a point field measurement. More... | |
Variables | |
integer, parameter | diagnostic_dot_line_len = 200 |
Maximum line length. | |
integer, parameter | diagnostic_dot_id_name = 30 |
Maximum id name. | |
Module for opening and reading a diagnostic dot file. The file format for these files are documented in Magnetic Diagnostic Dot File.
type (diagnostic_dot_coil) function, pointer diagnostic_dot::diagnostic_dot_construct | ( | character (len=*), intent(in) | filename | ) |
Construct the coil diagnostics.
Allocates memory and initializes all the diagnostic coils by parseing the diagnostic dot file.
[in] | filename | File name of the diagnostic dot file. |
subroutine diagnostic_dot::diagnostic_dot_destruct | ( | type (diagnostic_dot_coil), pointer | list | ) |
Deconstruct a diagnostic_dot_coil list.
Deallocates memory and uninitializes a diagnostic_dot_coil list.
[in,out] | this | A diagnostic_dot_coil list. |
subroutine diagnostic_dot::diagnostic_dot_error | ( | character (len=*), intent(in) | subject, |
character (len=*), intent(in) | line, | ||
integer, intent(in) | line_number, | ||
character (len=*), intent(in) | caller | ||
) |
Report error.
Errors are formatted the the subject, line, line_number and calling function. This subroutine does not return so there is no need for profiling information.
[in] | subject | Description of what caused the error. |
[in] | line | The current line of the file. |
[in] | line_number | The current line number of the file. |
[in] | caller | Name of the calling function. |
type (diagnostic_dot_coil) function, pointer diagnostic_dot::diagnostic_dot_parse_filaments | ( | integer | iou, |
character (len=diagnostic_dot_line_len), intent(out) | line, | ||
integer, intent(inout) | line_number, | ||
logical, intent(in) | is_rogowski, | ||
character (len=*), intent(in) | units | ||
) |
Parse coils defined by filaments.
Parses a diagnostic flux loop. Flux loops are defined by an id and an arbitrary number of nodes. Rogowski coils are defined by an id. Next is the number of turn and area. The guild center is defined as an arbitrary number of nodes.
[in] | iou | File handle of diagnostic dot file. |
[out] | line | On exit contains the current line of the file. |
[in,out] | line_number | The current line number of the file. |
[in] | is_rogowski | Parse the filaments as a rogowski coil. |
[in] | units | Units the coil measures in. |
character (len=diagnostic_dot_id_name) function diagnostic_dot::diagnostic_dot_parse_name | ( | integer | iou, |
character (len=diagnostic_dot_line_len), intent(out) | line, | ||
integer, intent(inout) | line_number, | ||
character (len=*), intent(in) | caller | ||
) |
Parse a name.
Reads a name and from the diagnostic dot file.
[in] | iou | File handle of diagnostic dot file. |
[out] | line | On exit contains the current line of the file. |
[in,out] | line_number | The current line number of the file. |
[in] | caller | Name of the calling function. |
real (rprec) function, dimension(3) diagnostic_dot::diagnostic_dot_parse_node | ( | integer | iou, |
character (len=diagnostic_dot_line_len), intent(out) | line, | ||
integer, intent(inout) | line_number, | ||
integer, intent(out) | status | ||
) |
Parse a node.
Reads a single node and from the diagnostic dot file. Node may be arbitrary in length. Leave error handling up to the caller.
[in] | iou | File handle of diagnostic dot file. |
[out] | line | On exit contains the current line of the file. |
[in,out] | line_number | The current line number of the file. |
[out] | status | The result of the read attempt. |
real (rprec) function, dimension(4) diagnostic_dot::diagnostic_dot_parse_node4 | ( | integer | iou, |
character (len=diagnostic_dot_line_len), intent(out) | line, | ||
integer, intent(inout) | line_number, | ||
integer, intent(out) | status | ||
) |
Parse a node with sensitivity.
Reads a single node and from the diagnostic dot file. Node may be arbitrary in length. Leave error handling up to the caller. The node contains a sensisitivity value for the calibration as well.
[in] | iou | File handle of diagnostic dot file. |
[out] | line | On exit contains the current line of the file. |
[in,out] | line_number | The current line number of the file. |
[out] | status | The result of the read attempt. |
type (diagnostic_dot_coil) function, pointer diagnostic_dot::diagnostic_dot_parse_point | ( | integer | iou, |
character (len=diagnostic_dot_line_len), intent(out) | line, | ||
integer, intent(inout) | line_number, | ||
character (len=*), intent(in) | units, | ||
logical, intent(in) | is_cart | ||
) |
Parse a point field measurement.
Parses point measurement probe. Point measurements are defined as a point and direction. The direction should be normalized. The phi_offset model is easiest to use when dealing with cyclindical coordinates. Convert all points to cyclindical coordinates for internal purposes.
[in] | iou | File handle of diagnostic dot file. |
[out] | line | On exit contains the current line of the file. |
[in,out] | line_number | The current line number of the file. |
[in] | units | Units the coil measures in. |
[in] | is_cart | True is point and vector defined in cylindrical coordinates. |
type (diagnostic_dot_coil) function, pointer diagnostic_dot::diagnostic_dot_parse_probe | ( | integer | iou, |
character (len=diagnostic_dot_line_len), intent(out) | line, | ||
integer, intent(inout) | line_number, | ||
logical, intent(in) | is_tokamak, | ||
character (len=*), intent(in) | units | ||
) |
Parse a circular flux loop or magnetic probe.
Parses a diagnostic flux loop or magnetic probe. Flux loops and probes are defined by an id, the radius, the center and the normal vector. Since this has a fixed number of reads, the next line must be read before the function returns.
[in] | iou | File handle of diagnostic dot file. |
[out] | line | On exit contains the current line of the file. |
[in,out] | line_number | The current line number of the file. |
[in] | is_tokamak | Parse the probe as a tokamak coil. |
[in] | units | Units the coil measures in. |
real (rprec) function diagnostic_dot::diagnostic_dot_parse_real | ( | integer | iou, |
character (len=diagnostic_dot_line_len), intent(out) | line, | ||
integer, intent(inout) | line_number, | ||
character (len=*), intent(in) | caller | ||
) |
Parse a real.
Reads a single real and from the diagnostic dot file.
[in] | iou | File handle of diagnostic dot file. |
[out] | line | On exit contains the current line of the file. |
[in,out] | line_number | The current line number of the file. |
[in] | caller | Name of the calling function. |
type (diagnostic_dot_coil) function, pointer diagnostic_dot::diagnostic_dot_parse_s_rogowski | ( | integer | iou, |
character (len=diagnostic_dot_line_len), intent(out) | line, | ||
integer, intent(inout) | line_number | ||
) |
Parse coils defined by filaments connected in series.
Parses a diagnostic rogowski defined as a collection of partial rogowskis connected in series.
[in] | iou | File handle of diagnostic dot file. |
[out] | line | On exit contains the current line of the file. |
[in,out] | line_number | The current line number of the file. |