| Path: | dcstringputline.f90 | 
| Last Update: | Thu Aug 23 00:31:43 JST 2007 | 
| Subroutine : | |
| array(:) : | real(DP), intent(in) | 
| lbounds(1) : | integer, intent(in), optional | 
| ubounds(1) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineDouble1( array, lbounds, ubounds, unit, indent )
                                        
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real(DP), intent(in):: array(:)
  integer, intent(in), optional:: lbounds(1)
  integer, intent(in), optional:: ubounds(1)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(1), ubound_nums(1)
  character(STRING):: size_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = array
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r @variance=%r>', d = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineDouble1
          | Subroutine : | |
| array(:,:) : | real(DP), intent(in) | 
| lbounds(2) : | integer, intent(in), optional | 
| ubounds(2) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineDouble2( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real(DP), intent(in):: array(:,:)
  integer, intent(in), optional:: lbounds(2)
  integer, intent(in), optional:: ubounds(2)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(2), ubound_nums(2)
  character(STRING):: size_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r @variance=%r>', d = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineDouble2
          | Subroutine : | |
| array(:,:,:) : | real(DP), intent(in) | 
| lbounds(3) : | integer, intent(in), optional | 
| ubounds(3) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineDouble3( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real(DP), intent(in):: array(:,:,:)
  integer, intent(in), optional:: lbounds(3)
  integer, intent(in), optional:: ubounds(3)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(3), ubound_nums(3)
  character(STRING):: size_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r @variance=%r>', d = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineDouble3
          | Subroutine : | |
| array(:,:,:,:) : | real(DP), intent(in) | 
| lbounds(4) : | integer, intent(in), optional | 
| ubounds(4) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineDouble4( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real(DP), intent(in):: array(:,:,:,:)
  integer, intent(in), optional:: lbounds(4)
  integer, intent(in), optional:: ubounds(4)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(4), ubound_nums(4)
  character(STRING):: size_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r @variance=%r>', d = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineDouble4
          | Subroutine : | |
| array(:,:,:,:,:) : | real(DP), intent(in) | 
| lbounds(5) : | integer, intent(in), optional | 
| ubounds(5) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineDouble5( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real(DP), intent(in):: array(:,:,:,:,:)
  integer, intent(in), optional:: lbounds(5)
  integer, intent(in), optional:: ubounds(5)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(5), ubound_nums(5)
  character(STRING):: size_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r @variance=%r>', d = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineDouble5
          | Subroutine : | |
| array(:,:,:,:,:,:) : | real(DP), intent(in) | 
| lbounds(6) : | integer, intent(in), optional | 
| ubounds(6) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineDouble6( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real(DP), intent(in):: array(:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(6)
  integer, intent(in), optional:: ubounds(6)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(6), ubound_nums(6)
  character(STRING):: size_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )
                    
    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r @variance=%r>', d = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineDouble6
          | Subroutine : | |
| array(:,:,:,:,:,:,:) : | real(DP), intent(in) | 
| lbounds(7) : | integer, intent(in), optional | 
| ubounds(7) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineDouble7( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real(DP), intent(in):: array(:,:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(7)
  integer, intent(in), optional:: ubounds(7)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(7), ubound_nums(7)
  character(STRING):: size_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )
                    
    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )
                    
    lbound_nums(7) = lbound( array, 7 )
    ubound_nums(7) = ubound( array, 7 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(7)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(7)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r @variance=%r>', d = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineDouble7
          | Subroutine : | |
| array(:) : | integer, intent(in) | 
| lbounds(1) : | integer, intent(in), optional | 
| ubounds(1) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
数値型配列の要約を以下のように印字します. avg は平均値, variance は分散です.
Summary of numarical array is printed as follows.
#<INT-ARRAY:: @size=(1:3), @max=3, @min=1, @avg=2. @variance=0.666666687> #<SP-ARRAY:: @size=(1:1), @max=0., @min=0., @avg=0. @variance=0.> #<DP-ARRAY:: @size=(1:3,1:3,1:3), @max=20., @min=7., @avg=13.5 @variance=10.833333>
array には整数, 単精度実数, 倍精度実数の配列 (1 〜 7) を 与えます. 配列添字の下限と上限を表示したい場合には, 以下のように lbounds と ubounds を指定します. これらを指定しない場合には, 表示される配列添字は 1:<配列サイズ> となります.
Integer, single precision, and double precision array (1 — 7) is given to array. In order to print the upper bound and the lower bound for subscript of array, specify lbounds and ubounds as follows. Otherwise, 1:<size of array> is printed as subscript of array.
  program putline_test
    use dc_string, only: PutLine
    real:: rarray(-2:2, -3:3)
    rarray(-2:0, -3:0) = -1.0
    rarray(-2:0, 1:3) = -2.0
    rarray(1:2, -3:0) = 1.0
    rarray(1:2, 1:3) = 2.0
    call PutLine ( rarray, &
      & lbounds = lbound(rarray), ubounds = ubound(rarray) )
  end program putline_test
unit には印字する装置番号を指定します. デフォルトは標準出力です. indent には字下げのための空白を与えます.
Unit number for print is specified to unit. Default is standard output. Blank for indent is specified to indent.
subroutine PutLineInt1( array, lbounds, ubounds, unit, indent )
                                          !
  ! 数値型配列の要約を以下のように印字します. 
  ! avg は平均値, variance は分散です. 
  !
  ! Summary of numarical array is printed as follows.
  !
  !   #<INT-ARRAY:: @size=(1:3), @max=3, @min=1, @avg=2. @variance=0.666666687>
  !   #<SP-ARRAY:: @size=(1:1), @max=0., @min=0., @avg=0. @variance=0.>
  !   #<DP-ARRAY:: @size=(1:3,1:3,1:3), @max=20., @min=7., @avg=13.5 @variance=10.833333>
  !
  ! *array* には整数, 単精度実数, 倍精度実数の配列 (1 〜 7) を
  ! 与えます. 配列添字の下限と上限を表示したい場合には, 
  ! 以下のように *lbounds* と *ubounds* を指定します. 
  ! これらを指定しない場合には, 
  ! 表示される配列添字は 1:<配列サイズ> となります.
  ! 
  ! Integer, single precision, and double precision array 
  ! (1 -- 7) is given to *array*. 
  ! In order to print the upper bound and the lower bound 
  ! for subscript of array, 
  ! specify *lbounds* and *ubounds* as follows. 
  ! Otherwise, 1:<size of array> is printed as subscript of array.
  ! 
  !   program putline_test
  !     use dc_string, only: PutLine
  !     real:: rarray(-2:2, -3:3)
  !   
  !     rarray(-2:0, -3:0) = -1.0
  !     rarray(-2:0, 1:3) = -2.0
  !     rarray(1:2, -3:0) = 1.0
  !     rarray(1:2, 1:3) = 2.0
  !     call PutLine ( rarray, & 
  !       & lbounds = lbound(rarray), ubounds = ubound(rarray) )
  !   end program putline_test
  !
  ! *unit* には印字する装置番号を指定します. デフォルトは標準出力です.
  ! *indent* には字下げのための空白を与えます.
  !
  ! Unit number for print is specified to *unit*. Default is standard output.
  ! Blank for indent is specified to *indent*.
  !
                    
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  integer, intent(in):: array(:)
  integer, intent(in), optional:: lbounds(1)
  integer, intent(in), optional:: ubounds(1)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(1), ubound_nums(1)
  character(STRING):: size_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = array
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r @variance=%r>', i = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineInt1
          | Subroutine : | |
| array(:,:) : | integer, intent(in) | 
| lbounds(2) : | integer, intent(in), optional | 
| ubounds(2) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineInt2( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  integer, intent(in):: array(:,:)
  integer, intent(in), optional:: lbounds(2)
  integer, intent(in), optional:: ubounds(2)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(2), ubound_nums(2)
  character(STRING):: size_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r @variance=%r>', i = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineInt2
          | Subroutine : | |
| array(:,:,:) : | integer, intent(in) | 
| lbounds(3) : | integer, intent(in), optional | 
| ubounds(3) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineInt3( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  integer, intent(in):: array(:,:,:)
  integer, intent(in), optional:: lbounds(3)
  integer, intent(in), optional:: ubounds(3)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(3), ubound_nums(3)
  character(STRING):: size_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r @variance=%r>', i = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineInt3
          | Subroutine : | |
| array(:,:,:,:) : | integer, intent(in) | 
| lbounds(4) : | integer, intent(in), optional | 
| ubounds(4) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineInt4( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  integer, intent(in):: array(:,:,:,:)
  integer, intent(in), optional:: lbounds(4)
  integer, intent(in), optional:: ubounds(4)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(4), ubound_nums(4)
  character(STRING):: size_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r @variance=%r>', i = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineInt4
          | Subroutine : | |
| array(:,:,:,:,:) : | integer, intent(in) | 
| lbounds(5) : | integer, intent(in), optional | 
| ubounds(5) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineInt5( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  integer, intent(in):: array(:,:,:,:,:)
  integer, intent(in), optional:: lbounds(5)
  integer, intent(in), optional:: ubounds(5)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(5), ubound_nums(5)
  character(STRING):: size_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r @variance=%r>', i = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineInt5
          | Subroutine : | |
| array(:,:,:,:,:,:) : | integer, intent(in) | 
| lbounds(6) : | integer, intent(in), optional | 
| ubounds(6) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineInt6( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  integer, intent(in):: array(:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(6)
  integer, intent(in), optional:: ubounds(6)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(6), ubound_nums(6)
  character(STRING):: size_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )
                    
    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r @variance=%r>', i = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineInt6
          | Subroutine : | |
| array(:,:,:,:,:,:,:) : | integer, intent(in) | 
| lbounds(7) : | integer, intent(in), optional | 
| ubounds(7) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineInt7( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  integer, intent(in):: array(:,:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(7)
  integer, intent(in), optional:: ubounds(7)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(7), ubound_nums(7)
  character(STRING):: size_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )
                    
    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )
                    
    lbound_nums(7) = lbound( array, 7 )
    ubound_nums(7) = ubound( array, 7 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(7)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(7)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r @variance=%r>', i = (/max_value, min_value/), r = (/avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineInt7
          | Subroutine : | |
| array(:) : | real, intent(in) | 
| lbounds(1) : | integer, intent(in), optional | 
| ubounds(1) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineReal1( array, lbounds, ubounds, unit, indent )
                                        
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real, intent(in):: array(:)
  integer, intent(in), optional:: lbounds(1)
  integer, intent(in), optional:: ubounds(1)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(1), ubound_nums(1)
  character(STRING):: size_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = array
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r @variance=%r>', r = (/max_value, min_value, avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineReal1
          | Subroutine : | |
| array(:,:) : | real, intent(in) | 
| lbounds(2) : | integer, intent(in), optional | 
| ubounds(2) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineReal2( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real, intent(in):: array(:,:)
  integer, intent(in), optional:: lbounds(2)
  integer, intent(in), optional:: ubounds(2)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(2), ubound_nums(2)
  character(STRING):: size_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r @variance=%r>', r = (/max_value, min_value, avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineReal2
          | Subroutine : | |
| array(:,:,:) : | real, intent(in) | 
| lbounds(3) : | integer, intent(in), optional | 
| ubounds(3) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineReal3( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real, intent(in):: array(:,:,:)
  integer, intent(in), optional:: lbounds(3)
  integer, intent(in), optional:: ubounds(3)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(3), ubound_nums(3)
  character(STRING):: size_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r @variance=%r>', r = (/max_value, min_value, avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineReal3
          | Subroutine : | |
| array(:,:,:,:) : | real, intent(in) | 
| lbounds(4) : | integer, intent(in), optional | 
| ubounds(4) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineReal4( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real, intent(in):: array(:,:,:,:)
  integer, intent(in), optional:: lbounds(4)
  integer, intent(in), optional:: ubounds(4)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(4), ubound_nums(4)
  character(STRING):: size_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r @variance=%r>', r = (/max_value, min_value, avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineReal4
          | Subroutine : | |
| array(:,:,:,:,:) : | real, intent(in) | 
| lbounds(5) : | integer, intent(in), optional | 
| ubounds(5) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineReal5( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real, intent(in):: array(:,:,:,:,:)
  integer, intent(in), optional:: lbounds(5)
  integer, intent(in), optional:: ubounds(5)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(5), ubound_nums(5)
  character(STRING):: size_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r @variance=%r>', r = (/max_value, min_value, avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineReal5
          | Subroutine : | |
| array(:,:,:,:,:,:) : | real, intent(in) | 
| lbounds(6) : | integer, intent(in), optional | 
| ubounds(6) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineReal6( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real, intent(in):: array(:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(6)
  integer, intent(in), optional:: ubounds(6)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(6), ubound_nums(6)
  character(STRING):: size_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )
                    
    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r @variance=%r>', r = (/max_value, min_value, avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineReal6
          | Subroutine : | |
| array(:,:,:,:,:,:,:) : | real, intent(in) | 
| lbounds(7) : | integer, intent(in), optional | 
| ubounds(7) : | integer, intent(in), optional | 
| unit : | integer, intent(in), optional | 
| indent : | character(*), intent(in), optional | 
subroutine PutLineReal7( array, lbounds, ubounds, unit, indent )
                    
  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf
  implicit none
  real, intent(in):: array(:,:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(7)
  integer, intent(in), optional:: ubounds(7)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(7), ubound_nums(7)
  character(STRING):: size_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value
continue
  !-----------------------------------------------------------------
  !  オプショナル引数のチェック
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if
  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if
  !-------------------------------------------------------------------
  !  配列サイズ
  !  Array size
  !-------------------------------------------------------------------
  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )
                    
    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )
                    
    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )
                    
    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )
                    
    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )
                    
    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )
                    
    lbound_nums(7) = lbound( array, 7 )
    ubound_nums(7) = ubound( array, 7 )
                    
  end if
  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))
                    
  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(7)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(7)))
                    
  size_str = trim(size_str) // ')'
  !-------------------------------------------------------------------
  !  最大値
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)
  !-------------------------------------------------------------------
  !  最小値
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)
  !-------------------------------------------------------------------
  !  平均値
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)
  !-------------------------------------------------------------------
  !  分散値
  !  Variance value
  !-------------------------------------------------------------------
  variance_value = 0.0
  if ( alldim_size > 1 ) then
    if (allocated(array_packed)) then
      deallocate(array_packed)
    end if
    allocate( array_packed(alldim_size) )
                        array_packed = pack(array, .true.)
                    
    do i = 1, alldim_size
      variance_value = variance_value + (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
    end do
    variance_value = variance_value / real(alldim_size)
  end if
  !-------------------------------------------------------------------
  !  印字
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, indent_str(1:indent_len) // '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r @variance=%r>', r = (/max_value, min_value, avg_value, variance_value/), c1=trim(size_str) )
end subroutine PutLineReal7