|
The Open FUSION Toolkit 1.0.0-beta6
Modeling tools for plasma and fusion research and engineering
|
Binary output file object.
Public Member Functions | |
| procedure | add_comm (self, comment) |
| Add comment line to output file. | |
| procedure | add_field (self, fieldname, type_str, desc, fsize) |
| Add field to output file. | |
| procedure | close (self) |
| Close output file. | |
| procedure | flush (self) |
| Flush I/O buffer for Open FUSION Toolkit binary I/O file. | |
| procedure | open (self) |
| Open output file for writing. | |
| procedure | setup (self, filename, desc) |
| Create object and allocate storage. | |
| procedure | write (self, data_i4, data_i8, data_r4, data_r8) |
| Write single set of data to Open FUSION Toolkit binary I/O file. | |
| procedure | write_header (self) |
| Write header containing metadata to file. | |
Public Attributes | |
| character(len=oft_slen), dimension(:), pointer | comm_lines => NULL() |
| Comment lines. | |
| character(len=oft_slen), dimension(:), pointer | field_desc => NULL() |
| Field descriptions. | |
| character(len=oft_slen), dimension(:), pointer | field_names => NULL() |
| Field names. | |
| integer(i4), dimension(:), pointer | field_size => NULL() |
| Dimension of each field. | |
| character(len=2), dimension(:), pointer | field_type => NULL() |
| Field types. | |
| character(len=oft_slen) | filedesc = '' |
| Description string. | |
| character(len=oft_path_slen) | filename = '' |
| Output filename. | |
| logical | header_written = .FALSE. |
| Was header written during this run. | |
| integer(i4) | io_unit = 0 |
| Output unit for file. | |
| integer(i4) | nbytes = 0 |
| Number of bytes per line. | |
| integer(i4) | ncomm = 0 |
| Number of comment lines. | |
| integer(i4) | nfields = 0 |
| Number of fields. | |
| procedure add_comm | ( | class(oft_bin_file), intent(inout) | self, |
| character(len=*), intent(in) | comment | ||
| ) |
Add comment line to output file.
| [in,out] | self | File object |
| [in] | comment | Comment to add |
| procedure add_field | ( | class(oft_bin_file), intent(inout) | self, |
| character(len=*), intent(in) | fieldname, | ||
| character(len=2), intent(in) | type_str, | ||
| character(len=*), intent(in), optional | desc, | ||
| integer(i4), intent(in), optional | fsize | ||
| ) |
Add field to output file.
| [in,out] | self | File object |
| [in] | fieldname | Field name to add |
| [in] | type_str | Type of field |
| [in] | desc | Description of field |
| [in] | fsize | Size of field |
| procedure close | ( | class(oft_bin_file), intent(inout) | self | ) |
Close output file.
| procedure flush | ( | class(oft_bin_file), intent(inout) | self | ) |
Flush I/O buffer for Open FUSION Toolkit binary I/O file.
| procedure open | ( | class(oft_bin_file), intent(inout) | self | ) |
Open output file for writing.
| procedure setup | ( | class(oft_bin_file), intent(inout) | self, |
| character(len=*), intent(in) | filename, | ||
| character(len=*), intent(in), optional | desc | ||
| ) |
Create object and allocate storage.
| procedure write | ( | class(oft_bin_file), intent(inout) | self, |
| integer(i4), dimension(:), intent(in), optional | data_i4, | ||
| integer(i8), dimension(:), intent(in), optional | data_i8, | ||
| real(r4), dimension(:), intent(in), optional | data_r4, | ||
| real(r8), dimension(:), intent(in), optional | data_r8 | ||
| ) |
Write single set of data to Open FUSION Toolkit binary I/O file.
| [in,out] | self | File object |
| [in] | data_i4 | integer(i4) data |
| [in] | data_i8 | integer(i8) data |
| [in] | data_r4 | real(r4) data |
| [in] | data_r8 | real(r8) data |
| procedure write_header | ( | class(oft_bin_file), intent(inout) | self | ) |
Write header containing metadata to file.
| character(len=oft_slen), dimension(:), pointer comm_lines => NULL() |
Comment lines.
| character(len=oft_slen), dimension(:), pointer field_desc => NULL() |
Field descriptions.
| character(len=oft_slen), dimension(:), pointer field_names => NULL() |
Field names.
| integer(i4), dimension(:), pointer field_size => NULL() |
Dimension of each field.
| character(len=2), dimension(:), pointer field_type => NULL() |
Field types.
| character(len=oft_slen) filedesc = '' |
Description string.
| character(len=oft_path_slen) filename = '' |
Output filename.
| logical header_written = .FALSE. |
Was header written during this run.
| integer(i4) io_unit = 0 |
Output unit for file.
| integer(i4) nbytes = 0 |
Number of bytes per line.
| integer(i4) ncomm = 0 |
Number of comment lines.
| integer(i4) nfields = 0 |
Number of fields.