Read scalar from the vtk file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(out), | dimension(index:imx-index,index:jmx-index,index:kmx-index) | :: | var | ||
character(len=*), | intent(in) | :: | name | |||
integer, | intent(in) | :: | index |
subroutine read_scalar(var, name, index)
!< Read scalar from the vtk file
implicit none
integer, intent(in) :: index
real(wp), dimension(index:imx-index,index:jmx-index,index:kmx-index), intent(out) :: var
character(len=*), intent(in) :: name
DebugCall('read_output_vtk'//trim(name))
read(IN_FILE_UNIT, *) !'SCALARS '//trim(name)//' FLOAT'
read(IN_FILE_UNIT, *) !'LOOKUP_TABLE default'
do k = 1, kmx - 1
do j = 1, jmx - 1
do i = 1, imx - 1
read(IN_FILE_UNIT, *) var(i, j, k)
end do
end do
end do
read(IN_FILE_UNIT, *)
end subroutine read_scalar