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.
Rashad, Salam alaikum. >Date: Mon, 10 May 2004 10:44:28 -0400 >From: "El-Badrawi,Rashad" <address@hidden> >Organization: UCHC >To: <address@hidden> >Subject: Question on ucar.units package The above message contained the following: > I am trying to implement support for units in our software using your > units package. It has proven very helpful, but I have the following > question: I need to break the 'end unit' (e.g. micro-molar - micro > moles per liter-) into its building blocks (i.e. moles and liter) > with the correct scale and exponent for each. I have no problem in > knowing the building blocks and the exponent of each by retrieving the > 'factors'. However, I cannot find a way in which I can specifically > retrieve that the scale of the 'mole' factor is 10-6, and the scale of > the 'm3' factor is '1000'. The scaling seems to come back mixed. > > Is there a way of doing that? Thanks for your help. I *think* I know what you're asking. That the multiplicative factors are "mixed", as you say, is unavoidable. This is because an infinite number of unit specifications can be equivalent: nanomoles per cubic centimeter micromoles per liter millimoles per cubic meter ... I suggest that you use the factor from a canonical or standard unit (e.g., "micromoles per liter) and divide it into the factor from the unit in question in order to arrive at a canonical factor for the mole part of the unit product. Contact me if you'd like an example. > Regards, > Rashad > > Rashad Badrawi Research Associate I > Center For BioMedical Imaging address@hidden > Department of Cell Biology (860) 679 - 3296 > UCHC Regards, Steve Emmerson