qudt / qudt-public-repo

QUDT -Quantities, Units, Dimensions and dataTypes - public repository
Other
110 stars 71 forks source link

Add UDUNITS codes #467

Open dr-shorthair opened 2 years ago

dr-shorthair commented 2 years ago

UDUNITS is a standard code system used widely in earth and atmospheric sciences, including netCDF. The UDUNITS syntax for unit designators is deterministic, but slightly different to UCUM etc.

Suggest adding an additional label/annotation in qudt:Unit definitions to accommodate UDUNITS, alongside UCUM and UNECE slots.

@stuchalk and @semmerson will assist.

dr-shorthair commented 2 years ago

Related to #30

steveraysteveray commented 2 years ago

Sounds reasonable. Please consider a pull request for both the schema (adding something like qudt:udunitsCode) and for the units vocabulary, with all the codes (hopefully something you can script?).

dr-shorthair commented 2 years ago

@semmerson there are two steps here:

  1. add qudt:udunitsCode to https://github.com/qudt/qudt-public-repo/blob/master/schema/SCHEMA_QUDT-v2.1.ttl - following the same pattern as is used for qudt:uneceCommonCode
  2. add a line for the qudt:udunitsCode in each member of this vocabulary https://github.com/qudt/qudt-public-repo/blob/master/vocab/unit/VOCAB_QUDT-UNITS-ALL-v2.1.ttl

We can probably script it to a large extent, using the production rule for the QUDT Qunit names, as described here: https://github.com/qudt/qudt-public-repo/wiki/Unit%20Vocabulary%20Submission%20Guidelines#qname-naming-rules

stuchalk commented 2 years ago

@dr-shorthair @semmerson here are the example additions:

definition of property

qudt:udunitsCode a owl:DatatypeProperty ; rdfs:isDefinedBy http://qudt.org/2.1/schema/qudt ; rdfs:label "udunits code" ; rdfs:range xsd:string ; .

example code

unit:K a qudt:Unit ; ... qudt:udunitsCode "K" ; ...

Are these OK?

semmerson commented 2 years ago

Hi Stuart,

I can guess what most of the entries are, but what's this?

qudt:uneceCommonCode "KEL" ;

--Steve

stuchalk commented 2 years ago

Steve I made a mistake when I write the comment initially. The line you reference I updated almost immediately to be 'qudt:udunitsCode "K" ;' as it is now...at least it is what I see...

steveraysteveray commented 2 years ago

Yup, you fixed it before I had a chance to say anything! Your suggested pattern looks just right. Now we need a volunteer to populate it!

stuchalk commented 2 years ago

OK, I have created a table of udunits symbols and QUDT codes where available, and suggested codes for new units here. @semmerson let me know what you think...

semmerson commented 2 years ago

Hi Stuart,

I noticed that some of the names had underscores and others didn't. Will that be a problem?

--Steve

On Fri, Feb 11, 2022 at 1:35 PM Stuart Chalk @.***> wrote:

OK, I have created a table of udunits symbols and QUDT codes where available, and suggested codes for new units here https://docs.google.com/spreadsheets/d/1c5I6ApLxsOY3ZwFb6xuxORVYk9686SiGvQEy_FMeJu4/edit#gid=550729612. @semmerson https://github.com/semmerson let me know what you think...

— Reply to this email directly, view it on GitHub https://github.com/qudt/qudt-public-repo/issues/467#issuecomment-1036599940, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEVZ7O2UPJJB4STDVOLVILU2VXIFANCNFSM5N6ONKTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

stuchalk commented 2 years ago

Steve

The names are not important in their formatting because all we need is to know what quantitykind the unit is valid for. The unit strings are important but all I have in that spreadsheet look fine with the possible exception of the unicode characters. Those could create a problem potentially...

Stuart

semmerson commented 2 years ago

Hi Stuart,

QUDT can't handle Unicode?

--Steve

On Fri, Feb 11, 2022 at 3:12 PM Stuart Chalk @.***> wrote:

Steve

The names are not important in their formatting because all we need is to know what quantitykind the unit is valid for. The unit strings are important but all I have in that spreadsheet look fine with the possible exception of the unicode characters. Those could create a problem potentially...

Stuart

— Reply to this email directly, view it on GitHub https://github.com/qudt/qudt-public-repo/issues/467#issuecomment-1036675748, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEVZ7KH5QXUERERZE6DMW3U2WCTXANCNFSM5N6ONKTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

steveraysteveray commented 2 years ago

Unicode is not a problem in QUDT.