[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Support #DOV-245654]: case of unit names



Hi Jonathan,

> I was surprised to find that the cf-checker accepted DAYS as a valid unit, but
> I understand from Ros and the udunits guide that in udunits-2 the names of
> units (not the symbols) are case-insensitive. I am pretty sure that it is
> quite often stated that units names (at least SI) are lower case. For 
> instance,
> it is "joule", not "Joule", despite its being named after a person. The
> detailed NIST guide, which udunits follows, also appears to uphold this in
> sect 9.1 of http://physics.nist.gov/Pubs/SP811/sec09.html
> 
> "When spelled out in full, unit names are treated like ordinary English 
> nouns. Thus the names of all units start with a lower-case letter, except at 
> the beginning of a sentence or in capitalized material such as a title."
> 
> Could udunits-2 be made to follow this rule?

Good question!

The UDUNITS-2 package could be made to follow this rule but I'd recommend 
against it. There's a general principle in programming that says "Be generous 
in what you take-in but very particular in what you give-out. In this situation 
it means that the UDUNITS package should be generous in what it accepts for 
unit strings and finicky in what it prints for a unit. I know for a fact that 
there are scientific and engineering systems out there that spell their unit 
names in all capital letters; ergo, the UDUNITS package accepts that. As you 
know, this is not the case for unit symbols because there, unlike unit names, 
capitalization can change the meaning of a symbol.

> Best wishes
> 
> Jonathan


Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: DOV-245654
Department: Support UDUNITS
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.