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

[Support #TGE-338265]: Udunits2 warnings



Phillipe,

> I have just a question: is it normal that the 'standard' xml database of
> units delivered along with the Udunits2 library emits warnings about
> redefined symbols each time it is read ?
> It is a bit boring and pollutes all the outputs.

The problem isn't with the UDUNITS-2 library; it's with the application that 
uses the library.  By default, the library will emit the warnings you saw.  The 
application can prevent this by calling ut_set_error_message_handler(ut_ignore) 
before reading the units database.  After the database is read the application 
should restore error-messaging by calling ut_set_error_message_handler() again.

The udunits2(1) utility does this to avoid printing the warnings.

> Here are the messages:
> 
> Definition of "kt" in "/usr/share/udunits/udunits2-common.xml", line 86,
> overrides prefixed-unit "1000000 kilogram"
> Definition of "microns" in "/usr/share/udunits/udunits2-common.xml",
> line 304, overrides prefixed-unit "1e-15 second"
> Definition of "ft" in "/usr/share/udunits/udunits2-common.xml", line
> 401, overrides prefixed-unit "1e-12 kilogram"
> Definition of "yd" in "/usr/share/udunits/udunits2-common.xml", line
> 409, overrides prefixed-unit "8.64e-20 second"
> Definition of "pt" in "/usr/share/udunits/udunits2-common.xml", line
> 630, overrides prefixed-unit "1e-09 kilogram"
> Definition of "at" in "/usr/share/udunits/udunits2-common.xml", line
> 1027, overrides prefixed-unit "1e-15 kilogram"
> Definition of "ph" in "/usr/share/udunits/udunits2-common.xml", line
> 1545, overrides prefixed-unit "3.6e-09 second"
> Definition of "nt" in "/usr/share/udunits/udunits2-common.xml", line
> 1552, overrides prefixed-unit "1e-06 kilogram"
> 
> Thanks,
> Philippe.
> --
> Philippe Poilbarbe - CLS Space Oceanography Division.

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: TGE-338265
Department: Support
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.