Witsml/> Core Application Program Interface Version 1


APPENDIX B - Unit of Measure



Download 0.54 Mb.
Page17/21
Date31.07.2017
Size0.54 Mb.
#24987
1   ...   13   14   15   16   17   18   19   20   21

10 APPENDIX B - Unit of Measure

10.1Overview


Numeric measure values exchanged using WITSML have an associated "uom" attribute that describes the Unit of Measure for that value. This is a flexible approach that allows data to be exchanged with the minimum of constraints or assumptions.

10.2Basics


The "uom" attribute is mandatory for all numeric values that need to be qualified with a unit of measure indicator to provide the full context of an element value. The value of the uom attribute is expected to match an ‘annotation’ attribute from the WITSML Units Dictionary XML file that is included with the Data Schema.
For example, a WITSML document may contain the fragment:
80.00
This specifies that the value for ropAv is measured in feet per hour ("ft/h").
The "uom" value of "ft/h" is the annotation for a UnitOfMeasure in the WITSML Units Dictionary reference file as:


feet/hour

POSC

ft/h





0.3048

3600






This gives a link to the base SI unit of meters per second and a suggested conversion to this base unit.
In this way, any WITSML compliant document can be decoded by any application that can work with SI units.

10.3Process interaction with ‘uom’


A provider and consumer of WITSML documents can work with units in a number of ways:



  1. No preference of units expressed by the consumer (i.e. ‘uom’ in a query template is empty or absent, or the document has been generated as a result of a non-SOAP request).

The provider will provide the data in a mutually agreed or default set of units of measure.

E.g. A request for gives



80.00


  1. The consumer requests an element in a particular unit of measure, that is recognized by the provider as compliant with WITSML.

The provider will supply the element converted to the requested unit of measure and with the ‘uom’ attribute populated appropriately.

E.g. A request for gives



1.3333


  1. The consumer requests an element in a particular unit of measure, that is NOT recognized by the provider as compliant with WITSML.

The provider will supply the element converted to the server default unit of measure and with the ‘uom’ attribute populated appropriately.

E.g. gives



80.00

  1. The provider does not support requests for units of measure other than the server default.

E.g. A request for gives

80.00

Notes:


1) It is server dependent as to which options are supported.

10.4Responsibilities


If a unit is requested, a server / publisher will always populate the ‘uom’ attribute of an element with an entry that describes the units of the element value. The ‘uom’ will align with the WITSML units dictionary.

The source of the data should use consistent units within an object. For example, all length measures in the same unit and all coordinates of the same type (e.g., measured depth) in the same unit. The unit system should also be consistent (e.g., metric). The source might be a server or it might be a client that adds data to a server.

A uom attribute is not part of the selection criteria. Specifying a particular uom value in a query template is a request for the element value to be returned in those units But, the client / subscriber should verify that the ‘uom’ in the returned document matches that requested and if not, handle any mismatch as it sees fit.

If an empty uom attribute is specified in a query then a default unit will be returned.


10.5 Updating


The WITSML Units Dictionary file) is included in the WITSML distribution media for each WITML Data Schema version.
Updates to the Units Dictionary are made as part of the WITSML Data Schema revision process.

11 APPENDIX C - Defined Values

11.1Return Values


The values returned in intReturn by the WITSML Core API functions are shown below, along with the string returned by the WMLx_GetBaseMsg function.
The WITSML-defined Return Values are in the range of -999 thru -1 (to indicate exception conditions) and 1 (to indicate no exception occurred).
Implementers are encouraged to use values from this list whenever possible.
It is recognized that this list is incomplete, however, and additional values will need to be defined over time.
If no Return Value is presently defined for an error condition, implementers are free to assign their own proprietary Return Values less than -1000 (i.e., -1001, -1002, etc).
It is hoped that proprietary Return Values will be contributed to the WITSML community for possible inclusion in this standard list.

Value String returned by WMLx_GetBaseMsg
1 Function completed successfully
-1nn: Parameter errors
-101 Parameter error: Invalid/missing WITSML object type

-102 Parameter error: Invalid/missing XML

-103 Parameter error: Invalid/missing selection criteria

-104 Parameter error: Invalid/missing server name

-105 Parameter error: Invalid/missing publisher name

-106 Parameter error: Invalid/missing subscriber name

-107 Parameter error: Invalid/missing real-time data type name

-108 Parameter error: Invalid/missing real-time data

-109 Parameter error: Invalid/missing XML Schema (XSD) path/filename

-110 Parameter error: Invalid option

-111 Parameter error: Invalid/missing subscriber process location

-112 Parameter error: Invalid/missing subscriber secure indicator

-199 Parameter error: unknown cause
-2nn: Persistent Store errors
-201 Persistent Store error: Duplicate key

-202 Persistent Store error: Could not parse XML

-203 Persistent Store error: Could not map XML

-204 Persistent Store error: No data matched selection criteria

-205 Persistent Store error: The query results are too large

-299 Persistent Store error: unknown cause

-3nn: XML Schema errors
-301 XML Schema error: Error while parsing the specified XML Schema (XSD) file

-302 XML Schema error: specified XML Schema (XSD) has invalid content

-303 XML Schema error: no base attribute present below data type definition element

-304 XML Schema error: nesting of data types exceeds maximum - check for circular

reference in definitions

-305 XML Schema error: unrecognized XML Schema data type

-306 XML Schema error: circular reference (loop) in included schemas

-399 XML Schema error: unknown cause

-9nn: program logic/exception errors
-901 Program Error: problem loading internal program or component

-902 Program Error: XML Schema data type is not presently supported by the


WITSML API

-999 Program Error: unknown cause




Download 0.54 Mb.

Share with your friends:
1   ...   13   14   15   16   17   18   19   20   21




The database is protected by copyright ©ininet.org 2024
send message

    Main page