diff --git a/sources/io.F90 b/sources/io.F90 index ed41564..1dec66a 100644 --- a/sources/io.F90 +++ b/sources/io.F90 @@ -2896,47 +2896,54 @@ module io ! ! Arguments: ! -! lun - the file handler to write to; -! aname - the file attribute name; -! bytes - the file size in bytes; -! digest - the digest of the file content; -! filename - the file name; +! lun - the file handler to write to; +! aname - the file attribute name; +! filename - the file name; +! data_bytes - the file size in bytes; +! data_digest - the digest of the file content; +! compressed_bytes - the size of the compressed data in bytes; +! compressed_digest - the digest of the compressed data; ! !=============================================================================== ! - subroutine write_attribute_xml_file(lun, aname, filename, bytes, digest) + subroutine write_attribute_xml_file(lun, aname, filename, & + data_bytes, data_digest, & + compressed_bytes, compressed_digest) implicit none ! input and output arguments ! - integer , intent(in) :: lun - character(len=*), intent(in) :: aname, filename - integer(kind=8) , intent(in) :: bytes, digest + integer , intent(in) :: lun + character(len=*) , intent(in) :: aname, filename + integer(kind=8) , intent(in) :: data_bytes, data_digest + integer(kind=8) , optional, intent(in) :: compressed_bytes, compressed_digest ! local variables ! - character(len=32) :: digest_string, bytes_string - -! local parameters -! - character(len=*), parameter :: afmt = "('',a,'')" + character(len=32) :: digest_string, bytes_string + character(len=1024) :: string ! !------------------------------------------------------------------------------- ! - write(bytes_string,"(1i22)") bytes - write(digest_string,"(1z0.16)") digest - write(lun,afmt) "string", trim(adjustl(aname)), & - trim(adjustl(bytes_string)), & - "xxh64", & - trim(adjustl(digest_string)), & - trim(adjustl(filename)) + string = '' // trim(adjustl(filename)) // '' + write(lun,'(a)') trim(adjustl(string)) !------------------------------------------------------------------------------- !