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

Re: udunits



Jonathan,

Steve Emmerson wrote:

> The problem with adding "B" or "Bel" to the UDUNITS database is that
> logarithmic units always need a reference level and the grammar for
> specifying units (which is used in the database) doesn't support it.
> For example, the grammar needs to support something like
> 
>     dB (1 mW)
> 
> for a decibel unit with a 1 milliwatt reference level.

Although the syntax above is not currently supported by udunits, it's
the syntax we intend to support when logarithmic units are added to
udunits, within the next year.  So it would be possible to use the
above syntax now to make your intent clear, with assurance that
eventually udunits will recognize it.

I would also like to confirm Steve's comment that we intend to merge
udunits into netCDF soon, so that users of both packages will be able
to build and install them more easily.

Steve also wrote:

> One can always have one's own units database, but then God help someone 
> trying to do interdisciplinary work, or to have one's work immediately
> understood years later.

One possible solution to this sort of problem would be an attribute
convention for specifying one or more URIs for
replacement/additions/overrides to udunits.dat, analogous to XML
namespaces.  As part of merging udunits into netCDF, we would want to
recommend such a convention, for example a "_Units" attribute, which
of course would only be necessary to override the default that udunits
is configured and installed with.

Steve and I have discussed this and he's got some good ideas for
implementing it.  Another complication would be that the udunits
library would have to support the possibility of multiple different
units sets for simultaneously open netCDF datasets that specified
different URIs.

Of course eventually you would want to allow the use of XML to specify
the units initialization information currently hardwired in
udunits.dat, but that's a bit more than we can commit to right now and
for backward compatibility we would need to support the current table
syntax anyway.

This might be something to discuss on the cf-metadata mailing list,
but for now I've just Cc:ed the people who have been part of this
thread and know the context ...

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden          http://www.unidata.ucar.edu/staff/russ


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.