-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
udunits supports ppm, but documentation states it does not #260
Comments
Dear @mathiasbockwoldt Thanks for raising this. I am glad to learn that udunits has been updated! Since CF1.8 gives https://www.unidata.ucar.edu/software/udunits/ as its reference for udunits, which means udunits 2 in effect, I agree that the text should be changed. We need to agree a specific change. Quoting a bit more of the current text:
I would suggest we replace that with
That is, we remove the recommendation to use 1e-6 for ppm. What do you and others think? I am going to change the label of this issue to Enhancement because I would say that this is actually a material change to the convention (although a minor one) and thus deserves more scrutiny than a defect correction. Cheers, Jonathan |
I think the proposed change sounds good, and I support it. |
thanks to @mathiasbockwoldt for pointing this out and to @JonathanGregory for proposed wording, which I support. |
Does this mean that we accept both |
Hi @martinjuckes . I am not sure I understand your comment. Are you pointing out that ppm is not the same as ppmv, even though they are usually so close that most people ignore the difference?
Hi @JonathanGregory . I certainly prefer using ppm than 1e-6 because it helps distinguish from other dimensionless units, such as kg/kg (a common source of mistakes). However, what should a user do for a concentration that is smaller than udunits allows? There is also the downside that programs reading the data need to be told to recognize ppm/ppb/etc and multiply by 1e-6/1e-9/etc, rather than simply multiplying by the units. Personally, I would sacrifice this convenience for avoiding confusion between molar concentrations and mass concentrations. |
Hi @cameronsmith1 : I'm asking whether we accept them as defined in |
Hi @martinjuckes . I think you are correct, and I agree with you. Fortunately, if people don't follow what you say the consequence will probably be negligible. |
I support the rewording suggested by @JonathanGregory with the modifications suggested by @cameronsmith1 and @martinjuckes. |
Suggestion from the peanut gallery: Might this be an opportunity to move away from having CF's documentation of supported units as simply "whatever UDUnits supports"? It has always struck me as odd that a standard that takes such pains to be precise about certain aspects of what constitutes valid metadata just completely punts (to an entirely separate tool with no standards body behind it) with regards to valid units. And having just spent significant time trying to understand whether "Celsius" is and should be a valid unit (it is), some verbiage describing valid unit strings would IMO be much better than having to install and run a separate tool. |
I have always had a problem with the ambiguity of units like ppm. An oxygen measurement in the atmosphere in ppm could have two different values, one in mass/mass and the other in volume/volume. Consequently, the use of ppmv by some but my preference has always been to be semantically explicit with units such as microlitres/litre or mg/kg. Consequently, I was disappointed when ppm was added to UDUNITS. @JonathanGregory 's suggested change of words is an improvement in my view, but I would like to see it accompanied by a suggestion to use unambiguous, semantically implicit units. To @dopplershift I would say that UDUNITS was incorporated into the initial CF standard because it was a part of the NetCDF community standard upon which the CF community standard was based. Replacing UDUNITS by a units vocabulary under CF governance is something that has been discussed by the CF community several times - usually during discussions of the units to be used for salinity in oceanography - but it was and isn't a feasible proposition within available resources and so solutions such as "1e-3" and "1e-6" were written into the conventions. |
I agree with what has been said by @martinjuckes, @cameronsmith1 and @roy-lowry. I don't think dimensionless units should be used to distinguish between dimensionless quantities, since that's the purpose of standard names, but Roy's preference for explicitly describing the dimensionless ratios makes sense to me. Thus we have these two proposals. We could add both of them to the text:
I have phrased the first as a negative requirement (a prohibition), meaning that these units would cause the CF checker to report an error. It could instead be a negative recommendation (a deprecation), so that the CF checker would give a warning. What do you think? On @dopplershift's point, I agree with Roy. I would add that CF relies on udunits only for the definition of possible syntax and legal units, not for the udunits software. I should think that Unidata would be happy to have suggestions for improving the udunits documentation of what is allowed. Unidata have provided a useful resource and CF doesn't have much human resource available, so it is better not to duplicate. The "delegation" to udunits has served us well, I would say. |
The last point, raised by Ryan @dopplershift, is of course a reasonable question and has been raised before. If others agree with my answer, we should put it in the FAQ. |
I agree with the text by @JonathanGregory . Use of ppmv instead of ppm is very common, and I don't think it is a big deal in practice, but I expect it will generally be easy to fix for users, so I don't have a strong opinion between whether it gives an error or a warning. |
I support the original request. CF should accept well known units such as ppm and ppmv without error, warning, or prejudice. These only improve the information content, not detract. Such units are more meaningful to humans than current recommendations like "1" and "1e-6". |
Merged via unnecessarily complicated #390 |
Please could you clarify what change has been made here? Although there was agreement on some points in this issue, I don't see a conclusion that we agreed should be implemented. In particular, the last two comments are in disagreement. Thanks. Jonathan |
Hi @JonathanGregory - I was going off of #385 (comment), which stated that the agreed changes in #390 would close this issue. Sorry for prematurely closing this one; I haven't been involved in this discussion but thought this one was dormant as the last comment was from 2020. |
During the hackaton we discussed also this part of the text, i.e. that UDUNITS now includes ppm and others. But obviously the suggested changes did not make it into the final PR. My apologies --- @JonathanGregory thanks for spotting this. From the discussion in this issue I take it that there are two parts: (1) the current CF text needs to be updated because UDUNITS now accepts ppm, ppb, ppmv, and ppbv, etc. (2) There is no consensus regarding whether the "by volume" variants should be allowed or not. |
Dear Daniel @erget, @larsbarring and all You're right that this was dormant, and thanks for reawakening it. From Daniel's comment I understand that the changes which have been implemented are those of issue 385, which corrects various references to UDUNITS. Thanks for implementing those corrections. I agree with Lars's summary that there are two things still to be addressed in this issue:
On (2), the majority opinion was that CF should either prohibit or deprecate the "by volume" units (ppmv etc.) The reason is that the distinction between fraction by mass or mole and fraction by volume relates to the quantity being described, and therefore should be made by the On (1), we have to decide whether to say anything about the non-v dimensionless units (ppm etc.), or keep silent (implying that CF thinks they are fine). In previous discussion, views were expressed that they are acceptable in CF, but we should encourage people to code something more informative: When a dimensionless quantity is a ratio of dimensional quantities, data-writers are encouraged to consider specifying its units as a ratio of units, for instance Best wishes Jonathan |
Dear @JonathanGregory I fully agree with the reasons in your comment on point (2). But I think the "by volume" units as such should not be prohibited or deprecated. In connection with standard names I do agree they should be prohibited. But without a standard name I argue that the "by volume" units has their uses, after all they are widely used. Regarding your comment on point (1) I like your proposed text, possibly with the minor modification to delete the two "of |
Hi Jonathan, et al.,
I think I agree with Lars. The ‘by volume’ quantities are technically different quantities and should have different standard names. As I write this, I cannot think of an example in environmental modeling or observation that should use ‘by volume’. The closest I can think of is if someone is preparing a mixture of liquids for an experiment. However, the quantities with and without ‘by volume’ are usually so close in value that most atmospheric modelers I know aren’t careful about the distinction, which is probably why we are having this discussion. My guess is that the habit of including ‘by volume’ arose as a quick way to distinguish between number ratios and mass ratios, and of course ‘by volume’ is in common use in chemistry labs. Hence, I think CF should allow ppmv, but not on standard_names that use ppm. Or to put it another way, ppm and ppmv should not both be allowed on the same std_name.
For #1, I have mixed feelings. I will usually use ppm, ppb, etc when labeling plots. However, using the numerical ratio (eg, 1e-6, 1e-9) is less error prone when doing calculations that involve different species (eg, chemicals or aerosols) that typically use different ratios. On balance, I think avoiding errors is more important than convenience, so I am comfortable with your statement “[ppm/ppb/etc] are acceptable in CF, but we should encourage people to code something more informative…”
Best wishes,
Philip
…--------------------------------------------------------------
Philip Cameron-Smith, ***@***.******@***.***> Lawrence Livermore Nat Lab
--------------------------------------------------------------
From: Lars Bärring ***@***.***>
Sent: Friday, October 7, 2022 5:37 AM
To: cf-convention/cf-conventions ***@***.***>
Cc: Cameron-smith, Philip ***@***.***>; Mention ***@***.***>
Subject: Re: [cf-convention/cf-conventions] udunits supports ppm, but documentation states it does not (#260)
Dear @JonathanGregory<https://urldefense.us/v3/__https:/github.com/JonathanGregory__;!!G2kpM7uM-TzIFchu!ky_CTjf72i-YBgCDHY7UtvhKQA_GMJHYF_haBgzgl_9pfX3gFtJ_5ntKh4Xl6w$>
I fully agree with the reasons in your comment on point (2). But I think the "by volume" units as such should not be prohibited or deprecated. In connection with standard names I do agree they should be prohibited. But without a standard name I argue that the "by volume" units has their uses, after all they are widely used.
Regarding your comment on point (1) I like your proposed text, possibly with the minor modification to delete the two "of 1e-6" because the unit ratios are just examples. Furthermore, possibly a sentence could be added to clarify that "by volume" units are not allowed for use with standard names.
—
Reply to this email directly, view it on GitHub<https://urldefense.us/v3/__https:/github.com/cf-convention/cf-conventions/issues/260*issuecomment-1271534730__;Iw!!G2kpM7uM-TzIFchu!ky_CTjf72i-YBgCDHY7UtvhKQA_GMJHYF_haBgzgl_9pfX3gFtJ_5nsQ6BCybQ$>, or unsubscribe<https://urldefense.us/v3/__https:/github.com/notifications/unsubscribe-auth/ACETEUBNQLSMID7AFKIP3N3WCAKNJANCNFSM4MN6HQZQ__;!!G2kpM7uM-TzIFchu!ky_CTjf72i-YBgCDHY7UtvhKQA_GMJHYF_haBgzgl_9pfX3gFtJ_5ntYQ2i9gA$>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
I think many users find it helpful when plotting packages automatically add the units to a plot, so there is an advantage to having a units string in the metadata, in accordance with the comment of @Dave-Allured , so I am in favor of deprecating rather than prohibiting ppmv, as @JonathanGregory suggests. I also think we are supporting, or at least allowing, ppm. Correct? The text and logic needs to be parsed carefully to see this. To make it more obvious, I suggest we revise the last sentence of the first paragraph to eliminate the double negative, eg "This convention allows dimensionless units that are UDUNITS compatible". This allows ppmv, which is consistent with the second paragraph if we deprecate it rather than prohibit it. |
Dear @larsbarring and Philip @cameronsmith1 I think perhaps we're being inconsistent. On the one hand, we suggest that Cheers Jonathan |
I think that what we now are discussing is how to strike the right balance between formalism and pragmatism. The SI Brochure Section 5.4.7 is a good starting point:
Here the use of I think that part of the current discussion is that With all the different standard names (and in particular the meticulous work in establishing their precise link to the quantity they represent) I would be reluctant to fold the quantity meaning into the unit. In a quick search in the standard name table I found 11 standard names including the phrase "volume_fraction" and quite many involving either "mass_fraction" or "mole_fraction". All have canonical unit "1". I fail to see that allowing From my perspective I think that it is important to make a distinction between quantity and unit. And this is basically what the standard names and their canonical units are doing. I do see an advantage in allowing unit ratios like, for example |
Hi all, With Jonathan's suggestion I think that we were nearly converging towards something that everyone could live with, but maybe not meeting anyone's every requirement. I think that it would be a pity to not move this forward. So, (esp. @JonathanGregory, @cameronsmith1, @Dave-Allured) could we proceed with Jonathan's suggestion? Kind regards, |
Per above, I abstain. That means you may proceed. |
Dear @larsbarring Thanks for getting back to this. It seems like we have a consensus except on the point of whether In order to deprecate it, we would have to add an indication in the standard name table of which standard names would trigger the deprecation viz. any whose canonical unit is 1 and which are not volume ratios. I think that's too complicated, which makes me favour prohibition. Without any extra information, we can prohibit That means we would also prohibit Best wishes Jonathan |
Given all the discussion, I am OK with either prohibiting or deprecating ppmv. |
Yes, I favour prohibition of "per-volume" units in connection with standard names for reasons I have expressed in earlier posts. And this is only strengthened by @JonathanGregory's insight that if they were deprecated (or allowed altogether) a mechanism has to be in place to distinguish for which they are allowed/not allowed. And this would just add another level of complication to deal with. Kind regards, |
Dear all In view of the discussion, and thanks to flexibility by @Dave-Allured and @cameronsmith1, this is the currently proposed new text for Section 3.1. Note that I have reordered it, to group the statements about UDUNITS, but without changing it otherwise. I hope this is fine for all, but please say if not.
to replace this existing text:
Are there any further concerns or comments? If none are expressed in the next three weeks (by 23rd November), this change will be accepted. Best wishes Jonathan |
I stumbled over the sentence "Descriptive information about dimensionless quantities, such as sea-ice concentration, cloud fraction, probability, etc., should be given in ... " (retained unedited from the original) because it seems to have nothing to do with units, and I don't know why/how one would include this information in the units attribute. Could this be moved to the end of the paragraph and, to make it just a bit clearer, could the sentence be reworded along the lines "Information describing the dimensionless quantity itself (as opposed to its units) should be given in the long_name or standard_name attributes (see Sections 3.2 and 3.3, below), where one could learn, for example, whether a fraction represented |
Dear Karl @taylor13 I believe that this remark is included because actually (at least in the past) people have sometimes used
Is that OK? All of the final paragraph here is existing text. Cheers Jonathan |
@JonathanGregory , @taylor13 , For the sentence 'Descriptive information about dimensionless quantities,...' I think it would help if we included examples of what we mean by 'Descriptive information', which I think are things like: 'volume_fraction, mole_fraction, mass_fraction, area_fraction, optical_thickness, salinity'. I propose that we change that sentence to something like:
This will replace
|
The text proposed by @JonathanGregory is o.k.; I like @cameronsmith1 's minor edit slightly better. I still don't think it ideal to say "Descriptive information about dimensionless quantities" because I count the units as helping to describe the quantity too (i.e., it would be included in the term "descriptive information"). That's why I proposed an alternative in #260 (comment). Another possibility is: "Information describing a physical quantity itself does not belong in the units attribute, but should be given in the long_name or standard_name attributes (see Sections 3.2 and 3.3, below)," and then perhaps also including some examples. |
Dear Karl and Philip Yes, I believe the sentence means to say, "Information describing a physical quantity itself does not belong in the units attribute, but should be given in the long_name or standard_name attributes," in Karl's words. The reason for the sentence is that people have sometimes put things like Best wishes Jonathan |
Thanks, Jonathan for explaining why it is an important point to make. FWIW, I think that Karl's version of the text is clearer too. |
Thank you @JonathanGregory, @taylor13 and @cameronsmith1 for these final wordsmithing efforts. I cannot contribute to this, and will be happy to accept the outcome. |
Dear all Thanks for your comments. Here's another suggested version, incorporating Karl's sentence. The first two paragraphs are the same as before. Best wishes Jonathan
|
I'm happy with that. I didn't pay attention to the last 2 sentences until now. Could the first of these be slightly edited as follows:
Sorry for suggesting things in bits and pieces. |
How about this
|
Here's the current complete proposal to replace the para starting "Units are not required for dimensionless quantities" in Sect 3.1:
If there are no further concerns or suggestions, we can accept this in three weeks from now (on 5 Dec). Thanks. |
Hi @JonathanGregory . I see only one detail to clarify. The previous discussion noted that the meaning of ppb, ppt, and ppq are language dependent. The current text doesn't make the CF position clear. However, I infer that the value of these language dependent quantities is whatever UDUNITS says it is. In which case, perhaps we can clarify this by amending the first sentence of the second paragraph to be: "The UDUNITS package defines a few dimensionless units, such as percent, ppm (parts per million), and ppb (parts per billion = 10^-9)." |
I have created a pull request to implement this change, including the clarification just suggested by Philip @cameronsmith1, for which thanks; see modified text. Since that's a minor change, I won't reset the three-week countdown, unless someone objects. Note that there's also a new rule in the conformance document:
Cheers, Jonathan |
Hello - I have just read this whole thread, having not being paying attention previously, and I'd like to thank you all for an interesting discussion and creating the new text, which I am very happy with. |
Thanks for reading, checking and adding your support, @davidhassell. Three weeks have passed with no further comments requiring attention, and enough support has been expressed according to the rules, so this change is thus agreed. Thanks for collaborating on the modified text for |
Title
udunits supports ppm, but documentation states it does not
Moderator
None at the moment
Requirement Summary
The documentation states that udunits does not support dimensionless ratios like parts-per-million. But udunits does support such units.
Technical Proposal Summary
Change sentence to state that ppm, ppb etc are supported, or at least remove the statement that these units are not supported.
Benefits
Every reader working with dimensionless ratios will benefit from the correction.
Status Quo
The current working draft (1.9) states that ppm etc. are not supported by udunits.
Detailed Proposal
The chapter "Description of the Data" - "Units" (ch03.adoc) states:
The last part is wrong. UDUNITS-2 does support ppm, ppb, ppt, and ppq. In addition, percent is also supported. Other similar units, like permille are not supported. In fact, these units were supported since udunits2 version 2.1.24 from August 2011. The change occurred here:
Unidata/UDUNITS-2@789147f
Please update the documentation to reflect the support of ppm etc.
The text was updated successfully, but these errors were encountered: