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.
Charlie, > Found some time to convert UDUnits->UDUnits2 for NCO. > The code is committed to the NCO CVS head and will be in 3.9.2. > It is activated by building with UDUNITS2=Y. > The key changes are all in > > http://nco.cvs.sourceforge.net/nco/nco/src/nco/nco_lmt.c?view=markup > > I'll start reporting oddities in small chunks. > > First, ut_read_xml() does not work as expected for me: > > ut_sys=ut_read_xml(); > > 1. It does not pay attention to my UDUNITS2_XML_PATH > 2. It does not automagically find the installed location > /usr/local/share/udunits2.xml > > It only seems to work if hard code the path > > ut_sys=ut_read_xml("/usr/local/share/udunits2.xml"); > > Can you verify this behavior (or is it me)? First off, thanks for looking at the package. I really appreciate it. Second, I don't seem to have the problem you described with the UDUNITS2_XML_PATH environment variable. Here's a demonstration from the root of the installation directory: # demonstrates finding installed database: $ pwd /home/steve/udunits2 $ bin/udunits2 -A udunits2: Using default XML database You have: $ UDUNITS2_XML_PATH=/dev/null bin/udunits2 -A udunits2: Using default XML database udunits2: Couldn't initialize unit-system from database "(null)" $ rm share/udunits2.xml $ bin/udunits2 -A udunits2: Using default XML database udunits2: Couldn't initialize unit-system from database "(null)" # # demonstrates finding UDUNITS2-XML_PATH database: $ UDUNITS2_XML_PATH=src/lib/udunits2.xml bin/udunits2 -A udunits2: Using default XML database You have: W You want: m2.kg.s-3 You have: What does the above do on your system? Regards, Steve Emmerson Ticket Details =================== Ticket ID: LTB-717744 Department: Support UDUNITS Priority: Emergency Status: On Hold