Setup the file type based on the input
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(controltype), | intent(in) | :: | control |
subroutine setup_file(control)
!< Setup the file type based on the input
implicit none
type(controltype), intent(in) :: control
DebugCall('write_output_vtk: setup_file')
if (control%write_file_format == "vtk") then
file_format = ".vtk"
elseif (control%write_file_format == "tecplot" .or. control%write_file_format == "tecplot_nodal") then
file_format = ".dat"
else
print*, "File format not recoganised. Accepted formats are"
print*, "'vtk', 'tecplot' and 'tecplot_nodal' "
end if
if (control%write_data_format == "ASCII") then
data_format = "formatted"
elseif (control%write_data_format == "BINARY") then
data_format = "unformatted"
else
print*, "Data format not recoganised. Accepted formats are"
print*, "'ASCII' and 'BINARY' "
end if
end subroutine setup_file