This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Mary, > I recently built some code that depends on the calendaring software in > UDUNITS 2.1.14. This code includes the xml files that come with this > version, and internally sets the UDUNITS2_XML_PATH environment variable to > point to these files. > > Some users are having problems with our code because they have other versions > of UDUNITS installed on their system, and they have UDUNITS_PATH or > UDUNITS2_XML_PATH set to point to their version. > > I have two questions: Does UDUNITS-2 use both UDUNITS_PATH and > UDUNITS2_XML_PATH to look for these files? If so, does one take precedence > over the other? The UDUNITS-2 package only uses the UDUNITS2_XML_PATH environment variable. > Is there some kind of incompatibility between versions of these XML files? I > seem to remember at one point I had the 2.1.*12* version of these files still > on my machine, and was trying to use UDUNITS-2.1.14 with these files. This > was causing the UDUNITS-2 initialization software to return an error. The UDUNITS-1 package doesn't use XML files at all. Instead, the database is stored in a textual file with an idiosyncratic format. The API of the UDUNITS-2 package was designed to be completely different from the UDUNITS-1 API so that the two packages could be used by the same program. > --Mary Regards, Steve Emmerson Ticket Details =================== Ticket ID: CTU-258510 Department: Support UDUNITS Priority: Normal Status: Closed