|
MRG Interactive DevelopmentsMesoscale Research Group, McGill/UAlbany |
The UDUNITS package is maintained and distributed by the good folks at Unidata. UDUNITS converts between scientific units reliably and efficiently. You will need to register with Unidata (free) before you can download the package source. Much more information is available from the UDUNITS home.
We ran into a few minor problems during the installation of the package. The first, which appeared immediately in the 'port' subdirectory, complained about the lack of a compiler definition (guess who skipped reading the installation notes?). This was easily rectified by entering (and uncommenting) CPPFLAGS='-DpgiFortran' in the src/CUSTOMIZE file (the CC line is also set to 'CC=pgcc'). Note that modifying the customization file is a better strategy that setting environment variables since you'll be able to retrace your steps much more cleanly if something goes wrong of if you have to recompile at a later date.
The only other problem arose during the liking step for the udunits executable. We got a couple of 'Undefined references', one for log10 and one for pow. These look suspiciously like mathematical functions, and are indeed located in libm.a. The quickest solution that we came up with was to add an extra definition in the customization file that went something like LD_MATH='-lm' since LD_MATH is an exported variable from the ./configure script. Once these hacks were made, everything went according to plan.
One other possible change is the application of a "patch" produced by the Netherlands Centre for Climate Resarch, available here. The "patch" is not actually a true patch, but extracts itself into the existing udunits tree. This is a bit dangerous, since you lose the original source, but hey, if it works... We did apply this patch before compiling, but I don't think that it proved necessary in our case. However, it's there for you to try if you run into trouble.
Questions or Comments? Contact our WebMaster.