ADAPT / Standard

ADAPT Standard data model issue management
https://adaptstandard.org
MIT License
6 stars 0 forks source link

Does the Unit Code Syntax ever require brackets? #113

Open knelson-farmbeltnorth opened 10 months ago

knelson-farmbeltnorth commented 10 months ago

There is open issue about how to render unit codes in ADAPT. E.g., cubic meters per square meters:

I have generally written as m3m-2, whereas units in the toolkit Representation are [m3]1[m2]-1. If the numerator has an exponent of 1, the toolkit representation omits the bracket on the numerator m1[m2]-1.

If we treat m2 as a defined unit independent of m, I can see the advantage in bracketing the primary units (in which case we should have [m]1[m2]-1. That way it is easier to parse to the to the defined units. Then again, if that is the case, why not discard the exponents and render [m]/[m2] or m/m2.

Since ADAPT doesn't treat m2 as a defined unit, however, it would seem as easy to parse [m]1[m2]-1 as [m]1[m]-2 or indeed m1m-2.

knelson-farmbeltnorth commented 10 months ago

@strhea Appreciate any feedback on this one.

knelson-farmbeltnorth commented 10 months ago

Agreement in 16 August 2023 meeting to keep the existing brackets syntax:

Any numerator or denominator raised to the 1st or -1st power does not require a bracket. Any numerator raised to a higher power must be in brackets.

Examples: kg1ha-1 mg1[m2]-1 [mm3]1sec-1 [mm3]1[m2]-1