Dear all,

Here's what the CF conventions say about dimensionless quantities:

"Units are not required for dimensionless quantities. A variable with no units attribute is assumed to be dimensionless. However, a units attribute specifying a dimensionless unit may optionally be included. The Udunits package defines a few dimensionless units, such as |percent|, but is lacking commonly used units such as ppm (parts per million). This convention does not support the addition of new dimensionless units that are not udunits compatible. The conforming unit for quantities that represent fractions, or parts of a whole, is "1". The conforming unit for parts per million is "1e-6". Descriptive information about dimensionless quantities, such as sea-ice concentration, cloud fraction, probability, etc., should be given in the |long_name| or |standard_name| attributes (see below) rather than the |units|. "

It does not indicate whether or not it is o.k. to set units to the empty string, but by *not* mentioning this, I think we should assume that this would not be CF compatible. I also think that a human interpreting units = "" might think that the user had made mistake, whereas if the units attribute were missing altogether, they would think it was simply unitless. A strict interpretation of the conventions seems to imply:

1. a number (like "1" or "1e-6") should be used if the quantity represents fractions or parts of a whole, whereas 2. the units attribute should be omitted in other dimensionless cases (e.g., involving ratios such as calcium/boron ratio, or involving "counts" such as the number of cars crossing a bridge each day) In these cases the standard name indicates what the quantity is (but I wonder what standard name applies in the second example above, and should it have units of inverse time?)

If a quantity is dimensionless and the units attribute is present, I think the CF checker currently only allows "1" as the units attribute. Perhaps this should be generalized since apparently a conforming unit is also a number (such as "1e-6" for ppm). I don't think it should allow units = "".

Best regards,
Karl

On 3/1/11 9:26 AM, Steven Emmerson wrote:
Everyone,

The UDUNITS packages (both UDUNITS and UDUNITS-2) interpret the empty
string (i.e., "") as the dimensionless unit 1 -- so if you can't use
"1", then use "" (assuming you pass that string to the UDUNITS library).

The udunits(1) and udunits2(1) programs, however, interpret the empty
string as a user input error and ask for the input unit again.

Regards,
Steve Emmerson
UDUNITS developer

On 2/28/2011 10:18 AM, Rosalyn Hatcher wrote:
Dear Karl,

That is correct. If the variable is deemed unitless, then the checker
will not flag an error if either units=1 or the units attribute is omitted.
If the units attribute is missing, it will, however, produce an
information message suggesting that the units attribute is added for
completeness.

Eg.

------------------
Checking variable: CHL_count
------------------
INFO (3.1): No units attribute set.    Please consider adding a units attribute 
for completeness.


I introduced the INFO category of message a while ago, for instances
where the checker couldn't be sure of an error (E.g. where an attribute
is being used in a non-standard way), to prompt the user to double check
that what they've put is actually what they meant.

I'll hopefully have a fixed version of the checker available tomorrow
for testing.

Regards,
Ros.




On 28/02/11 16:44, Karl Taylor wrote:
Dear Rosalyn,

I assume the checker will also not complain if the units attribute is
simply omitted when the variable is unitless (i.e., either units="1"
or the attribute is omitted result in the same behavior by the checker).

best regards,
Karl

On 2/28/11 4:28 AM, [email protected] wrote:
Dear Rosalyn,
thanks so much for your reply and your works that is so important for
me. Infact "my" data are produced within MYOCEAN (european) project
and thay are going to test them! so it is important they do not failed
the CF checker test.

Best regards.

cristina

p.s.
Sorry if sometime I miss some e-mails and I didin't answer to them.
This is a very caotic working time....and I'm receiving so many e-mails.

Thanks to all the cf-metadata group to their help!

Citando Rosalyn Hatcher<[email protected]>:

I agree units should be set to "1" and I am currently in the process of
fixing the error in the CF Checker.

Regards,
Ros.


On 27/02/11 17:27, Steven Emmerson wrote:
Cristina,

I recommend the unit "1" for that use.

If the CF checker doesn't like that unit, then it should be fixed,
IMO, because that unit is supported by both the US NIST and the BIPM.

Regards,
Steve Emmerson
UDUNITS developer

On 2/26/2011 12:30 PM,[email protected]  wrote:
Dear Roy,
Our variable "chlorophyll count" as is understandable by CF is the
number of individual measurements used to determine a chlorophyll value.

I do need to know what to put at "units" attribute for that variable.
I undestood by the CF convention 1.4 (appendix C) that I have to put
"units="1" as the chlorophyll count is a dimensionless variable...but
the CF checker found it as an error.

I try not to put the Unit attribute ...but again i get an error by che
cf chcker.......so.....

my question is: what unit shoudl I set for my chlorophyll count variable?

thanks for your help.

cristina

-------------------------------------------------------------------
Cristina Tronconi
Istituto di Scienze dell'Atmosfera e del Clima - sezione di Roma
Consiglio Nazionale delle Ricerche
Via Fosso del Cavaliere 100
00133 Roma, Italy
Tel: +39 06 49934342
cell: '39 349 1242954
Fax: +39 06 20660291
e-mail:[email protected]


_______________________________________________
CF-metadata mailing list
[email protected]
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
_______________________________________________
CF-metadata mailing list
[email protected]
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
--
Rosalyn Hatcher
NCAS Computational Modelling Services
Dept. of Meteorology, University of Reading,
Earley Gate, Reading. RG6 6BB
Email:[email protected]      Tel: +44 (0) 118 378 6016
-------------------------------------------------------------------
Cristina Tronconi
Istituto di Scienze dell'Atmosfera e del Clima - sezione di Roma
Consiglio Nazionale delle Ricerche
Via Fosso del Cavaliere 100
00133 Roma, Italy
Tel:      +39  06  49934342
cell:     '39 349 1242954
Fax:      +39  06  20660291
e-mail:[email protected]


_______________________________________________
CF-metadata mailing list
[email protected]
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata

_______________________________________________
CF-metadata mailing list
[email protected]
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata

--
Rosalyn Hatcher
NCAS Computational Modelling Services
Dept. of Meteorology, University of Reading,
Earley Gate, Reading. RG6 6BB
Email:[email protected]      Tel: +44 (0) 118 378 6016



_______________________________________________
CF-metadata mailing list
[email protected]
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
_______________________________________________
CF-metadata mailing list
[email protected]
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
_______________________________________________
CF-metadata mailing list
[email protected]
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata

Reply via email to