units conversion

I have created a function that converts the units in a flatfield from
unit x to unit y (for those components that match unit x). This seems to work
quite well as I can print out the field and verify the new units and the
converted data.  (My primary use of this is to convert celcius to kelvin)

In a number of situations I am making a new flatfield using the same
function type as the old one (using originalField.getType()) but with a new
range set.

However when I do this I find that the new field has reset its units to
celcius (without converting the data I might add).

Is this behaviour intended? How can I get around it?



-----------------------------------------------------
Cameron Shepherdley <C.Shepherdley@xxxxxxxxxx>
AutoTAF Project Developer 
Bureau of Meteorology, Melbourne, VIC 3001, Australia
Telephone: +613 9669 4652