write_scalar Subroutine

private subroutine write_scalar(var, name, index)

Write the scalar variable in the output file

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(index:imx-index,index:jmx-index,index:kmx-index):: var
character(len=*), intent(in) :: name
integer, intent(in) :: index

Calls

proc~~write_scalar~2~~CallsGraph proc~write_scalar~2 write_scalar debugcall debugcall proc~write_scalar~2->debugcall

Called by

proc~~write_scalar~2~~CalledByGraph proc~write_scalar~2 write_scalar proc~write_file~2 write_file proc~write_file~2->proc~write_scalar~2

Contents

Source Code


Source Code

    subroutine write_scalar(var, name, index)
        !< Write the scalar variable in the output file
        implicit none
        integer, intent(in) :: index
        real(wp), dimension(index:imx-index,index:jmx-index,index:kmx-index), intent(in) :: var
        character(len=*),       intent(in):: name

        DebugCall("write_scalar: "//trim(name))

        write(OUT_FILE_UNIT, '(a)') 'SCALARS '//trim(name)//' FLOAT'
        write(OUT_FILE_UNIT, '(a)') 'LOOKUP_TABLE default'
        do k = 1, kmx - 1
         do j = 1, jmx - 1
          do i = 1, imx - 1
            write(OUT_FILE_UNIT, fmt='(ES25.16E4)') var(i, j, k)
          end do
         end do
        end do
        write(OUT_FILE_UNIT, *)

    end subroutine write_scalar