Natural gas — Format for data from gas chromatograph analysers for natural gas — XML file format

This document specifies a text file format - XML file format - for reporting natural gas analysis results and other data relevant to natural gas. The file name is applicable when it includes the extension of .XML (case insensitive). The XML file format is useful for output from ISO 6974-1[1] for composition and ISO 6974-2[2] for uncertainty, for input for ISO 6976[3] and for input for ISO 10723[4] for performance evaluation. Typically these would be the gas composition as provided on an analysis certificate, or results from a performance evaluation that would be read into an Excel spreadsheet for data processing.

Gaz naturel — Format pour les données des analyseurs de chromatographie en phase gazeuse pour le gaz naturel — Format de fichier XML

General Information

Status
Published
Publication Date
03-Jul-2022
Current Stage
9092 - International Standard to be revised
Completion Date
03-Jul-2023
Ref Project

Relations

Buy Standard

Standard
ISO 23219:2022 - Natural gas — Format for data from gas chromatograph analysers for natural gas — XML file format Released:4. 07. 2022
English language
27 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

INTERNATIONAL ISO
STANDARD 23219
First edition
2022-07
Natural gas — Format for data from
gas chromatograph analysers for
natural gas — XML file format
Gaz naturel — Format pour les données des analyseurs de
chromatographie en phase gazeuse pour le gaz naturel — Format de
fichier XML
Reference number
ISO 23219:2022(E)
© ISO 2022

---------------------- Page: 1 ----------------------
ISO 23219:2022(E)
COPYRIGHT PROTECTED DOCUMENT
© ISO 2022
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on
the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below
or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii
  © ISO 2022 – All rights reserved

---------------------- Page: 2 ----------------------
ISO 23219:2022(E)
Contents Page
Foreword .iv
Introduction .v
1 Scope . 1
2 Normative references . 1
3 Terms and definitions . 1
4 Basic instructions . 1
5 General comments to keywords and units . 2
Annex A (normative) XML tags . 4
Annex B (informative) Example of a gas certificate .11
Annex C (informative) Example of gas composition and properties .13
Annex D (informative) Example of gas analysis .17
Annex E (informative) Software suitable for XML file processing .21
Annex F (informative) International Chemical Identifier (InChI) .25
Bibliography .27
iii
© ISO 2022 – All rights reserved

---------------------- Page: 3 ----------------------
ISO 23219:2022(E)
Foreword
ISO (the International Organization for Standardization) is a worldwide federation of national standards
bodies (ISO member bodies). The work of preparing International Standards is normally carried out
through ISO technical committees. Each member body interested in a subject for which a technical
committee has been established has the right to be represented on that committee. International
organizations, governmental and non-governmental, in liaison with ISO, also take part in the work.
ISO collaborates closely with the International Electrotechnical Commission (IEC) on all matters of
electrotechnical standardization.
The procedures used to develop this document and those intended for its further maintenance are
described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the
different types of ISO documents should be noted. This document was drafted in accordance with the
editorial rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives).
Attention is drawn to the possibility that some of the elements of this document may be the subject of
patent rights. ISO shall not be held responsible for identifying any or all such patent rights. Details of
any patent rights identified during the development of the document will be in the Introduction and/or
on the ISO list of patent declarations received (see www.iso.org/patents).
Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.
For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and
expressions related to conformity assessment, as well as information about ISO's adherence to the
World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT), see www.iso.org/
iso/foreword.html.
This document was prepared by Technical Committee ISO /TC 193, Natural gas, Subcommittee SC 1,
Analysis of natural gas.
Any feedback or questions on this document should be directed to the user’s national standards body. A
complete listing of these bodies can be found at www.iso.org/members.html.
iv
  © ISO 2022 – All rights reserved

---------------------- Page: 4 ----------------------
ISO 23219:2022(E)
Introduction
There are multiple suppliers of gas chromatograph analysers for measurement of natural gas
composition. If correctly set up, there is no reason to prefer any one in particular, since they give
comparable results. However, the situation gives rise to a variety of methods of reporting data, which
can create confusion over the use of such data for off-line calculation of properties or evaluation of
analyser performance.
Therefore, a uniform method of data presentation, independent of the source of the analyser, as
presented in this document is considered valuable.
v
© ISO 2022 – All rights reserved

---------------------- Page: 5 ----------------------
INTERNATIONAL STANDARD ISO 23219:2022(E)
Natural gas — Format for data from gas chromatograph
analysers for natural gas — XML file format
1 Scope
This document specifies a text file format - XML file format - for reporting natural gas analysis results
and other data relevant to natural gas. The file name is applicable when it includes the extension of
.XML (case insensitive).
[1] [2]
The XML file format is useful for output from ISO 6974-1 for composition and ISO 6974-2 for
[3] [4]
uncertainty, for input for ISO 6976 and for input for ISO 10723 for performance evaluation.
Typically these would be the gas composition as provided on an analysis certificate, or results from a
performance evaluation that would be read into an Excel spreadsheet for data processing.
2 Normative references
The following documents are referred to in the text in such a way that some or all of their content
constitutes requirements of this document. For dated references, only the edition cited applies. For
undated references, the latest edition of the referenced document (including any amendments) applies.
ISO 8601, Date and time — Representations for information interchange — Part 1: Basic rules
3 Terms and definitions
No terms and definitions are listed in this document.
ISO and IEC maintain terminological databases for use in standardization at the following addresses:
— ISO Online browsing platform: available at https:// www .iso .org/ obp
— IEC Electropedia: available at https:// www .electropedia .org/
4 Basic instructions
The following steps shall be obeyed to come to a correct XML representation:
a) Unambiguous, reasonably concise, non-proprietary, and since the chemical formula is part of the
InChI it is often clear what the component is. The alternative of using Chemical Abstracts Registry
Number (CAS RN) is not so understandable and is proprietary.
b) Attributes in tags should be avoided, e.g. not 1,2 but
1,2mol%
c) The XML should have some checksum (at the end), e.g. CRC-16 check (hexadecimal) sum as
displayed by ZIP programs, at the end of the file as an XML comment, e.g. . This
is not intended for security purposes, merely as a confidence check that the file contents have not
been corrupted.
d) Date and time are tagged and use the convention specified in ISO 8601, e.g. time>2018-07-10T13:59:00+01
This data may be used for
— date and time of sample registration,
1
© ISO 2022 – All rights reserved

---------------------- Page: 6 ----------------------
ISO 23219:2022(E)
— date and time when the results were produced,
— date and time when the results were validated, or
— date and time when the report was issued.
e) Date and time are always useful data and the specified format is any format that is acceptable to
Excel and VBA. For example, time may be hh: mm: ss (e.g. 13:45:10), where seconds are optional
(assumed to be 00 if omitted, and hours are 24 hour clock). Date may be dd/mm/yyyy (e.g.
27/02/2017) or dd-mmm-yy (e.g. 27-Feb-17).
f) In general XML tags is lowercase (including inchi, which is usually written as InChI)
g) Any multiple word tags to be concatenated with underscore, e.g.
h) In general tags should be complete words, rather short forms or acronyms
i) The kind of numeric datatype Decimal (type xs: decimal or xs: float/ xs: double) shall be chosen.
Numbers should not contain spaces and use period as the decimal separator; i.e. no grouping of
digits, no thousands separator (e.g. comma). E-notation is used for powers of 10, e.g. 34, 12.3,
-3.4567, 5.6E3 and 7.8E-2.
j) Component data are in blocks (see annexes).
3 -3
k) Units should use a single solidus or -exponent, e.g. MJ/m (see annexes), or MJ∙m Space between
units is not allowed.
l) Properties should be in a block, with each property in a block, and, to be
flexible, the property will be identified with a keyword rather than by an XML tag (see annexes).
m) XML is defined by the tags – keywords enclosed in angular bracket, e.g. , with a terminating
tag with / in front of the keyword, e.g. .
n) This format of the XML file format is defined in the schema given in Annex A.
o) The XML tags defined in the schema are case insensitive (they are all lowercase) and have no
leading or trailing spaces. The tags have no attributes, i.e. no name=”value” within the tag.
p) The content of the tags, e.g. keywords, are case insensitive, and leading and/or trailing spaces
are ignored. In the examples (see Annexes B, C and D), the contents are often with trailing spaces in
order to improve readability.
q) The only likely need for lowercase is to distinguish the S.I. prefixes of m (milli) and M (mega).
Keywords should not contain spaces.
r) Example keywords and units are given in Annexes A, B, C and D. Commonly useful keywords are
specified in those same annexes.
s) In general, any keywords and units may be agreed between writing and reading applications
(see Clause 5).
t) Reading applications should ignore any keyword sections that are not relevant to their
operation.
u) Software, capable of processing XML data to Excel and vice versa is listed in Annex E.
v) Tags that contain values should have unique names.
5 General comments to keywords and units
5.1 Possible keywords and units are given in Annex A (see also examples on commonly useful
keywords in Annexes B, C and D).
2
  © ISO 2022 – All rights reserved

---------------------- Page: 7 ----------------------
ISO 23219:2022(E)
5.2 Example gas component names are specified in Annex F.
5.3 Amount units may be:
— ppm mol, mol%, mf or mol_fr (mole fraction), or
— ppm mass, mass% or mass_fr (mass fraction),
3
— concentration units, e.g. mg/m , are not recommended, but if they have to be used then the reference
conditions for the volume shall be given in the units, and whether the volume amount includes the
named component or not.
NOTE PPM is parts per million moles, i.e. moles per million moles (or parts per million ideal gas volume).
5.4 For calorific value (CV) the following should be considered:
— gross CV is the same as superior CV and higher CV, or
— net CV is the same as inferior CV and lower CV.
3 3
Possible units: MJ/m , kJ/mol, MJ/kg, Btu/ft
[6]
5.5 According to ISO/IEC Guide 98-3 every measurement should have an associated uncertainty.
This can be specified using the tag. This is the standard uncertainty (one standard
deviation) in the same units as the value (i.e. not as a percentage), and coverage_factor shall be
specified. The form of the distribution can be specified. In omitted the distribution is assumed to be
Normal (Gaussian). Other common distributions are Uniform and Triangular – for these the uncertainty
specifies the half range.
5.6 Since amounts are in mole fraction then the total amount must sum to unity, hence there will
always be correlation between the mole fractions. The correlation_coefficient block is to allow for this.
It is usual to assume this is an identity matrix (=1 if row=column, =0 if row<>column) if it isn’t provided.
In the block it is expected that row < column. The correlation matrix is symmetric.
5.7 Retention time, height and area have no need for units. Only that the units should be consistent
for that analyser and analysis. Retention time is to be in seconds.
3
© ISO 2022 – All rights reserved

---------------------- Page: 8 ----------------------
ISO 23219:2022(E)
Annex A
(normative)

XML tags
A.1
A.1.1
Optional parameters to describe the measurements. Examples below.
A.1.1.1
See Clause 4 item d).
A.1.1.2
Text description.
A.1.1.3
Text description.
A.1.2
A.1.2.1
Component data.
A.1.2.1.1
Text description of the component.
A.1.2.1.2
Optional parameters to characterize the component.
A.1.2.1.2.1
Text description of the property. Example names (and units) :-
molar_mass [kg/kmol]
boiling_point [K] (normal, at 101,325 kPa)
o
specific_gravity [-] (60/60 F relative density)
critical_temperature [K]
critical_pressure [MPa]
3
critical_volume [m /kmol]
4
  © ISO 2022 – All rights reserved

---------------------- Page: 9 ----------------------
ISO 23219:2022(E)
3
critical_density [kg/m ]
acentric_factor [-]
Note that the InChI descriptor contains the chemical formula.
A.1.2.1.2.2
Numerical value.
A.1.2.1.2.3
Text description of standard units.
A.1.2.1.3
Text InChI descriptor of the component (see Annex F).
A.1.2.1.4
Data for the component’s amount of substance.
A.1.2.1.4.1
Numerical value.
A.1.2.1.4.2
Text description of amount units (see 5.3).
A.1.2.1.4.3
Data for the component’s amount uncertainty.
A.1.2.1.4.3.1 
Numerical value.
A.1.2.1.4.3.2 
Numerical value, e.g. for a 95 % confidence interval of a normal distribution the value is 1,96; which is
often taken as 2.
A.1.2.1.4.3.3 
Text description of the distribution (see Clause 5 e). If absent assumed normal.
A.1.2.1.4.3.4 
Integer value. The number of measurements used in the calculation of
A.1.2.1.4.3.5 
Integer value. Unique value for or .
A.1.2.2
Numerical value in seconds.
5
© ISO 2022 – All rights reserved

---------------------- Page: 10 ----------------------
ISO 23219:2022(E)
A.1.2.3
Numerical value with arbitrary units (consistent throughout the file).
A.1.2.4
Numerical value with arbitrary units (consistent throughout the file).
A.1.3
See 5.5. If absent assumed to be an identity matrix.
A.1.3.1
A.1.3.1.1
Integer value (referenced by ).
A.1.3.1.2
Integer value (referenced by ).
A.1.3.1.3
Numerical value (in the range -1 to +1).
A.2
A.2.1
Data for the method for the property calculation.
A.2.1.1
[3] [5]
Text description of the method used, e.g. ISO 6976 , ISO 20765-2 .
A.2.1.2
Parameters that are relevant to the method. Examples below.
A.2.1.2.1
o o
Numerical value: < 32 assumed C, 32 to 100 assumed F, >100 assumed K.
A.2.1.2.2
o o
Numerical value: < 32 assumed C, 32 to 100 assumed F, >100 assumed K.
A.2.1.2.3
Numerical value: > 25 assumed kPa , <25 assumed psiA.
6
  © ISO 2022 – All rights reserved

---------------------- Page: 11 ----------------------
ISO 23219:2022(E)
A.2.1.3
A.2.1.3.1
Text description of the property.
Example names (followed by possible units in [], and symbols):-
ISO 6976 properties:-
molar_mass [kg/kmol] M
gas_compression_factor [-] Z
3
volume_gross_calorific_value [MJ/m ] (Hv)
G
molar_gross_calorific_value [kJ/mol] (Hc)
G
mass_gross_calorific_value [MJ/kg] (Hm)
G
3
volume_net_calorific_value [MJ/m ] (Hv)
N
molar_net_calorific_value [kJ/mol] (Hc)
N
mass_net_calorific_value [MJ/kg] (Hm)
N
relative_density [-] G
3
gas_density [kg/m ] D
3
wobbe_index [MJ/m ] W
G
3
net_wobbe_index [MJ/m ] W
N
3 0
ideal_volume_gross_calorific_value [MJ/m ] (Hv)
G
3 0
ideal_volume_net_calorific_value [MJ/m ] (Hv)
N
0
ideal_relative_density [-] G
3 0
ideal_gas_density [kg/m ] D
3 0
ideal_wobbe_index [MJ/m ] W
G
3 0
ideal_net_wobbe_index [MJ/m ] W
N
ISO 20765 properties:-
temperature [K] T
pressure [MPa] p
molar_helmholtz_free_energy [kJ/kmol] a
3
second_virial_coefficient [m /kmol] B
molar_isobaric_heat_capacity [kJ/kmol·K] c
p
molar_isochoric_heat_capacity [kJ/kmol·K] c
v
isochoric_heat_capacity [kJ/kg·K] C
v
7
© ISO 2022 – All rights reserved

---------------------- Page: 12 ----------------------
ISO 23219:2022(E)
isobaric_heat_capacity [kJ/kg·K] C
p
3
molar_density [kmol/m ] d ρ
3
density [kg/m ] D
molar_gibbs_free_energy [kJ/kmol] g
gibbs_free_energy [kJ/kg] G
molar_enthalpy [kJ/kmol] h
enthalpy [kJ/kg] H
molar_entropy [kJ/kmol·K] s
entropy [kJ/kg·K] S
molar_internal_energy [kJ/kmol] u
internal_energy [kJ/kg] U
3
molar_volume [m /kmol] v
speed_of_sound [m/s] w
compression_factor [-] Z
3
isothermal_throttling_coefficient [m /kmol] ϕ
isentropic_exponent [-] κ
joule-thomson_coefficient [K/MPa] μ
viscosity [mPa·s] η
A.2.1.3.2
Numerical value.
A.2.1.3.3
Text description of standard units.
A.2.1.3.4
A.2.1.3.4.1
Numerical value, in the same units as the property value.
A.2.1.3.4.2
Numerical value. If absent one (1) is assumed, i.e. uncertainty is the standard deviation.
A.2.1.3.4.3
Text description of the distribution. If absent normal is assumed.
8
  © ISO 2022 – All rights reserved

---------------------- Page: 13 ----------------------
ISO 23219:2022(E)
A.2.1.3.4.4
Optional text description of the method used for the uncertainty calculation.
A.3 XML schema (ISO23219.XSD)
Below is an example schema for the above content.
Note that it is permissible to add other tags that may be useful for a specific case, e.g. extra data not
considered here, and images & pictures etc.




 
 
   
   
     maxOccurs="1"/>
     maxOccurs="1"/>
     maxOccurs="1"/>
   
   
   
    
    
     
     
     
      
      
      
     
     
     
     
      
      
      
      
        maxOccurs="1"/>
        maxOccurs="1"/>
        maxOccurs="1"/>
    maxOccurs="1"/>
    maxOccurs="1"/>
      
     
    
    
    
    
   
   
   
    
    
      maxOccurs="1"/>
      maxOccurs="1"/>
9
© ISO 2022 – All rights reserved

---------------------- Page: 14 ----------------------
ISO 23219:2022(E)
     
    
   
  
  
  
   
   
    
    
    
      maxOccurs="1"/>
      maxOccurs="1"/>
      maxOccurs="1"/>
    
    
    
     
     
     
     
     
       maxOccurs="1"/>
       maxOccurs="1"/>
       maxOccurs="1"/>
       maxOccurs="1"/>
     
    
   
  
 
10
  © ISO 2022 – All rights reserved

---------------------- Page: 15 ----------------------
ISO 23219:2022(E)
Annex B
(informative)

Example of a gas certificate



 
  
   2019-09-28 18:29
   APL/123456
   APL-2019-09-28
  
  
   
    N2
    1S/N2/c1-2
    
     4.415
     mol%
     
      0.012519
      2
      normal
      6
      1
     
    
   
  
  
   
    CO2
    1S/CO2/c2-1-3
    
     3.272
     mol%
     
      0.007445
      2
      normal
      6
      2
     
    
   
  
  
   
    CH4
    1S/CH4/h1H4
    
     85.412
     mol%
     
      0.019853
      2
      normal
      6
      3
     
    
   
  
11
© ISO 2022 – All rights reserved

---------------------- Page: 16 ----------------------
ISO 23219:2022(E)
  
   
    C2H6
    1S/C2H6/c1-2/h1-2H3
    
     6.901
     mol%
     
      0.015987
      2
      normal
      6
      4
     
    
   
  
  
   12-0.06566
   13-0.52431
   14-0.10137
   23-0.26340
   24-0.08720
   34-0.70862
  
 
 
  
   ISO6976:2016
   
    15
    15
    101.325
   
   
    volume_gross_calorific_value
    36.847
    MJ/m3
    
     0.011
     2 ...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.