dump values

This commit is contained in:
Pierre-Francois Loos 2023-11-11 12:03:09 +01:00
parent e212bd8666
commit e67faaf935
1 changed files with 31 additions and 0 deletions

31
src/test/dump_test_value.f90 Executable file
View File

@ -0,0 +1,31 @@
subroutine dump_test_value(branch,description,value)
implicit none
! Input variables
character(len=1),intent(in) :: branch
character(len=*),intent(in) :: description
double precision,intent(in) :: value
! Local variables
! Output variables
if(branch == 'R') then
open(unit=11,file='test/Rtest.dat')
elseif(branch == 'U') then
open(unit=11,file='test/Utest.dat')
elseif(branch == 'G') then
open(unit=11,file='test/Gtest.dat')
else
write(*,*) 'Wrong branch name in dump_test_value'
end if
write(11,*) '# ',trim(description)
write(11,'(F20.15)') value
close(unit=11)
end subroutine