⇐ ⇒

[CF-metadata] "Andrew Clegg": udunits 1 or 2 for CF?

From: Andrew Clegg <ancl>
Date: Thu, 04 Mar 2010 16:16:23 +0000

Steve,

I just tried adding u as a prefix, and it certainly worked (although I
also can't say if it would have any unintended consequences, I only use
a small set of unit strings).

I don't use Fortran personally, so a lack of a Fortran interface
wouldn't be a problem for me. Of course, we would not want to
deliberately cause problems for Fortran users. Jonathan's response
reflects my opinion on this:

We can distinguish udunits-2 as a standard for units strings, and udunits-2
as software. If we say that CF uses udunits-2 as its reference, programs in
Fortran can still use udunits-1 to process the units strings, in nearly all
cases, though obviously a ununits-2 Fortran interface would be preferable.

Cheers,
Andrew Clegg

Steven Emmerson wrote:
> Andrew,
>
> The "u" prefix can be added to the UDUNITS-2 database by inserting the
> line
>
> <symbol>u</symbol>
>
> in the set of other "symbol" definitions for the value "1e-6" in the
> database file "$(prefix)/share/udunits/udunits2-prefixes.xml".
>
> At this time, however, I can't say whether or not doing so will have
> unintended consequences. If you wish to try it, please do so and get
> back to me.
>
> I think a larger issue regarding the adoption of the UDUNITS-2 package
> is the fact that it doesn't yet have a Fortran interface. I have not
> investigated this matter much but, apparently, Fortran-95 has a
> relatively easy mechanism for creating such an interface -- which,
> hopefully, would mean that few resources would be needed to create
> one. The question then becomes one of priority: given that the CF
> convention adopts the UDUNITS-2 package, how necessary or important is
> a Fortran interface? On the other hand, given that creating a Fortran
> interface will consume resources (most especially time) how necessary
> is adoption of the UDUNITS-2 package?
>
> I encourage and await your input on the matter. Would you please CC
> me directly as I don't (yet?) subscribe to the CF mailing-list.
>
> Regards,
> Steve Emmerson
> UDUNITS Developer
>
> On 3/4/2010 3:08 AM, Andrew Clegg wrote:
>> Steve,
>>> The UDUNITS-1 library had a bug in it. The bug was that "g" was
>>> interpreted as meaning "gravity" (i.e., "standard_free_fall") rather
>>> than "gram". This was corrected in version 1.12.10 of the UDUNITS-1
>>> package, which was released on 2009-09-17.
>>>
>>> The UDUNITS-2 package did not have this bug from the outset.
>> Thanks for this, however this is not the only incompatibility I have
>> found. Another one is specifying microns. Udunits1 understands 'um',
>> while Udunits2 recognises '?m'. I note that the CF conventions list in
>> Table 3.1 that the abbreviation for micro is 'u', not '?'.
>>
>> It may well be that these are the only 2 incompatibilities - in which
>> case, it might be wise to note these specifically in the conventions, ie
>> to specify that "The value of the |units| attribute is a string that can
>> be recognized by UNIDATA"s Udunits package (version 1.12.10 or higher)
>> <http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.4/cf-conventions.html#udunits>",
>>
>> and perhaps that '1e-6' should be used in place of u/? to ensure
>> compatibility with both versions.
>>
>> Cheers,
>> Andrew
>>
>> --------------------------------------------------------------------------------
>>
>>
>> Plymouth Marine Laboratory
>>
>> Registered Office:
>> Prospect Place The Hoe
>> Plymouth PL1 3DH
>>
>> Website: www.pml.ac.uk
>> Registered Charity No. 1091222
>> PML is a company limited by guarantee
>> registered in England & Wales
>> company number 4178503
>>
>> PML is a member of the Plymouth Marine Sciences Partnership
>> Website: www.pmsp.org.uk
>> --------------------------------------------------------------------------------
>>
>>
>> This e-mail, its content and any file attachments are confidential.
>>
>> If you have received this e-mail in error please do not copy, disclose
>> it to any third party or use the contents or attachments in any way.
>> Please notify the sender by replying to this e-mail or e-mail
>> forinfo at pml.ac.uk and then delete the email without making any copies or
>> using it in any other way.
>>
>> The content of this message may contain personal views which are not the
>> views of Plymouth Marine Laboratory unless specifically stated.
>>
>> You are reminded that e-mail communications are not secure and may
>> contain viruses. Plymouth Marine Laboratory accepts no liability for any
>> loss or damage which may be caused by viruses.
>> --------------------------------------------------------------------------------
>>
>>
> _______________________________________________
> CF-metadata mailing list
> CF-metadata at cgd.ucar.edu
> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata


--------------------------------------------------------------------------------
Plymouth Marine Laboratory
 
Registered Office:
Prospect Place
The Hoe
Plymouth PL1 3DH
 
Website: www.pml.ac.uk
Registered Charity No. 1091222
PML is a company limited by guarantee
registered in England & Wales
company number 4178503

PML is a member of the Plymouth Marine Sciences Partnership
Website: www.pmsp.org.uk
--------------------------------------------------------------------------------
This e-mail, its content and any file attachments are confidential.

If you have received this e-mail in error please do not copy, disclose it to any third party or use the contents or attachments in any way. Please notify the sender by replying to this e-mail or e-mail forinfo at pml.ac.uk and then delete the email without making any copies or using it in any other way.

The content of this message may contain personal views which are not the views of Plymouth Marine Laboratory unless specifically stated.

You are reminded that e-mail communications are not secure and may contain viruses. Plymouth Marine Laboratory accepts no liability for any loss or damage which may be caused by viruses.
--------------------------------------------------------------------------------
Received on Thu Mar 04 2010 - 09:16:23 GMT

This archive was generated by hypermail 2.3.0 : Tue Sep 13 2022 - 23:02:41 BST

⇐ ⇒