function write_fielddata1_rank0(self, data_name, x) result(error)
!< Write `<DataArray... NumberOfTuples="..."...>...</DataArray>` tag (R8P).
class(xml_writer_abstract), intent(inout) :: self !< Writer.
character(*), intent(in) :: data_name !< Data name.
class(*), intent(in) :: x !< Data variable.
integer(I4P) :: error !< Error status.
select type(x)
type is(real(R8P))
self%error = self%write_dataarray(data_name=data_name, x=[x], is_tuples=.true.)
type is(real(R4P))
self%error = self%write_dataarray(data_name=data_name, x=[x], is_tuples=.true.)
type is(integer(I8P))
self%error = self%write_dataarray(data_name=data_name, x=[x], is_tuples=.true.)
type is(integer(I4P))
self%error = self%write_dataarray(data_name=data_name, x=[x], is_tuples=.true.)
type is(integer(I2P))
self%error = self%write_dataarray(data_name=data_name, x=[x], is_tuples=.true.)
type is(integer(I1P))
self%error = self%write_dataarray(data_name=data_name, x=[x], is_tuples=.true.)
endselect
error = self%error
endfunction write_fielddata1_rank0