⇐ ⇒

[CF-metadata] udunits 1 or 2 for CF?

From: Comiskey, Glenn <g.comiskey>
Date: Thu, 02 Jun 2011 11:05:31 -0000

Hi Philip,

Thank you kindly for your response, and I believe you have understood my
email perfectly.

Having done some reading on number notation, and testing with UDUNITS v1
& v2, I now understand that 'm-3 kg' is the representation for kilograms
per cubic metre, i.e. kg/m3, while 'm3 kg-1' is the representation for
cubic metres per kilogram, i.e. m3/kg. Though I find it odd that 'kg m3'
and 'm3 kg' should both be represented as 'm3 kg' for v1 and 'kilogram
metre3' for v2, which, if I'm interpretating it right, is m3/kg.

Thanks for you help.

Regards,

Glenn

-----Original Message-----
From: Cameron-smith, Philip [mailto:cameronsmith1 at llnl.gov]
Sent: 01 June 2011 17:46
To: Comiskey, Glenn; cf-metadata at cgd.ucar.edu
Subject: RE: Re: [CF-metadata] udunits 1 or 2 for CF?

Hi Glenn,

I would interpret 'm-3 kg' as (1/m3)*kg == kg/m3. Or did I
misunderstand your email?

It does look funny to have the denominator unit first, though.

Best wishes,

     Philip

-----------------------------------------------------------------------
Dr Philip Cameron-Smith, pjc at llnl.gov, Lawrence Livermore National Lab.
-----------------------------------------------------------------------

> -----Original Message-----
> From: cf-metadata-bounces at cgd.ucar.edu [mailto:cf-metadata-
> bounces at cgd.ucar.edu] On Behalf Of Comiskey, Glenn
> Sent: Wednesday, June 01, 2011 9:22 AM
> To: cf-metadata at cgd.ucar.edu
> Subject: Re: [CF-metadata] udunits 1 or 2 for CF?
>
> Hi All,
>
> As a new comer to the world of metorological/oceanographic datasets, I

> am currently reading up on a number of subject matters including the
> use of the UDUNITS package and the use of version 1 or 2 for CF
> conformance.
> As a result of a URL kindly provided by Mike Grant, Plymouth Marine
> Laboratory I came across a posting by Andrew Clegg in March 2010:
>
> >I'm running into some problems regarding units in CF-compliant files.
> Up
> >until now I've been using udunits 1 to check units, but I recently
> tried
> >the CF checker which uses udunits2. There are some unit strings which

> >are valid in one but not the other. In particular, I am dealing with
> >milligrams per cubic meter. In udunits1, I used 'ukg m^-3', which
> >udunits2 rejects as invalid. udunits2 accepts 'mg m^-3' (which is
> >much better!), but udunits1 interprets this as to do with gravity.
> >Because
> of
> >this, I can't include a unit string which is generally compatible
> >with udunits...
>
> My query relates to the specifications quoted for dealing with
> milligrams per cubic meter values, i.e. 'ukg m^-3' for version 1, and
> 'mg m^-3' for version 2. When I enter either value, or indeed 'mg/m3',

> into my installed version 1 (v1.12.11) of 'udunits' it reports the
> definition as '1e-06 kilogram metre-3' implying a unit value of
> '0.000001 kg/m3' - and what I would expect, i.e. kilograms per cubic
> metre.
>
> However, when I enter the same values into my installed version 2
> (v2.1.23) of 'udunits2' it reports the definition as '1e-06 m-3 kg'
> implying a unit value of '0.000001 m3/kg' - and not what I would
> expect, i.e. cubic metres per kilogram.
>
> Has anyone else noted this, or can somebody correct my interpretation
> of the meaning of 'm-3 kg'.
Received on Thu Jun 02 2011 - 05:05:31 BST

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

⇐ ⇒