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.
Rob, > The PHP module is a bit more convoluted that python, but it does work. > > https://db.aoos.org/wiki/index.php/AOOS_PHP > > Stole core code from the python boilerplate, so it stands to reason that > both these can be cleaned up with a perl module? This is my first ever > attempt at digging into modules. > > Why PHP? One can easily create a soap service in PHP. The reason this > module helps out is the current way we do things with UDUNITS1 is the PHP > soap server actually runs a perl program as part of the script to do the > conversion and then pass it back to the calling client. > > With a PHP and python module we can now eliminate the bulk of units > translations done over the network via soap. We will probably keep the > soap server running, but now we've eliminated the need to call the perl > program for each soap request. > > Ok... back to xml. > > XSLT might work on some of the udunits2 dictionary, but not all of it. > Is there a way to pull all the root definitions out systematically? I'm not sure what you're asking. Can you be more explicit? > Are actual numerical conversion factors in the code rather than the > dictionary? The relationships between units are completely defined by the XML databases: the library code adds no additional information. > How does udunits come up with the temperature conversion? The XML database defines the relationship between the various temperature units and the library uses those relationships to define conversion processes. For example, the Fahrenheit unit is defined as "°R @ 459.67" and the Rankine unit is defined as "K/1.8". This means that, to convert from Kelvin to Fahrenheit, the value should first be multiplied by 1.8 and then have 459.67 subtracted from it. > Rob Regards, Steve Emmerson Ticket Details =================== Ticket ID: WST-524293 Department: Support UDUNITS Priority: Normal Status: Closed