!--------1---------2---------3---------4---------5---------6---------7---------8
module vtu_output
!--------1---------2---------3---------4---------5---------6---------7---------8
use global_constants, only : rkind, cat
implicit none
private
public :: ivtu, ivtu_max, graph_vtu, time_vtu, radius_vtu, temp_max_vtu &
& , graph_vtu_76Myr, temp_76Myr_vtu
integer,parameter :: ivtu_max_tmp = 100000
integer :: ivtu, ivtu_max
character(len=cat),save :: fname_vtu ='sample.vtu'
character(len=cat),save :: fname_vtu_76Myr ='76myr.vtu'
real(rkind) :: time_vtu(0:ivtu_max_tmp), radius_vtu(0:ivtu_max_tmp) &
& , temp_max_vtu(0:ivtu_max_tmp), temp_76Myr_vtu(0:ivtu_max_tmp)
contains
!--------1---------2---------3---------4---------5---------6---------7---------8
subroutine graph_vtu
implicit none
integer :: i
open(12, file = fname_vtu)
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a,i0,a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
do i = 0, ivtu_max-1
write(12,'(f10.4)') temp_max_vtu(i)
enddo
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
do i = 0, ivtu_max-1
write(12,'(f11.7,f9.3,i6)') time_vtu(i), radius_vtu(i), 0
enddo
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
do i = 0, ivtu_max-1
write(12,'(i0)') i
enddo
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(i0)') ivtu_max
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(i0)') 9
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
call flush(12)
return
end subroutine graph_vtu
!--------1---------2---------3---------4---------5---------6---------7---------8
subroutine graph_vtu_76Myr
implicit none
integer :: i
open(12, file = fname_vtu_76Myr)
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a,i0,a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
do i = 0, ivtu_max-1
write(12,'(f10.4)') temp_76Myr_vtu(i)
enddo
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
do i = 0, ivtu_max-1
write(12,'(f11.7,f9.3,i6)') time_vtu(i), radius_vtu(i), 0
enddo
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
do i = 0, ivtu_max-1
write(12,'(i0)') i
enddo
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(i0)') ivtu_max
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(i0)') 9
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
write(12,'(a)') ''
call flush(12)
return
end subroutine graph_vtu_76Myr
!--------1---------2---------3---------4---------5---------6---------7---------8
end module vtu_output