write_scalar Subroutine

private subroutine write_scalar(var, name, index)

Write 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~~CallsGraph proc~write_scalar write_scalar debugcall debugcall proc~write_scalar->debugcall

Called by

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

Contents

Source Code


Source Code

    subroutine write_scalar(var, name, index)
      !< Write 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, format) (((0.25*(var(i, j, k) + var(i-1,j,k)&
                                          + var(i, j-1, k) + var(i-1,j-1,k))&
                                          ,i=1,imx), j=1,jmx), k=1,kmx-1)

    end subroutine write_scalar