encode_ascii_dataarray6_rank3_R16P Function

private function encode_ascii_dataarray6_rank3_R16P(u, v, w, x, y, z) result(code)

Arguments

TypeIntentOptionalAttributesName
real(kind=R16P), intent(in) :: u(1:,1:,1:)
real(kind=R16P), intent(in) :: v(1:,1:,1:)
real(kind=R16P), intent(in) :: w(1:,1:,1:)
real(kind=R16P), intent(in) :: x(1:,1:,1:)
real(kind=R16P), intent(in) :: y(1:,1:,1:)
real(kind=R16P), intent(in) :: z(1:,1:,1:)

Return Value character(len=:),allocatable


Calls

proc~~encode_ascii_dataarray6_rank3_r16p~~CallsGraph proc~encode_ascii_dataarray6_rank3_r16p encode_ascii_dataarray6_rank3_R16P interface~str str proc~encode_ascii_dataarray6_rank3_r16p->interface~str proc~str_i8p str_I8P interface~str->proc~str_i8p proc~str_a_r8p str_a_R8P interface~str->proc~str_a_r8p proc~str_r8p str_R8P interface~str->proc~str_r8p proc~str_a_i4p str_a_I4P interface~str->proc~str_a_i4p proc~strf_i2p strf_I2P interface~str->proc~strf_i2p proc~str_r4p str_R4P interface~str->proc~str_r4p proc~str_i1p str_I1P interface~str->proc~str_i1p proc~strf_i4p strf_I4P interface~str->proc~strf_i4p proc~str_a_r4p str_a_R4P interface~str->proc~str_a_r4p proc~strf_r4p strf_R4P interface~str->proc~strf_r4p proc~str_i2p str_I2P interface~str->proc~str_i2p proc~str_a_i2p str_a_I2P interface~str->proc~str_a_i2p proc~strf_i8p strf_I8P interface~str->proc~strf_i8p proc~str_bol str_bol interface~str->proc~str_bol proc~strf_r8p strf_R8P interface~str->proc~strf_r8p proc~str_i4p str_I4P interface~str->proc~str_i4p proc~str_a_i8p str_a_I8P interface~str->proc~str_a_i8p proc~strf_i1p strf_I1P interface~str->proc~strf_i1p proc~str_a_i1p str_a_I1P interface~str->proc~str_a_i1p proc~str_a_r8p->proc~str_r8p proc~compact_real_string compact_real_string proc~str_r8p->proc~compact_real_string proc~str_a_i4p->proc~str_i4p proc~str_r4p->proc~compact_real_string proc~str_a_r4p->proc~str_r4p proc~str_a_i2p->proc~str_i2p proc~str_a_i8p->proc~str_i8p proc~str_a_i1p->proc~str_i1p

Contents


Source Code

  function encode_ascii_dataarray6_rank3_R16P(u, v, w, x, y, z) result(code)
  !< Encode (Base64) a dataarray with 6 components of rank 3 (R8P).
  real(R16P),      intent(in)   :: u(1:,1:,1:) !< U component.
  real(R16P),      intent(in)   :: v(1:,1:,1:) !< V component.
  real(R16P),      intent(in)   :: w(1:,1:,1:) !< W component.
  real(R16P),      intent(in)   :: x(1:,1:,1:) !< X component.
  real(R16P),      intent(in)   :: y(1:,1:,1:) !< Y component.
  real(R16P),      intent(in)   :: z(1:,1:,1:) !< Z component.
  character(len=:), allocatable :: code        !< Encoded base64 dataarray.
  integer(I4P)                  :: n1          !< Counter.
  integer(I4P)                  :: n2          !< Counter.
  integer(I4P)                  :: n3          !< Counter.
  integer(I4P)                  :: l           !< Length
  integer(I4P)                  :: sp          !< String pointer
  integer(I4P)                  :: size_n1     !< Dimension 1 size
  integer(I4P)                  :: size_n2     !< Dimension 2 size
  integer(I4P)                  :: size_n3     !< Dimension 3 size

  size_n1 = size(x, dim=1)
  size_n2 = size(x, dim=2)
  size_n3 = size(x, dim=3)
  
  l = DR16P*6 + 5
  sp = 0
  code = repeat(' ',l*size_n1*size_n2*size_n3)
  do n3=1, size_n3
    do n2=1, size_n2
      do n1=1, size_n1
        code(sp+1:sp+l) = str(n=u(n1, n2, n3))//' '//str(n=v(n1, n2, n3))//' '//str(n=w(n1, n2, n3))// &
          str(n=x(n1, n2, n3))//' '//str(n=y(n1, n2, n3))//' '//str(n=z(n1, n2, n3))
        sp = sp + l
      enddo
    enddo
  enddo
  endfunction encode_ascii_dataarray6_rank3_R16P